Skip to content

Commit

Permalink
chore: Use correct commit hash as github cache key if submodule is no…
Browse files Browse the repository at this point in the history
…t 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.
  • Loading branch information
I-Al-Istannen authored Apr 7, 2024
1 parent b5a3130 commit af4d766
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/enzyme-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit af4d766

Please sign in to comment.