Skip to content

Commit

Permalink
populating cache before hand only when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamonDinoia committed Jan 28, 2025
1 parent 60583cb commit 8b78202
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/cmake_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,26 @@ jobs:
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
MATRIX=$(python3 ${{ github.workspace }}/.github/workflows/generate_cmake_matrix.py)
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache/save@v4
with:
key: cmake-cache-${{ hashFiles('CMakeLists.txt', 'cmake/**') }}
path: CPM
- name: Checkout code
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
- name: Setup Cpp
if: steps.cache.outputs.cache-hit != 'true'
uses: aminya/setup-cpp@v1
with:
cmake : true
- name: Cache dependencies
uses: actions/cache/save@v4
with:
key: 'default'
path: CPM
- name: Download dependencies in cache
if: steps.cache.outputs.cache-hit != 'true'
run: |
cmake -S . -B ./build
cmake -S . -B ./build -DFINUFFT_USE_DUCC0=ON
env:
CPM_SOURCE_CACHE: CPM
cmake-ci:
runs-on: ${{ matrix.os }}
needs: prepare
Expand All @@ -43,7 +48,7 @@ jobs:
- name: Restore Cache
uses: actions/cache/restore@v4
with:
key: 'default'
key: cmake-cache-${{ hashFiles('CMakeLists.txt', 'cmake/**') }}
path: CPM
enableCrossOsArchive: true
- name: Run sccache-cache only on non-release runs
Expand Down

0 comments on commit 8b78202

Please sign in to comment.