Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ccache in Windows CI #4018

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ansible/roles/visual-studio/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@
version: "4.10.2"
- name: make ccache directory
win_command: 'mkdir C:\ccache'
- name: copy ccache to ccache directory as cl.exe
- name: copy ccache to ccache directory as cl.exe for MSVC
win_command: 'cp C:\ProgramData\chocolatey\lib\ccache\tools\ccache-4.10.2-windows-x86_64\ccache.exe C:\ccache\cl.exe'
- name: copy ccache to ccache directory as clang-cl.exe for ClangCL
win_command: 'cp C:\ProgramData\chocolatey\lib\ccache\tools\ccache-4.10.2-windows-x86_64\ccache.exe C:\ccache\clang-cl.exe'
- name: make directory for caching
win_command: 'mkdir C:\ccache\cache'
- name: set caching directory enviroment variable
Expand Down
2 changes: 1 addition & 1 deletion jenkins/scripts/VersionSelectorScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def buildExclusions = [
[ /vs2019(-\w+)?$/, testType, gte(21) ],
[ /vs2022(-\w+)?$/, testType, lt(21) ],
[ /vs2022-x86$/, testType, gte(23) ], // x86 was dropped on Windows in v23
[ /vs2022_clang(-\w+)?$/, testType, lt(23) ], // ClangCL support was added in v23
[ /vs2022_clang(-\w+)?$/, testType, lt(24) ], // ClangCL support was added in v23
[ /COMPILED_BY-\w+-arm64$/, testType, lt(20) ], // run tests on arm64 for >=19
// VS versions supported to build add-ons
[ /vs2015-COMPILED_BY/, testType, gte(20) ],
Expand Down
5 changes: 5 additions & 0 deletions jenkins/scripts/windows/compile.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ if %not_clang% equ 1 if not defined DISABLE_CLCACHE if exist C:\clcache\dist\clc
C:\clcache\dist\clcache_main\clcache_main.exe -s
)

:: Opt-in for ccache
if %not_clang% equ 0 if defined CCACHE_DIR if not defined DISABLE_CCACHE if exist C:\ccache\cl.exe (
set "VCBUILD_EXTRA_ARGS=%VCBUILD_EXTRA_ARGS% ccache C:\ccache"
)

:: Call vcbuild
if "%nodes:~-6%" == "-arm64" (
:: Building MSI is not yet supported for ARM64 with WiX 3.
Expand Down
Loading