forked from gfx-rs/naga
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update to actions/checkout@v3 * update to actions/upload-artifact@v3 * remove minor version * remove unmaintained actions-rs actions * update to codecov/codecov-action@v3 * use ubuntu-latest * use extra cargo/rust env vars * use cargo-nextest * check naga-fuzz * only check on MSRV and minimal-versions * add whitespace between steps * rename to CI * use cargo-llvm-cov to generate code coverage
- Loading branch information
Showing
6 changed files
with
154 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_INCREMENTAL: false | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: full | ||
MSRV: 1.63 | ||
|
||
jobs: | ||
check-msrv: | ||
name: Check MSRV and minimal-versions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install MSRV toolchain | ||
run: rustup toolchain install $MSRV --no-self-update --profile=minimal | ||
|
||
- name: Install nightly toolchain | ||
run: rustup toolchain install nightly --no-self-update --profile=minimal | ||
|
||
- name: Install cargo-hack | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-hack | ||
|
||
# -Z avoid-dev-deps doesn't work | ||
- run: cargo +nightly hack generate-lockfile --remove-dev-deps -Z minimal-versions --offline | ||
|
||
- name: Test all features | ||
run: cargo +$MSRV check --all-features --workspace | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install cargo-nextest and cargo-llvm-cov | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-nextest,cargo-llvm-cov | ||
|
||
- name: Default test | ||
# Our intention here is to test `naga` with no features enabled. But | ||
# since `cli` is the default package, a plain `cargo test` will build | ||
# `naga` with the features requested in `cli/Cargo.toml`. Passing | ||
# `--package naga` causes us to use the default features in the | ||
# top-level `Cargo.toml` instead. | ||
run: cargo nextest run --package naga | ||
|
||
- name: Test all features | ||
run: cargo llvm-cov --lcov --output-path lcov.info nextest --all-features --workspace | ||
|
||
- name: Upload coverage report to codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: lcov.info | ||
|
||
- name: Check snapshots | ||
run: git diff --exit-code -- tests/out | ||
|
||
check: | ||
name: Check benchmarks and naga-fuzz | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Check benchmarks | ||
run: cargo check --benches | ||
|
||
- name: Check naga-fuzz | ||
run: | | ||
cd fuzz | ||
cargo check | ||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: rustup component add clippy | ||
|
||
- run: cargo clippy --all-features --workspace -- -D warnings | ||
|
||
documentation: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTDOCFLAGS: -Dwarnings | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: cargo doc -p naga --all-features --document-private-items | ||
|
||
fmt: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: cargo fmt -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.