From af4d7660895557179b88c845a5cc9776ab069b1f Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Sun, 7 Apr 2024 14:22:16 +0200 Subject: [PATCH] chore: Use correct commit hash as github cache key if submodule is not checked out (#107) * chore: Use correct commit hash as github cache key * chore: Clone with submodules This will also initialize all the "doc" submodules, which might prove too much. --- .github/workflows/enzyme-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/enzyme-ci.yml b/.github/workflows/enzyme-ci.yml index c233b049e1d6d..a08267fcdb725 100644 --- a/.github/workflows/enzyme-ci.yml +++ b/.github/workflows/enzyme-ci.yml @@ -24,11 +24,12 @@ jobs: - name: Checkout Rust source uses: actions/checkout@v4 with: + submodules: true # check out all submodules so the cache can work correctly fetch-depth: 2 - uses: dtolnay/rust-toolchain@nightly - name: Get LLVM commit hash id: llvm-commit - run: echo "HEAD=$(git -C src/llvm-project rev-parse HEAD)" >> $GITHUB_OUTPUT + run: echo "HEAD=$(git rev-parse HEAD:src/llvm-project)" >> $GITHUB_OUTPUT - name: Cache LLVM id: cache-llvm uses: actions/cache@v4 @@ -37,7 +38,7 @@ jobs: key: ${{ matrix.os }}-llvm-${{ steps.llvm-commit.outputs.HEAD }} - name: Get Enzyme commit hash id: enzyme-commit - run: echo "HEAD=$(git -C src/tools/enzyme rev-parse HEAD)" >> $GITHUB_OUTPUT + run: echo "HEAD=$(git rev-parse HEAD:src/tools/enzyme)" >> $GITHUB_OUTPUT - name: Cache Enzyme id: cache-enzyme uses: actions/cache@v4