From e9af92c4817d16ae308ec6b2bd0357e2a1b47aed Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 1 Mar 2022 15:26:29 +0100 Subject: [PATCH] add ccache for msbuild --- .gitlab-ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57cc7a70ce..f1178248c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -380,6 +380,7 @@ variables: &tests-targets - New-Item -Type Directory -Force -Path $env:CCACHE_DIR - ccache --show-stats - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N -b -t -C + - ccache -s - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - cmake --build . --config $config --target ($targets.Split(',')) @@ -504,9 +505,14 @@ Windows_Ninja_Tests_RelWithDebInfo: - $time = (Get-Date -Format "HH:mm:ss") - echo ${time} - echo "started by ${GITLAB_USER_NAME}" - - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -b -t + - $env:CCACHE_BASEDIR = Get-Location + - $env:CCACHE_DIR = "$(Get-Location)\ccache" + - New-Item -Type Directory -Force -Path $env:CCACHE_DIR + - ccache --show-stats + - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -b -t -C - cd MSVC2019_64 - cmake --build . --config $config --target ($targets.Split(',')) + - ccache -s - cd $config - echo "CI_COMMIT_REF_NAME ${CI_COMMIT_REF_NAME}`nCI_JOB_ID ${CI_JOB_ID}`nCI_COMMIT_SHA ${CI_COMMIT_SHA}" | Out-File -Encoding UTF8 CI-ID.txt - Get-ChildItem -Recurse *.ilk | Remove-Item @@ -522,8 +528,11 @@ Windows_Ninja_Tests_RelWithDebInfo: cache: key: msbuild-v2 paths: + - ccache - deps - MSVC2019_64/deps/Qt + variables: + CCACHE_SIZE: 2G artifacts: when: always paths: