diff --git a/.github/workflows/build-and-test-linux.yaml b/.github/workflows/build-and-test-linux.yaml index d4474be9e..39b739968 100644 --- a/.github/workflows/build-and-test-linux.yaml +++ b/.github/workflows/build-and-test-linux.yaml @@ -74,11 +74,15 @@ jobs: ninja-build \ wayland-protocols - name: Install sccache + working-directory: /home/runner run: | curl -s -L "https://github.com/mozilla/sccache/releases/download/v${{ env.SCCACHE_VERSION }}/sccache-v${{ env.SCCACHE_VERSION }}-x86_64-unknown-linux-musl.tar.gz" \ | tar xvz -C . chmod +x "sccache-v${{ env.SCCACHE_VERSION }}-x86_64-unknown-linux-musl/sccache" sudo cp "sccache-v${{ env.SCCACHE_VERSION }}-x86_64-unknown-linux-musl/sccache" "/bin/sccache" + rm -rf "sccache-v${{ env.SCCACHE_VERSION }}-x86_64-unknown-linux-musl" + mkdir .sccache + echo "SCCACHE_DIR=$PWD/.sccache" >> $GITHUB_ENV - name: Install clang and libc++ if: matrix.compiler == 'clang' run: | @@ -94,11 +98,12 @@ jobs: g++ - name: Checkout uses: actions/checkout@v4 - - name: Load compiler cache + - name: Load cached compilation artifacts + id: compiler-cache uses: actions/cache@v4 with: - path: "$HOME/.cache/sccache" - key: sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}-${{ matrix.compiler }} + path: "${{ env.SCCACHE_DIR }}" + key: sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}-${{ matrix.compiler }}-${{ github.ref }} - name: Configure with CMake run: | set -x # show the commands we're running @@ -142,6 +147,11 @@ jobs: -DMAINTAINER_MODE=ON - name: Compile run: cmake --build build + - name: WHYYY IS CACHE FAILING + run: | + ls /home/runner + echo AND THEN + ls ${{ env.SCCACHE_DIR }} - name: Test working-directory: build run: ctest --output-on-failure diff --git a/cmake/CCache.cmake b/cmake/CCache.cmake index df1ca609a..0b2ccebcc 100644 --- a/cmake/CCache.cmake +++ b/cmake/CCache.cmake @@ -5,12 +5,12 @@ endif() find_program(CCACHE_COMMAND sccache) if(CCACHE_COMMAND) mark_as_advanced(CCACHE_COMMAND) - message(NOTICE "Using sccache; disable with '-DUSE_CCACHE=OFF'") + message(STATUS "Using sccache; disable with '-DUSE_CCACHE=OFF'") else() find_program(CCACHE_COMMAND ccache) if(CCACHE_COMMAND) mark_as_advanced(CCACHE_COMMAND) - message(NOTICE "Using ccache; disable with '-DUSE_CCACHE=OFF'") + message(STATUS "Using ccache; disable with '-DUSE_CCACHE=OFF'") else() message(WARNING "Neither sccache nor ccache found") return()