Cache CI test run compilations

This commit is contained in:
Stefan Ceriu
2026-08-18 12:50:32 +03:00
parent 5f49c25952
commit 771d10ac6b
3 changed files with 36 additions and 0 deletions
+15
View File
@@ -29,9 +29,24 @@ jobs:
- name: Setup environment
run: source ci_scripts/ci_common.sh && setup_github_actions_environment
- name: Restore compilation cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/Library/Developer/Xcode/CompilationCache.noindex
key: compilation-cache-unit-tests-${{ github.sha }}
restore-keys: compilation-cache-unit-tests-
- name: Run tests
run: swift run -q tools ci unit-tests
- name: Save compilation cache
# Only develop populates the cache, all of the other runs simply read from it.
if: ${{ !cancelled() && github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/Library/Developer/Xcode/CompilationCache.noindex
key: compilation-cache-unit-tests-${{ github.sha }}
- name: Archive artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
# We only care about artefacts if the tests fail