diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 68121cdf3e..4fbb771280 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -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 @@ -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' }} @@ -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 @@ -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 @@ -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' }} @@ -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 @@ -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 @@ -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' }} @@ -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 @@ -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" @@ -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 diff --git a/.github/workflows/test_format.yml b/.github/workflows/test_format.yml index fd78adc17c..6e48d9f3fc 100644 --- a/.github/workflows/test_format.yml +++ b/.github/workflows/test_format.yml @@ -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 @@ -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 @@ -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