mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-23 01:21:39 +00:00
ccache for Windows
This commit is contained in:
parent
3afa46b25e
commit
f6757ce124
@ -352,6 +352,7 @@ variables: &tests-targets
|
|||||||
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
|
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
|
||||||
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
||||||
- choco install 7zip -y
|
- choco install 7zip -y
|
||||||
|
- choco install ccache -y
|
||||||
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||||
- choco install vswhere -y
|
- choco install vswhere -y
|
||||||
- choco install ninja -y
|
- choco install ninja -y
|
||||||
@ -374,10 +375,14 @@ variables: &tests-targets
|
|||||||
- $time = (Get-Date -Format "HH:mm:ss")
|
- $time = (Get-Date -Format "HH:mm:ss")
|
||||||
- echo ${time}
|
- echo ${time}
|
||||||
- echo "started by ${GITLAB_USER_NAME}"
|
- echo "started by ${GITLAB_USER_NAME}"
|
||||||
- sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N -b -t
|
- $env:CCACHE_BASEDIR = Get-Location
|
||||||
|
- $env:CCACHE_DIR = "$(Get-Location)\ccache"
|
||||||
|
- New-Item -Type Directory -Force -Path $env:CCACHE_DIR
|
||||||
|
- sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N -b -t -C
|
||||||
- cd MSVC2019_64_Ninja
|
- cd MSVC2019_64_Ninja
|
||||||
- .\ActivateMSVC.ps1
|
- .\ActivateMSVC.ps1
|
||||||
- cmake --build . --config $config --target ($targets.Split(','))
|
- cmake --build . --config $config --target ($targets.Split(','))
|
||||||
|
- ccache --show-stats
|
||||||
- cd $config
|
- 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
|
- 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
|
- Get-ChildItem -Recurse *.ilk | Remove-Item
|
||||||
@ -393,6 +398,7 @@ variables: &tests-targets
|
|||||||
cache:
|
cache:
|
||||||
key: ninja-v2
|
key: ninja-v2
|
||||||
paths:
|
paths:
|
||||||
|
- ccache
|
||||||
- deps
|
- deps
|
||||||
- MSVC2019_64_Ninja/deps/Qt
|
- MSVC2019_64_Ninja/deps/Qt
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -473,6 +479,7 @@ Windows_Ninja_Tests_RelWithDebInfo:
|
|||||||
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
|
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
|
||||||
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
||||||
- choco install 7zip -y
|
- choco install 7zip -y
|
||||||
|
- choco install ccache -y
|
||||||
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||||
- choco install vswhere -y
|
- choco install vswhere -y
|
||||||
- choco install python -y
|
- choco install python -y
|
||||||
@ -494,9 +501,13 @@ Windows_Ninja_Tests_RelWithDebInfo:
|
|||||||
- $time = (Get-Date -Format "HH:mm:ss")
|
- $time = (Get-Date -Format "HH:mm:ss")
|
||||||
- echo ${time}
|
- echo ${time}
|
||||||
- echo "started by ${GITLAB_USER_NAME}"
|
- 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
|
||||||
|
- sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -b -t -C
|
||||||
- cd MSVC2019_64
|
- cd MSVC2019_64
|
||||||
- cmake --build . --config $config --target ($targets.Split(','))
|
- cmake --build . --config $config --target ($targets.Split(','))
|
||||||
|
- ccache --show-stats
|
||||||
- cd $config
|
- 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
|
- 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
|
- Get-ChildItem -Recurse *.ilk | Remove-Item
|
||||||
@ -512,6 +523,7 @@ Windows_Ninja_Tests_RelWithDebInfo:
|
|||||||
cache:
|
cache:
|
||||||
key: msbuild-v2
|
key: msbuild-v2
|
||||||
paths:
|
paths:
|
||||||
|
- ccache
|
||||||
- deps
|
- deps
|
||||||
- MSVC2019_64/deps/Qt
|
- MSVC2019_64/deps/Qt
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -62,6 +62,7 @@ VERBOSE=""
|
|||||||
STRIP=""
|
STRIP=""
|
||||||
SKIP_DOWNLOAD=""
|
SKIP_DOWNLOAD=""
|
||||||
SKIP_EXTRACT=""
|
SKIP_EXTRACT=""
|
||||||
|
USE_CCACHE=""
|
||||||
KEEP=""
|
KEEP=""
|
||||||
UNITY_BUILD=""
|
UNITY_BUILD=""
|
||||||
VS_VERSION=""
|
VS_VERSION=""
|
||||||
@ -100,6 +101,8 @@ while [ $# -gt 0 ]; do
|
|||||||
e )
|
e )
|
||||||
SKIP_EXTRACT=true ;;
|
SKIP_EXTRACT=true ;;
|
||||||
|
|
||||||
|
C )
|
||||||
|
USE_CCACHE=true ;;
|
||||||
k )
|
k )
|
||||||
KEEP=true ;;
|
KEEP=true ;;
|
||||||
|
|
||||||
@ -145,6 +148,8 @@ Options:
|
|||||||
Set the configuration, can also be set with environment variable CONFIGURATION.
|
Set the configuration, can also be set with environment variable CONFIGURATION.
|
||||||
For mutli-config generators, this is ignored, and all configurations are set up.
|
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.
|
For single-config generators, several configurations can be set up at once by specifying -c multiple times.
|
||||||
|
-C
|
||||||
|
Use ccache.
|
||||||
-d
|
-d
|
||||||
Skip checking the downloads.
|
Skip checking the downloads.
|
||||||
-e
|
-e
|
||||||
@ -503,6 +508,10 @@ if ! [ -z $UNITY_BUILD ]; then
|
|||||||
add_cmake_opts "-DOPENMW_UNITY_BUILD=True"
|
add_cmake_opts "-DOPENMW_UNITY_BUILD=True"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! [ -z $USE_CCACHE ]; then
|
||||||
|
add_cmake_opts "-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "==================================="
|
echo "==================================="
|
||||||
echo "Starting prebuild on MSVC${MSVC_DISPLAY_YEAR} WIN${BITS}"
|
echo "Starting prebuild on MSVC${MSVC_DISPLAY_YEAR} WIN${BITS}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user