Skip to content

Commit

Permalink
ci/win32: use ccache
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 committed May 12, 2024
1 parent d52e959 commit 10798e5
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -103,13 +106,25 @@ 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: |
git clone https://github.com/kasper93/meson --depth 1 -b 8981
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: |
Expand Down

0 comments on commit 10798e5

Please sign in to comment.