From ceb45c8bf0b46813f113e0afb9aae83a9c8a5a55 Mon Sep 17 00:00:00 2001 From: Simon Marty Date: Thu, 2 Apr 2026 15:03:22 -0700 Subject: [PATCH 1/5] Remove actions-rs/toolchain, cache dependencies --- .github/workflows/rust.yml | 44 +++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8c06f15..1bc48cd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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: 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: Use nightly + run: rustup override set nightly + - 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 @@ -41,10 +54,10 @@ jobs: uses: actions/setup-go@v6 with: go-version: "stable" + - name: Checkout + uses: actions/checkout@v6 - 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 @@ -61,3 +74,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') }} From 94b6003166f05ffca0fd63d6bfc8d4c8886ddfdb Mon Sep 17 00:00:00 2001 From: Simon Marty Date: Thu, 2 Apr 2026 16:12:14 -0700 Subject: [PATCH 2/5] Checkout first --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1bc48cd..fbc2dd1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,6 +22,8 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: + - name: Checkout + uses: actions/checkout@v6 - name: Restore cached dependencies uses: actions/cache/restore@v5 id: cache-restore @@ -54,8 +56,6 @@ jobs: uses: actions/setup-go@v6 with: go-version: "stable" - - name: Checkout - uses: actions/checkout@v6 - name: Check licenses run: cargo-deny check licenses - name: Build From f94a0830af1ec38e66782fe7a2d5a8bdc131f96a Mon Sep 17 00:00:00 2001 From: Simon Marty Date: Fri, 3 Apr 2026 14:16:37 -0700 Subject: [PATCH 3/5] Matrix on nightly/stable --- .github/workflows/rust.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fbc2dd1..828280c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,6 +20,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] + toolchain: [stable, nightly] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -35,8 +36,8 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Use nightly - run: rustup override set nightly + - name: Use Rust ${{ matrix.toolchain }} + run: rustup override set ${{ matrix.toolchain }} - name: Rustup version run: rustup --version - name: Install Rust components From 59b3367da252326f0de468d23674a8353d90ae46 Mon Sep 17 00:00:00 2001 From: Simon Marty Date: Fri, 3 Apr 2026 14:25:34 -0700 Subject: [PATCH 4/5] Use stable --- .github/workflows/rust.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 828280c..c97650d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,7 +20,6 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - toolchain: [stable, nightly] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -36,8 +35,8 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Use Rust ${{ matrix.toolchain }} - run: rustup override set ${{ matrix.toolchain }} + - name: Use Rust stable + run: rustup override set stable - name: Rustup version run: rustup --version - name: Install Rust components From 8a9e03646f3707047374275dc2c552fdb931a3db Mon Sep 17 00:00:00 2001 From: Simon Marty Date: Fri, 3 Apr 2026 14:27:47 -0700 Subject: [PATCH 5/5] Remove override entirely --- .github/workflows/rust.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c97650d..1cb508d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -35,8 +35,6 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Use Rust stable - run: rustup override set stable - name: Rustup version run: rustup --version - name: Install Rust components