From bc1128819819b32e92b30ecdda1a305bee1ba0d9 Mon Sep 17 00:00:00 2001 From: Christopher Berner Date: Thu, 21 Nov 2024 21:02:30 -0800 Subject: [PATCH] Updates to CI config --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 629dce65..5eecc217 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,14 +16,28 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Cache + id: rust-cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} + - name: Install packages run: | sudo apt update sudo apt install -y ${{ matrix.libfuse }} build-essential - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - target: x86_64-unknown-linux-musl + - name: Install Rust + #if: steps.rust-cache.outputs.cache-hit != 'true' + run: | + rustup target add x86_64-unknown-linux-musl - name: Run tests run: | @@ -36,18 +50,34 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + + - name: Cache + id: rust-cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} + - name: Install packages run: | sudo apt update sudo apt install -y libfuse-dev libfuse3-dev build-essential - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: rustfmt, clippy + - name: Install Rust + #if: steps.rust-cache.outputs.cache-hit != 'true' + run: | + rustup toolchain install 1.81 + rustup component add rustfmt + rustup component add clippy - - uses: taiki-e/install-action@v2 - with: - tool: cargo-deny@0.14 + - name: Install cargo-deny + #if: steps.rust-cache.outputs.cache-hit != 'true' + run: cargo +1.81 install --force --version 0.16.2 cargo-deny --locked - name: Run tests run: INTERACTIVE="" make pre