Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 32 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,27 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions-rs/toolchain@v1
- name: Checkout
uses: actions/checkout@v6
- name: Restore cached dependencies
uses: actions/cache/restore@v5
id: cache-restore
with:
toolchain: nightly
override: true
components: rustfmt, clippy, llvm-tools-preview
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Rustup version
run: rustup --version
- name: Install Rust components
run: rustup component add llvm-tools clippy rustfmt cargo
- name: Install Cargo binaries
run: |
which cargo-llvm-cov || cargo install cargo-llvm-cov
which cargo-deny || cargo install cargo-deny
- name: Install ninja-build tool for aws-lc-fips-sys on Windows
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-ninja@v6
Expand All @@ -42,9 +55,7 @@ jobs:
with:
go-version: "stable"
- name: Check licenses
run: |
cargo install cargo-deny
cargo-deny check licenses
run: cargo-deny check licenses
- name: Build
run: cargo build --verbose
- name: Run tests
Expand All @@ -61,3 +72,14 @@ jobs:
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features
- name: Cache dependencies
uses: actions/cache/save@v5
if: steps.cache-restore.outputs.cache-hit != 'true'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
Loading