Skip to content

Commit 6bd44c0

Browse files
committed
CI: Cache Clang build
1 parent 1814e6b commit 6bd44c0

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
- name: Read submodule commit hashes
2525
id: commits
2626
run: |
27+
C=$(git -C external/llvm-project rev-parse HEAD)
28+
echo "LLVMCOMMIT=$C" >>"$GITHUB_OUTPUT"
2729
C=$(git -C external/FStar rev-parse HEAD)
2830
echo "FSTARCOMMIT=$C" >>"$GITHUB_OUTPUT"
2931
C=$(git -C external/pulse rev-parse HEAD)
@@ -59,10 +61,25 @@ jobs:
5961
sudo ln -s $(which ccache) $HOME/bin/cc1plus
6062
sudo ln -s $(which ccache) $HOME/bin/c++
6163
64+
- name: Try fetch built LLVM/Clang
65+
id: cache-llvm
66+
uses: actions/cache/restore@v4
67+
with:
68+
path: external/llvm-project/build
69+
key: llvm-${{ runner.os }}-${{ runner.arch }}-${{ steps.commits.outputs.LLVMCOMMIT }}
70+
6271
- name: Build LLVM/Clang
72+
if: steps.cache-llvm.outputs.cache-hit != 'true'
6373
run: |
6474
./build_clang.sh
6575
76+
- name: Save built LLVM/Clang
77+
if: steps.cache-llvm.outputs.cache-hit != 'true'
78+
uses: actions/cache/save@v4
79+
with:
80+
path: external/llvm-project/build
81+
key: llvm-${{ runner.os }}-${{ runner.arch }}-${{ steps.commits.outputs.LLVMCOMMIT }}
82+
6683
- name: Try fetch built F*
6784
id: cache-fstar
6885
uses: actions/cache/restore@v4

0 commit comments

Comments
 (0)