diff --git a/.github/workflows/enzyme-ci.yml b/.github/workflows/enzyme-ci.yml index aa41b18cf1dff..68aa21e0b8220 100644 --- a/.github/workflows/enzyme-ci.yml +++ b/.github/workflows/enzyme-ci.yml @@ -45,7 +45,7 @@ jobs: with: path: build/build/x86_64-unknown-linux-gnu/enzyme key: ${{ matrix.os }}-enzyme-${{ steps.enzyme-commit.outputs.HEAD }} - - name: Cache random garbage + - name: Cache bootstrap artifacts uses: actions/cache@v4 with: path: | @@ -53,9 +53,11 @@ jobs: build/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/ build/build/x86_64-unknown-linux-gnu/stage0-tools/ build/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/ - key: random-cache-${{ runner.os }}-${{ github.run_id }} + # Approximate stable hash. It doesn't matter too much when this goes out of sync as it just caches + # some stage0/stage1 dependencies and stdlibs which *hopefully* are hash-keyed. + key: enzyme-rust-bootstrap-${{ runner.os }}-${{ hashFiles('src/**/Cargo.lock') }} restore-keys: | - random-cache-${{ runner.os }} + enzyme-rust-bootstrap-${{ runner.os }} - name: Build run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -