diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 902105d4c0..6b135ae9a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -352,7 +352,7 @@ variables: &tests-targets - choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1 - choco install git --force --params "/GitAndUnixToolsOnPath" -y - choco install 7zip -y - - choco install ccache -y + - choco install sccache -y - choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install vswhere -y - choco install ninja -y @@ -375,10 +375,11 @@ variables: &tests-targets - $time = (Get-Date -Format "HH:mm:ss") - echo ${time} - echo "started by ${GITLAB_USER_NAME}" - - $env:CCACHE_BASEDIR = Get-Location - - $env:CCACHE_DIR = "$(Get-Location)\ccache" - - New-Item -Type Directory -Force -Path $env:CCACHE_DIR - - ccache -z -M $CCACHE_SIZE + - $env:SCCACHE_BASEDIR = Get-Location + - $env:SCCACHE_DIR = "$(Get-Location)\ccache" + - New-Item -Type Directory -Force -Path $env:SCCACHE_DIR + - sccache --show-stats + - sccache --start-server - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N -b -t -C - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 @@ -393,16 +394,17 @@ variables: &tests-targets } - 7z a -tzip "..\..\$(Make-SafeFileName("OpenMW_MSVC2019_64_${package}_${config}_${CI_COMMIT_REF_NAME}.zip"))" '*' - if ($executables) { foreach ($exe in $executables.Split(',')) { & .\$exe } } + - sccache --show-stats after_script: - Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log cache: key: ninja-v2 paths: - - ccache + - sccache - deps - MSVC2019_64_Ninja/deps/Qt variables: - CCACHE_SIZE: 2G + SCCACHE_SIZE: 2G artifacts: when: always paths: diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 9f026c4e35..7881ee9231 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -62,7 +62,7 @@ VERBOSE="" STRIP="" SKIP_DOWNLOAD="" SKIP_EXTRACT="" -USE_CCACHE="" +USE_SCCACHE="" KEEP="" UNITY_BUILD="" VS_VERSION="" @@ -102,7 +102,7 @@ while [ $# -gt 0 ]; do SKIP_EXTRACT=true ;; C ) - USE_CCACHE=true ;; + USE_SCCACHE=true ;; k ) KEEP=true ;; @@ -149,7 +149,7 @@ Options: For mutli-config generators, this is ignored, and all configurations are set up. For single-config generators, several configurations can be set up at once by specifying -c multiple times. -C - Use ccache. + Use sccache. -d Skip checking the downloads. -e @@ -508,8 +508,8 @@ if ! [ -z $UNITY_BUILD ]; then add_cmake_opts "-DOPENMW_UNITY_BUILD=True" fi -if ! [ -z $USE_CCACHE ]; then - add_cmake_opts "-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" +if ! [ -z $USE_SCCACHE ]; then + add_cmake_opts "-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" fi echo