diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 62ce81871c96..6ec18ca1447e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Rust toolchain - run: ./ci/install-rust.sh - name: Check style run: ./ci/style.sh @@ -43,8 +42,20 @@ jobs: - uses: actions/checkout@v4 - name: Setup Rust toolchain run: ./ci/install-rust.sh + + # FIXME(ci): These `du` statements are temporary for debugging cache + - name: Target size before restoring cache + run: du -sh target | sort -k 2 || true + - uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.os }}-${{ matrix.toolchain }} + - name: Target size after restoring cache + run: du -sh target | sort -k 2 || true + - name: Execute build.sh run: ./ci/verify-build.sh + - name: Target size after job completion + run: du -sh target | sort -k 2 test_tier1: name: Test tier1 @@ -81,6 +92,9 @@ jobs: - uses: actions/checkout@v4 - name: Setup Rust toolchain run: ./ci/install-rust.sh + - uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.target }} - name: Run natively if: "!matrix.docker" run: ./ci/run.sh ${{ matrix.target }} @@ -132,6 +146,9 @@ jobs: - uses: actions/checkout@v4 - name: Setup Rust toolchain run: ./ci/install-rust.sh + - uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.target }} - name: Execute run-docker.sh run: ./ci/run-docker.sh ${{ matrix.target }}