1212 CMAKE_INSTALL_PARALLEL_LEVEL : 4 # `cmake --install` now implies `--parallel 4`.
1313 CMAKE_BUILD_TYPE : Debug # `cmake -S` now implies `-DCMAKE_BUILD_TYPE=Debug`.
1414 CMAKE_CONFIG_TYPE : Debug # `cmake --build` now implies `--config Debug`.
15+
16+ # We instruct CMake to download and build third-party projects outside of our source tree,
17+ # otherwise they can trigger `-Werror=dev` (from the `develop` preset).
18+ DEPS_ROOT_DIR : ~/_deps # Note that this needs to be used in a position where Bash will trigger tilde expansion!
1519
1620jobs :
1721 unix :
2125 cxx : [g++, clang++]
2226 buildsys : [make, cmake]
2327 exclude :
24- # Don't use `g++` on macOS; it's just an alias to `clang++`.
25- - os : macos-14
26- cxx : g++
28+ - {os: macos-14, cxx: g++} # Don't use `g++` on macOS; it's just an alias to `clang++`.
2729 fail-fast : false
2830 runs-on : ${{ matrix.os }}
2931 steps :
6870 tee -a <<<"hash=${hash%-}" $GITHUB_OUTPUT
6971 - name : Check test dependency repositories cache
7072 id : test-deps-cache
71- uses : actions/cache@v4
73+ uses : actions/cache@v5
7274 with :
7375 path : ${{ fromJSON(steps.test-deps-cache-params.outputs.paths) }}
7476 key : ${{ matrix.os }}-${{ steps.test-deps-cache-params.outputs.hash }}
@@ -125,7 +127,7 @@ jobs:
125127 tee -a <<<"hash=${hash%-}" $GITHUB_OUTPUT
126128 - name : Check test dependency repositories cache
127129 id : test-deps-cache
128- uses : actions/cache@v4
130+ uses : actions/cache@v5
129131 with :
130132 path : ${{ fromJSON(steps.test-deps-cache-params.outputs.paths) }}
131133 key : ${{ matrix.os }}-${{ steps.test-deps-cache-params.outputs.hash }}
@@ -159,18 +161,22 @@ jobs:
159161 - name : Checkout repo
160162 uses : actions/checkout@v4
161163 - name : Install deps
162- run : .github/scripts/get_win_deps.ps1
164+ run : bash .github/scripts/install_deps.sh ${{ matrix.os }}
165+ - name : Cache library deps
166+ uses : actions/cache@v5
167+ with :
168+ path : ${{ env.DEPS_ROOT_DIR }}/*-tmp/
169+ key : dep-srcs-${{ hashFiles('cmake/deps.cmake') }}
170+ enableCrossOsArchive : true
163171 - name : Build Windows binaries
164172 shell : bash
165- # We instruct CMake to download and build third-party projects outside of our source tree,
166- # otherwise they can trigger `-Werror=dev` (from the `develop` preset).
167173 run : | # ASan seems to be broken on Windows, so we disable it.
168- cmake -S . -B build --preset develop-msvc${{ matrix.bits }} -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe -DSANITIZERS=OFF
174+ cmake -S . -B build --preset develop-msvc${{ matrix.bits }} -DFETCHCONTENT_BASE_DIR="$(echo "${{ env.DEPS_ROOT_DIR }}")" -DSANITIZERS=OFF
169175 cmake --build build
170- cmake --install build --prefix install_dir --config Debug --verbose
171176 - name : Package binaries
172177 shell : bash
173178 run : |
179+ cmake --install build --prefix install_dir --config Debug --verbose
174180 mkdir bins
175181 cp -v install_dir/bin/{rgb*.exe,*.dll} bins
176182 - name : Upload Windows binaries
@@ -188,7 +194,7 @@ jobs:
188194 tee -a <<<"hash=${hash%-}" $GITHUB_OUTPUT
189195 - name : Check test dependency repositories cache
190196 id : test-deps-cache
191- uses : actions/cache@v4
197+ uses : actions/cache@v5
192198 with :
193199 path : ${{ fromJSON(steps.test-deps-cache-params.outputs.paths) }}
194200 key : ${{ matrix.os }}-${{ matrix.bits }}-${{ steps.test-deps-cache-params.outputs.hash }}
@@ -297,7 +303,7 @@ jobs:
297303 tee -a <<<"hash=${hash%-}" $GITHUB_OUTPUT
298304 - name : Check test dependency repositories cache
299305 id : test-deps-cache
300- uses : actions/cache@v4
306+ uses : actions/cache@v5
301307 with :
302308 path : ${{ fromJSON(steps.test-deps-cache-params.outputs.paths) }}
303309 key : mingw-${{ matrix.bits }}-${{ steps.test-deps-cache-params.outputs.hash }}
0 commit comments