From de5e9343978f7e906241755311badaccd4d290f6 Mon Sep 17 00:00:00 2001 From: Philip Salzmann Date: Mon, 17 Jul 2023 17:19:37 +0200 Subject: [PATCH] CI: Set ccache directory explicitly ccache uses various rules to determine the cache directory, which may result in different CI containers having different paths. Specify as absolute path instead of using "~", as that seems to be interpreted differently by cache action and ccache. --- .github/workflows/cts_ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index a2359d0b8..71accf0b6 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -143,24 +143,28 @@ jobs: - name: Set up ccache uses: actions/cache@v3 with: - path: ~/.ccache + path: ${{ env.container-workspace }}/.ccache key: ${{ matrix.sycl-impl }}-ccache-${{ github.sha }} restore-keys: | ${{ matrix.sycl-impl }}-ccache- # Use ccache's "depend mode" to work around DPC++ issue (see https://github.com/intel/llvm/issues/5260) # This requires compilation with -MD, which is enabled because we use the Ninja generator # Using this mode should not have any practical disadvantages + - name: Set ccache environment variables + run: | + echo "CCACHE_DEPEND=1" >> "$GITHUB_ENV" + echo "CCACHE_DIR=${{ env.container-workspace }}/.ccache" >> "$GITHUB_ENV" - name: Build 'oclmath' working-directory: ${{ env.container-workspace }}/build - run: CCACHE_DEPEND=1 cmake --build . --target oclmath + run: cmake --build . --target oclmath - name: Build 'util' working-directory: ${{ env.container-workspace }}/build - run: CCACHE_DEPEND=1 cmake --build . --target util + run: cmake --build . --target util - name: Build all supported test categories working-directory: ${{ env.container-workspace }}/build run: | TS_BEFORE=$(date +%s) - CCACHE_DEPEND=1 cmake --build . --target test_all --parallel ${{ env.parallel-build-jobs }} + cmake --build . --target test_all --parallel ${{ env.parallel-build-jobs }} TS_AFTER=$(date +%s) ELAPSED=$(($TS_AFTER - $TS_BEFORE)) sort --numeric-sort --reverse --output=build_times.log build_times.log