Skip to content

Commit 9321081

Browse files
ansible,win: add ccache (#4016)
1 parent e9dcd9f commit 9321081

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
max_size = 10 GB

ansible/roles/visual-studio/tasks/main.yml

+20
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,23 @@
5656
- name: build clcache
5757
win_shell: '$env:PYTHONPATH = "C:\clcache"; py -3 -m PyInstaller -y pyinstaller/clcache_main.py'
5858
args: { chdir: 'C:\clcache' }
59+
60+
# Install ccache and enable using it with Visual Studio
61+
- block:
62+
- name: install ccache
63+
win_chocolatey:
64+
name: ccache
65+
pinned: yes
66+
version: "4.10.2"
67+
- name: make ccache directory
68+
win_command: 'mkdir C:\ccache'
69+
- name: copy ccache to ccache directory as cl.exe
70+
win_command: 'cp C:\ProgramData\chocolatey\lib\ccache\tools\ccache-4.10.2-windows-x86_64\ccache.exe C:\ccache\cl.exe'
71+
- name: make directory for caching
72+
win_command: 'mkdir C:\ccache\cache'
73+
- name: set caching directory enviroment variable
74+
win_command: 'setx CCACHE_DIR C:\ccache\cache /M'
75+
- name: copy ccache.conf to ccache directory
76+
win_copy:
77+
src: ../files/ccache.conf
78+
dest: C:\ccache\cache\ccache.conf

0 commit comments

Comments
 (0)