diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index d44e9c08..b5fbf54e 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -12,6 +12,9 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install cargo-hack run: cargo install cargo-hack - name: Build one feature at a time diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 8bf1a619..cf35b3c9 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -13,6 +13,9 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install cargo-fuzz run: cargo install cargo-fuzz - name: Rust Fmt on fuzz targets diff --git a/.github/workflows/native_build.yml b/.github/workflows/native_build.yml index 676f3baa..7d46bc25 100644 --- a/.github/workflows/native_build.yml +++ b/.github/workflows/native_build.yml @@ -18,6 +18,8 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - uses: ilammy/setup-nasm@v1 if: runner.os == 'Windows' - run: | @@ -50,6 +52,8 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - uses: ilammy/setup-nasm@v1 if: runner.os == 'Windows' - run: | @@ -73,6 +77,8 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Rust Fmt run: cargo fmt --all -- --check - name: Clippy Full RFC Compliance @@ -85,6 +91,8 @@ jobs: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Setup code coverage run: cargo install cargo-llvm-cov - name: Run code coverage diff --git a/.github/workflows/no_std_build.yml b/.github/workflows/no_std_build.yml index fbcc2ff5..2179ae12 100644 --- a/.github/workflows/no_std_build.yml +++ b/.github/workflows/no_std_build.yml @@ -12,6 +12,9 @@ jobs: with: targets: thumbv6m-none-eabi components: clippy + - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Clippy run: cargo +stable clippy --no-default-features -p mls-rs -- -D warnings - name: Test @@ -22,5 +25,5 @@ jobs: run: cargo +nightly build --package mls-rs --lib --no-default-features --target thumbv6m-none-eabi - name: Build MLS Embedded Full RFC Compliance run: cargo +nightly build --package mls-rs --lib --no-default-features --features rfc_compliant --target thumbv6m-none-eabi - - name: Build rust crypto embedded + - name: Build rust crypto embedded run: cargo +nightly build --package mls-rs-crypto-rustcrypto --no-default-features --target thumbv6m-none-eabi