From 837ea3cb528e2eb519f40edd6be49826d4eee432 Mon Sep 17 00:00:00 2001 From: Andy Leiserson Date: Mon, 13 Jan 2025 10:36:13 -0800 Subject: [PATCH] Update workflows --- .github/workflows/audit.yml | 18 +++++++++++++++--- .github/workflows/check.yml | 14 ++++++++++---- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 1a2dc1b76..2b7720c45 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -24,6 +24,18 @@ jobs: steps: - uses: actions/checkout@v4 - - name: cargo audit - run: | - cargo audit + - uses: dtolnay/rust-toolchain@stable + id: rust-toolchain + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-${{ steps.rust-toolchain.outputs.cachekey }}-audit + + - uses: rustsec/audit-check@v1.4.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 99ef7d09f..77f950988 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -35,6 +35,7 @@ jobs: - uses: ./.github/actions/rm - uses: dtolnay/rust-toolchain@stable + id: rust-toolchain with: components: clippy,rustfmt @@ -46,7 +47,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-${{ steps.rust-toolchain.outputs.cachekey }}-stable-${{ hashFiles('**/Cargo.toml') }} - name: Check formatting run: cargo fmt --all -- --check --config "imports_granularity=Crate,group_imports=StdExternalCrate" @@ -86,6 +87,7 @@ jobs: - uses: ./.github/actions/rm - uses: dtolnay/rust-toolchain@stable + id: rust-toolchain with: components: clippy,rustfmt @@ -97,7 +99,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-${{ steps.rust-toolchain.outputs.cachekey }}-stable-${{ hashFiles('**/Cargo.toml') }} - name: Release Build run: cargo build --release @@ -120,6 +122,7 @@ jobs: - uses: ./.github/actions/rm - uses: dtolnay/rust-toolchain@stable + id: rust-toolchain with: components: clippy,rustfmt @@ -131,7 +134,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-${{ steps.rust-toolchain.outputs.cachekey }}-stable-${{ hashFiles('**/Cargo.toml') }} - name: Build benchmarks run: cargo build --benches --no-default-features --features "enable-benches compact-gate" @@ -162,6 +165,9 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/rm - uses: dtolnay/rust-toolchain@stable + id: rust-toolchain + with: + components: clippy,rustfmt - uses: actions/cache@v4 with: path: | @@ -170,7 +176,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-${{ steps.rust-toolchain.outputs.cachekey }}-stable-${{ hashFiles('**/Cargo.toml') }} - name: Slow Unit Tests run: cargo test -p ipa-core --lib -- mpc_proptest semi_honest_with_dp_slow gen_binomial_noise_16_breakdowns