Skip to content

Commit

Permalink
Allow to update caches used by Github workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-rapp committed Nov 12, 2023
1 parent 1355d94 commit 5e22b6e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
uses: actions/cache/restore@v3
with:
path: .git/
key: test-build-cache-git
key: test-build-cache-git-${{ github.run_id }}
restore-keys: test-build-cache-git
- name: Checkout
uses: actions/checkout@v4
- name: Detect changes
Expand Down Expand Up @@ -60,7 +61,8 @@ jobs:
if: success() || failure()
with:
path: .git/
key: test-build-cache-git
key: test-build-cache-git-${{ github.run_id }}
restore-keys: test-build-cache-git
linux_build:
needs: changes
if: ${{ needs.changes.outputs.any == 'true' }}
Expand All @@ -71,7 +73,8 @@ jobs:
uses: actions/cache/restore@v3
with:
path: .git/
key: test-build-cache-git
key: test-build-cache-git-${{ github.run_id }}
restore-keys: test-build-cache-git
- name: Checkout
uses: actions/checkout@v4
- name: Install OpenCL
Expand All @@ -94,7 +97,8 @@ jobs:
- doc/_build/
- doc/_extra/
- doc/development/api/python/
key: ${{ runner.os }}-test-build-cache-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files-${{ github.run_id }}
restore-keys: ${{ runner.os }}-test-build-cache-tmp-files
- name: Test C++ code
if: ${{ needs.changes.outputs.cpp_tests == 'true' }}
run: ./build tests_cpp
Expand Down Expand Up @@ -131,7 +135,8 @@ jobs:
- doc/_build/
- doc/_extra/
- doc/development/api/python/
key: ${{ runner.os }}-test-build-cache-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files-${{ github.run_id }}
restore-keys: ${{ runner.os }}-test-build-cache-tmp-files
macos_build:
needs: changes
if: ${{ needs.changes.outputs.cpp == 'true' }}
Expand All @@ -142,7 +147,8 @@ jobs:
uses: actions/cache/restore@v3
with:
path: .git/
key: test-build-cache-git
key: test-build-cache-git-${{ github.run_id }}
restore-keys: test-build-cache-git
- name: Checkout
uses: actions/checkout@v4
- name: Install OpenMP
Expand All @@ -158,7 +164,8 @@ jobs:
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-cache-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files-${{ github.run_id }}
restore-keys: ${{ runner.os }}-test-build-cache-tmp-files
- name: Compile via Clang
run: TEST_SUPPORT=disabled CPLUS_INCLUDE_PATH=/usr/local/opt/opencl-clhpp-headers/include ./build compile
- name: Save build files to cache
Expand All @@ -169,7 +176,8 @@ jobs:
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-cache-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files-${{ github.run_id }}
restore-keys: ${{ runner.os }}-test-build-cache-tmp-files
windows_build:
needs: changes
if: ${{ needs.changes.outputs.cpp == 'true' }}
Expand All @@ -181,7 +189,8 @@ jobs:
with:
enableCrossOsArchive: true
path: .git/
key: test-build-cache-git
key: test-build-cache-git-${{ github.run_id }}
restore-keys: test-build-cache-git
- name: Checkout
uses: actions/checkout@v4
- name: Prepare MSVC
Expand All @@ -203,7 +212,8 @@ jobs:
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-cache-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files-${{ github.run_id }}
restore-keys: ${{ runner.os }}-test-build-cache-tmp-files
- name: Compile via MSVC
run: |
$env:TEST_SUPPORT = "disabled"
Expand All @@ -218,4 +228,5 @@ jobs:
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-cache-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files-${{ github.run_id }}
restore-keys: ${{ runner.os }}-test-build-cache-tmp-files
12 changes: 8 additions & 4 deletions .github/workflows/test_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
uses: actions/cache/restore@v3
with:
path: .git/
key: test-format-cache-git
key: test-format-cache-git-${{ github.run_id }}
restore-keys: test-format-cache-git
- name: Checkout
uses: actions/checkout@v4
- name: Detect changes
Expand Down Expand Up @@ -49,7 +50,8 @@ jobs:
path: |
- venv/
- scons/build/
key: test-format-cache-tmp-files
key: test-format-cache-tmp-files-${{ github.run_id }}
restore-keys: test-format-cache-tmp-files
- name: Check C++ code style
if: steps.filter.outputs.cpp == 'true'
run: ./build test_format_cpp
Expand All @@ -63,10 +65,12 @@ jobs:
path: |
- venv/
- scons/build/
key: test-format-cache-tmp-files
key: test-format-cache-tmp-files-${{ github.run_id }}
restore-keys: test-format-cache-tmp-files
- name: Save Git repository to cache
uses: actions/cache/save@v3
if: success() || failure()
with:
path: .git/
key: test-format-cache-git
key: test-format-cache-git-${{ github.run_id }}
restore-keys: test-format-cache-git

0 comments on commit 5e22b6e

Please sign in to comment.