diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4018cea..92b5702 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,3 @@ -# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md -# -# While our "example" application has the platform-specific code, -# for simplicity we are compiling and testing everything on the Ubuntu environment only. -# For multi-OS testing see the `cross.yml` workflow. - on: [push, pull_request] name: Build @@ -16,103 +10,41 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Run cargo check - uses: actions-rs/cargo@v1 - with: - command: check + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo check --workspace test: name: Test Suite runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo test --workspace unstable: name: Test Suite (unstable) runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install nightly toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - - - name: Run cargo test --features unstable - uses: actions-rs/cargo@v1 - with: - command: test - args: --features unstable + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - run: cargo test --workspace --features unstable very_unstable: name: Test Suite (very_unstable) runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install nightly toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - - - name: Run cargo test --features very_unstable - uses: actions-rs/cargo@v1 - with: - command: test - args: --features very_unstable - + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - run: cargo test --workspace --features very_unstable lints: name: Lints runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt, clippy - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - - name: Run cargo clippy - uses: actions-rs/cargo@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - command: clippy + components: clippy, rustfmt + - run: cargo fmt --all --check + - run: cargo clippy --workspace