Skip to content

Commit

Permalink
Rename cache keys 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 d8e6a55 commit 795512a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: .git/
key: test-build-git
key: test-build-cache-git
- name: Checkout
uses: actions/checkout@v4
with:
path: .
- name: Detect changes
uses: dorny/paths-filter@v2
id: filter
Expand Down Expand Up @@ -62,7 +60,7 @@ jobs:
if: success() || failure()
with:
path: .git/
key: test-build-git
key: test-build-cache-git
linux_build:
needs: changes
if: ${{ needs.changes.outputs.any == 'true' }}
Expand All @@ -73,11 +71,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: .git/
key: test-build-git
key: test-build-cache-git
- name: Checkout
uses: actions/checkout@v4
with:
path: .
- name: Install OpenCL
run: |
sudo apt update
Expand All @@ -98,7 +94,7 @@ jobs:
- doc/_build/
- doc/_extra/
- doc/development/api/python/
key: ${{ runner.os }}-test-build-tmp-files
key: ${{ 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 @@ -135,7 +131,7 @@ jobs:
- doc/_build/
- doc/_extra/
- doc/development/api/python/
key: ${{ runner.os }}-test-build-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files
macos_build:
needs: changes
if: ${{ needs.changes.outputs.cpp == 'true' }}
Expand All @@ -146,11 +142,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: .git/
key: test-build-git
key: test-build-cache-git
- name: Checkout
uses: actions/checkout@v4
with:
path: .
- name: Install OpenMP
run: |
brew install libomp
Expand All @@ -164,7 +158,7 @@ jobs:
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-tmp-files
key: ${{ 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 @@ -175,7 +169,7 @@ jobs:
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files
windows_build:
needs: changes
if: ${{ needs.changes.outputs.cpp == 'true' }}
Expand All @@ -187,11 +181,9 @@ jobs:
with:
enableCrossOsArchive: true
path: .git/
key: test-build-git
key: test-build-cache-git
- name: Checkout
uses: actions/checkout@v4
with:
path: .
- name: Prepare MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Remove conflicting link.exe
Expand All @@ -211,7 +203,7 @@ jobs:
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files
- name: Compile via MSVC
run: |
$env:TEST_SUPPORT = "disabled"
Expand All @@ -226,4 +218,4 @@ jobs:
- venv/
- scons/build/
- cpp/build/
key: ${{ runner.os }}-test-build-tmp-files
key: ${{ runner.os }}-test-build-cache-tmp-files
10 changes: 4 additions & 6 deletions .github/workflows/test_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: .git/
key: test-format-git
key: test-format-cache-git
- name: Checkout
uses: actions/checkout@v4
with:
path: .
- name: Detect changes
uses: dorny/paths-filter@v2
id: filter
Expand All @@ -51,7 +49,7 @@ jobs:
path: |
- venv/
- scons/build/
key: test-format-tmp-files
key: test-format-cache-tmp-files
- name: Check C++ code style
if: steps.filter.outputs.cpp == 'true'
run: ./build test_format_cpp
Expand All @@ -65,10 +63,10 @@ jobs:
path: |
- venv/
- scons/build/
key: test-format-tmp-files
key: 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-git
key: test-format-cache-git

0 comments on commit 795512a

Please sign in to comment.