diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22d56f70f6de8..d88068a7f2ffa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,11 +90,14 @@ jobs: runs-on: windows-latest env: VS: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise" - CC: "clang" - CXX: "clang++" + CC: "ccache clang" + CXX: "ccache clang++" CC_LD: "lld" CXX_LD: "lld" WINDRES: "llvm-rc" + CCACHE_BASEDIR: ${{ github.workspace }} + CCACHE_DIR: "${{ github.workspace }}\\.ccache" + CCACHE_MAXSIZE: 500M steps: - name: Disable autocrlf run: | @@ -103,6 +106,17 @@ jobs: - uses: actions/checkout@v4 + - name: Get time + id: get_time + run: | + "timestamp=$((Get-Date).Ticks)" >> $env:GITHUB_OUTPUT + + - uses: actions/cache@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: x86_64-windows-msvc-${{ steps.get_time.outputs.timestamp }} + restore-keys: x86_64-windows-msvc- + # https://github.com/mesonbuild/meson/pull/11715 - name: Install dependencies run: | @@ -110,6 +124,7 @@ jobs: python -m pip install build wheel python -m build --wheel --no-isolation meson python -m pip install (Get-Item ./meson/dist/meson-*-py3-none-any.whl).FullName + choco install ccache - name: Update Meson WrapDB run: |