Skip to content

Commit af4d766

Browse files
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.
1 parent b5a3130 commit af4d766

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/enzyme-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ jobs:
2424
- name: Checkout Rust source
2525
uses: actions/checkout@v4
2626
with:
27+
submodules: true # check out all submodules so the cache can work correctly
2728
fetch-depth: 2
2829
- uses: dtolnay/rust-toolchain@nightly
2930
- name: Get LLVM commit hash
3031
id: llvm-commit
31-
run: echo "HEAD=$(git -C src/llvm-project rev-parse HEAD)" >> $GITHUB_OUTPUT
32+
run: echo "HEAD=$(git rev-parse HEAD:src/llvm-project)" >> $GITHUB_OUTPUT
3233
- name: Cache LLVM
3334
id: cache-llvm
3435
uses: actions/cache@v4
@@ -37,7 +38,7 @@ jobs:
3738
key: ${{ matrix.os }}-llvm-${{ steps.llvm-commit.outputs.HEAD }}
3839
- name: Get Enzyme commit hash
3940
id: enzyme-commit
40-
run: echo "HEAD=$(git -C src/tools/enzyme rev-parse HEAD)" >> $GITHUB_OUTPUT
41+
run: echo "HEAD=$(git rev-parse HEAD:src/tools/enzyme)" >> $GITHUB_OUTPUT
4142
- name: Cache Enzyme
4243
id: cache-enzyme
4344
uses: actions/cache@v4

0 commit comments

Comments
 (0)