mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
108 lines
3.1 KiB
YAML
108 lines
3.1 KiB
YAML
# Regular testing.
|
|
name: pipeline
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test-msrv:
|
|
name: Test MSRV
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: "1.43.0"
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
name: Downgrade bitflags to MSRV
|
|
with:
|
|
command: update
|
|
args: -p bitflags --precise 1.2.1
|
|
- uses: actions-rs/cargo@v1
|
|
name: Downgrade indexmap to MSRV
|
|
with:
|
|
command: update
|
|
args: -p indexmap --precise 1.6.2
|
|
- uses: actions-rs/cargo@v1
|
|
name: Test all features
|
|
with:
|
|
# `cli` already enables most features, so let's add the rest,
|
|
# except for `arbitrary`, which requires Rust-1.51
|
|
command: test
|
|
args: --workspace --features serialize,deserialize
|
|
- name: Check snapshots
|
|
run: git diff --exit-code -- tests/out
|
|
test:
|
|
name: Test Nightly
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
name: Default test
|
|
with:
|
|
# 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.
|
|
command: test
|
|
args: --package naga
|
|
- uses: actions-rs/cargo@v1
|
|
name: Test all features
|
|
with:
|
|
command: test
|
|
args: --all-features --workspace
|
|
- name: Check snapshots
|
|
run: git diff --exit-code -- tests/out
|
|
clippy:
|
|
name: Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- run: rustup component add clippy
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all-features --workspace -- -D warnings
|
|
documentation:
|
|
name: Documentation
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUSTDOCFLAGS: -Dwarnings
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- run: rustup component add clippy
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: doc
|
|
args: -p naga --all-features --document-private-items
|
|
fmt:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt
|
|
- name: run rustfmt
|
|
run: |
|
|
cargo fmt -- --check
|