Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Replace deprecated/unmaintained actions-rs with simple run: steps #211

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 13 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
default: true
override: true
- name: Cargo cache
uses: actions/cache@v3
with:
Expand All @@ -29,23 +21,12 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

doc:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: rust-docs
default: true
override: true
- name: Cargo cache
uses: actions/cache@v3
with:
Expand All @@ -54,11 +35,7 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-cargo-rust_nightly-${{ hashFiles('**/Cargo.toml') }}
- name: Documentation
uses: actions-rs/cargo@v1
env:
DOCS_RS: 1
with:
command: doc
run: cargo doc

check:
runs-on: ubuntu-22.04
Expand All @@ -69,19 +46,13 @@ jobs:
sudo apt-get install -y libdrm-dev
- name: Fetch drm headers
run: ./.github/workflows/fetch_headers.sh
- name: Update deps
uses: actions-rs/cargo@v1
- uses: dtolnay/[email protected]
with:
command: update
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.66.0
profile: minimal
components: clippy
default: true
override: true
- name: Downgrade home
run: cargo update -p home --precise 0.5.5
- name: Downgrade fdeflate
run: cargo update -p fdeflate --precise 0.3.5
- name: Cargo cache
uses: actions/cache@v3
with:
Expand All @@ -95,10 +66,7 @@ jobs:
path: target
key: ${{ runner.os }}-build-rust_1.66.0-check-${{ hashFiles('**/Cargo.toml') }}
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features --all-targets -- -D warnings -A clippy::redundant_static_lifetimes
run: cargo clippy --all --all-features --all-targets -- -D warnings -A clippy::redundant_static_lifetimes

check-minimal:
runs-on: ubuntu-22.04
Expand All @@ -109,16 +77,7 @@ jobs:
sudo apt-get install -y libdrm-dev
- name: Fetch drm headers
run: ./.github/workflows/fetch_headers.sh
- name: Update deps
uses: actions-rs/cargo@v1
with:
command: update
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
default: true
override: true
- uses: dtolnay/rust-toolchain@nightly
- name: Cargo cache
uses: actions/cache@v3
with:
Expand All @@ -132,10 +91,7 @@ jobs:
path: target
key: ${{ runner.os }}-build-rust_nightly-check-minimal-${{ hashFiles('**/Cargo.toml') }}
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-features --all-targets -Z minimal-versions
run: cargo check --all --all-features --all-targets -Z minimal-versions

test:
needs:
Expand Down Expand Up @@ -199,14 +155,10 @@ jobs:
- name: Fetch drm headers
run: ./.github/workflows/fetch_headers.sh
- name: Setup Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
profile: minimal
components: rustfmt
default: true
override: true
targets: ${{ matrix.target }}
- name: Cargo cache
uses: actions/cache@v3
with:
Expand All @@ -219,17 +171,10 @@ jobs:
with:
path: target
key: ${{ runner.os }}-build-rust_${{ matrix.rust }}-target_${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}
- name: Update deps
uses: actions-rs/cargo@v1
with:
command: update
- name: Build sys
uses: actions-rs/cargo@v1
env:
RUST_LOG: bindgen=warn,bindgen::ir=error,bindgen::codegen=error
with:
command: build
args: --manifest-path drm-ffi/drm-sys/Cargo.toml --target ${{ matrix.target }} --features update_bindings
run: cargo build --manifest-path drm-ffi/drm-sys/Cargo.toml --target ${{ matrix.target }} --features update_bindings
- name: Copy bindings
run: cp drm-ffi/drm-sys/src/bindings.rs bindings-${{ matrix.target }}.rs
- name: Upload bindings
Expand All @@ -239,19 +184,13 @@ jobs:
name: bindings
path: bindings-*.rs
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --target ${{ matrix.target }}
run: cargo build --target ${{ matrix.target }}
- name: Test
if: contains(matrix.target, '-linux-') && (startsWith(matrix.target, 'x86_64-') || startsWith(matrix.target, 'i686-'))
uses: actions-rs/cargo@v1
timeout-minutes: 12
env:
RUST_BACKTRACE: full
with:
command: test
args: --all --target ${{ matrix.target }}
run: cargo test --all --target ${{ matrix.target }}

compare-bindings:
needs:
Expand Down Expand Up @@ -315,11 +254,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Publish crates
uses: katyo/publish-crates@v1
with:
Expand Down
Loading