Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
* Use the audit-check github action for cargo update. (It seems the
  ubuntu 24.04 runner image no longer includes cargo audit.)
* Include rust version in cache key.
  • Loading branch information
andyleiserson committed Jan 13, 2025
1 parent a649118 commit 67c7242
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 7 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- uses: ./.github/actions/rm

- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
components: clippy,rustfmt

Expand All @@ -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 }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: Check formatting
run: cargo fmt --all -- --check --config "imports_granularity=Crate,group_imports=StdExternalCrate"
Expand Down Expand Up @@ -86,6 +87,7 @@ jobs:
- uses: ./.github/actions/rm

- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
components: clippy,rustfmt

Expand All @@ -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 }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: Release Build
run: cargo build --release
Expand All @@ -120,6 +122,7 @@ jobs:
- uses: ./.github/actions/rm

- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
components: clippy,rustfmt

Expand All @@ -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 }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: Build benchmarks
run: cargo build --benches --no-default-features --features "enable-benches compact-gate"
Expand Down Expand Up @@ -170,7 +173,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-${{ steps.rust-toolchain.outputs.cachekey }}-cargo-${{ 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
Expand Down

0 comments on commit 67c7242

Please sign in to comment.