diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/linting.yml | 28 | ||||
| -rw-r--r-- | .github/workflows/testing.yml | 22 |
2 files changed, 42 insertions, 8 deletions
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 685b93a..473f58f 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -6,7 +6,8 @@ jobs: name: Dependency linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - run: rm rust-toolchain.toml - uses: EmbarkStudios/cargo-deny-action@v1 with: arguments: --all-features @@ -15,19 +16,36 @@ jobs: name: Code linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - run: rm rust-toolchain.toml + + # Cache files like by target directory + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-rustc-nightly-2023-06-19-cargo-${{ hashFiles('**/Cargo.lock') }}-linting + + # Prepare toolchain related stuff - uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly + toolchain: nightly-2023-06-19 components: clippy, rust-src + - uses: KyleMayes/install-llvm-action@v1 + with: + version: "15.0" + - run: cargo clippy --all-features -- --deny warnings code-format: name: Check formatting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - run: rm rust-toolchain.toml - uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly + toolchain: nightly-2023-06-19 components: rustfmt, rust-src - run: cargo fmt -- --check diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e4994ea..ad93c36 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -8,16 +8,32 @@ jobs: matrix: os: - ubuntu - - windows - macos rust: - stable - - nightly + - nightly-2023-06-19 name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }} runs-on: ${{ matrix.os }}-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - run: rm rust-toolchain.toml + + # Cache files like by target directory + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + # Prepare toolchain related stuff - uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} + - uses: KyleMayes/install-llvm-action@v1 + with: + version: "15.0" + + - run: cargo build --all-features - run: cargo test --all-features --no-fail-fast |
