CI: Replace deprecated actions-rs
with simple run: cargo ...
(#720)
There's no reason to use these steps anymore: besides being old, unmaintained, and spitting out NodeJS deprecation warnings, GitHub's `runner-images` come preloaded with all Rust tools and components we need, and the syntax to run commands is more efficient, much shorter and more apprehensible by simply matching what we'd use on our own command-line, too.
This commit is contained in:
parent
508fc4ff19
commit
0428540fa3
106
.github/workflows/ci.yml
vendored
106
.github/workflows/ci.yml
vendored
|
@ -8,15 +8,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions-rs/toolchain@v1
|
- run: cargo check --workspace --all-targets --all-features
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
args: --workspace --all-targets --all-features
|
|
||||||
|
|
||||||
check_msrv:
|
check_msrv:
|
||||||
name: Check ash MSRV (1.59.0)
|
name: Check ash MSRV (1.59.0)
|
||||||
|
@ -24,10 +16,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: dtolnay/rust-toolchain@1.59.0
|
- uses: dtolnay/rust-toolchain@1.59.0
|
||||||
- uses: actions-rs/cargo@v1
|
- run: cargo check -p ash --all-features
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
args: -p ash --all-features
|
|
||||||
|
|
||||||
check_ash_window_msrv:
|
check_ash_window_msrv:
|
||||||
name: Check ash-window MSRV (1.64.0)
|
name: Check ash-window MSRV (1.64.0)
|
||||||
|
@ -35,10 +24,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: dtolnay/rust-toolchain@1.64.0
|
- uses: dtolnay/rust-toolchain@1.64.0
|
||||||
- uses: actions-rs/cargo@v1
|
- run: cargo check -p ash-window -p examples --all-features
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
args: -p ash-window -p examples --all-features
|
|
||||||
|
|
||||||
generated:
|
generated:
|
||||||
name: Generated
|
name: Generated
|
||||||
|
@ -47,21 +33,10 @@ jobs:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- name: Run generator
|
- name: Run generator
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo run -p generator
|
||||||
with:
|
|
||||||
command: run
|
|
||||||
args: -p generator
|
|
||||||
- name: Format generated results
|
- name: Format generated results
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo fmt -p ash
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: -p ash
|
|
||||||
- name: Diff autogen result
|
- name: Diff autogen result
|
||||||
run: git diff --quiet || (echo "::error::Generated files are different, please regenerate with cargo run -p generator!"; git diff; false)
|
run: git diff --quiet || (echo "::error::Generated files are different, please regenerate with cargo run -p generator!"; git diff; false)
|
||||||
|
|
||||||
|
@ -72,82 +47,39 @@ jobs:
|
||||||
- name: Install Vulkan loader
|
- name: Install Vulkan loader
|
||||||
run: sudo apt-get install libvulkan-dev
|
run: sudo apt-get install libvulkan-dev
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- name: Test all targets
|
- name: Test all targets
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --workspace --all-targets
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace --all-targets
|
|
||||||
- name: Test docs
|
- name: Test docs
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --workspace --doc
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --workspace --doc
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
name: Rustfmt
|
name: Rustfmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions-rs/toolchain@v1
|
- run: cargo fmt --all -- --check
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --all -- --check
|
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: Clippy
|
name: Clippy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions-rs/toolchain@v1
|
- name: Clippy lint without features
|
||||||
with:
|
# Only test the core ash and ash-window crate, where features reside.
|
||||||
profile: minimal
|
# The examples crate would otherwise enable all default features again,
|
||||||
toolchain: stable
|
# making this test moot.
|
||||||
override: true
|
run: cargo clippy -p ash -p ash-window --no-default-features -- -D warnings
|
||||||
components: clippy
|
- name: Clippy lint with all features
|
||||||
- uses: actions-rs/cargo@v1
|
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||||
name: Clippy lint without features
|
- name: Clippy lint with default features
|
||||||
with:
|
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||||
command: clippy
|
|
||||||
# Only test the core ash and ash-window crate, where features reside.
|
|
||||||
# The examples crate would otherwise enable all default features again,
|
|
||||||
# making this test moot.
|
|
||||||
args: -p ash -p ash-window --no-default-features -- -D warnings
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
name: Clippy lint with all features
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --workspace --all-targets --all-features -- -D warnings
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
name: Clippy lint with default features
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --workspace --all-targets -- -D warnings
|
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
name: Build-test docs
|
name: Build-test docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- name: Document all crates
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
name: Document all crates
|
|
||||||
env:
|
env:
|
||||||
RUSTDOCFLAGS: -Dwarnings
|
RUSTDOCFLAGS: -Dwarnings
|
||||||
with:
|
run: cargo doc --all --all-features --no-deps --document-private-items
|
||||||
command: doc
|
|
||||||
args: --all --all-features --no-deps --document-private-items
|
|
||||||
|
|
Loading…
Reference in a new issue