Skip to content

Commit

Permalink
Update GitHub Actions CI (#183)
Browse files Browse the repository at this point in the history
The following updates are performed:
* update actions/cache to v3
* update actions/checkout to v3
* replace unmaintained actions-rs/toolchain by dtolnay/rust-toolchain
* replace unmaintained actions-rs/cargo by direct invocation of cargo
  • Loading branch information
striezel authored Jul 10, 2023
1 parent 22bf74a commit ecd0ab0
Showing 1 changed file with 20 additions and 45 deletions.
65 changes: 20 additions & 45 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@ jobs:
name: Formatter check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check

clippy:
name: Clippy check
Expand All @@ -33,14 +28,12 @@ jobs:
features:
["", "manage_clipboard", "open_url", "manage_clipboard,open_url"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
Expand All @@ -53,10 +46,7 @@ jobs:
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features --all-targets --features=${{ matrix.features }} -- -D warnings
- run: cargo clippy --no-default-features --all-targets --features=${{ matrix.features }} -- -D warnings

clippy_wasm32:
name: Clippy check (wasm32)
Expand All @@ -74,15 +64,13 @@ jobs:
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
components: clippy
target: wasm32-unknown-unknown
- uses: actions/cache@v2
targets: wasm32-unknown-unknown
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
Expand All @@ -92,22 +80,17 @@ jobs:
restore-keys: |
cache-wasm32-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-wasm32-cargo
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features --target=wasm32-unknown-unknown --all-targets --features=${{ matrix.features }} -- -D warnings
- run: cargo clippy --no-default-features --target=wasm32-unknown-unknown --all-targets --features=${{ matrix.features }} -- -D warnings

doc:
name: Check documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
Expand All @@ -117,24 +100,19 @@ jobs:
restore-keys: |
cache-doc-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-doc-cargo
- uses: actions-rs/cargo@v1
with:
command: doc
args: --all --features "bevy/x11"
- run: cargo doc --all --features "bevy/x11"
env:
RUSTDOCFLAGS: -D warnings

test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
Expand All @@ -146,7 +124,4 @@ jobs:
cache-test-cargo
- name: Install dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- uses: actions-rs/cargo@v1
with:
command: test
args: --all
- run: cargo test --all

0 comments on commit ecd0ab0

Please sign in to comment.