From edd6df1857ab373bd0d369efa9edf6252ca5c7ee Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 27 Jun 2020 02:05:17 +0100 Subject: [PATCH 01/31] Try enabling Windows Shared Runners again. Hopefully this will work now https://gitlab.com/gitlab-org/ci-cd/custom-executor-drivers/autoscaler/-/merge_requests/99 is merged. --- .gitlab-ci.yml | 94 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 83 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1f8bc6417..c1d6b5753 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,26 +41,98 @@ MacOS: paths: - build/OpenMW-*.dmg -Windows: +Windows_Ninja_RelWithDebInfo: tags: - windows + before_script: + - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + - choco install git --force --params "/GitAndUnixToolsOnPath" -y + - choco install 7zip -y + - choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y + - choco install vswhere -y + - choco install ninja -y + - choco install python -y + - refreshenv stage: build allow_failure: true script: - - Set-Variable -Name "time" -Value (date -Format "%H:%m") + - $time = (Get-Date -Format "HH:mm:ss") + - $config = "RelWithDebInfo" - echo ${time} - echo "started by ${GITLAB_USER_NAME}" -# TODO: to anyone wanting to do further work here, we need to figure out how to get the below working -# TODO: on gitlab's new shared windows runners. They currently don't have bash or anything else installed -# TODO: it is currently just a bare windows 10 with powershell. -# - env # turn on for debugging -# - sh %CI_PROJECT_DIR%/CI/before_script.msvc.sh -c Release -p x64 -v 2017 -V -# - SET msBuildLocation="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe" -# - call %msBuildLocation% MSVC2017_64\OpenMW.sln /t:Build /p:Configuration=Release /m:%NUMBER_OF_PROCESSORS% -# - 7z a OpenMW_MSVC2017_64_%CI_BUILD_REF_NAME%_%CI_BUILD_ID%.zip %CI_PROJECT_DIR%\MSVC2017_64\Release\ + - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N + - cd MSVC2019_64_Ninja + - .\ActivateMSVC.ps1 + - cmake --build . --config $config + - cd $config + - | + if (Get-ChildItem -Recurse *.pdb) { + 7z a -tzip ..\..\OpenMW_MSVC2019_64_${CIBuildRefName}_${CIBuildID}_symbols.zip '*.pdb' + Get-ChildItem -Recurse *.pdb | Remove-Item + } + - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${CIBuildRefName}_${CIBuildID}.zip '*' cache: paths: - deps + - MSVC2019_64_Ninja/deps artifacts: + when: always paths: - - "*.zip" + - "*.zip" - "*.log" + - MSVC2019_64_Ninja/* + - MSVC2019_64_Ninja/*.log + - MSVC2019_64_Ninja/*/*.log + - MSVC2019_64_Ninja/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*/*/*/*/*.log + + +Windows_MSBuild_RelWithDebInfo: + tags: + - windows + before_script: + - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + - choco install git --force --params "/GitAndUnixToolsOnPath" -y + - choco install 7zip -y + - choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y + - choco install vswhere -y + - choco install python -y + - refreshenv + stage: build + allow_failure: true + script: + - $time = (Get-Date -Format "HH:mm:ss") + - $config = "RelWithDebInfo" + - echo ${time} + - echo "started by ${GITLAB_USER_NAME}" + - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V + - cd MSVC2019_64 + - .\ActivateMSVC.ps1 + - cmake --build . --config $config + - cd $config + - | + if (Get-ChildItem -Recurse *.pdb) { + 7z a -tzip ..\..\OpenMW_MSVC2019_64_${CIBuildRefName}_${CIBuildID}_symbols.zip '*.pdb' + Get-ChildItem -Recurse *.pdb | Remove-Item + } + - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${CIBuildRefName}_${CIBuildID}.zip '*' + cache: + paths: + - deps + - MSVC2019_64/deps + artifacts: + when: always + paths: + - "*.zip" - "*.log" + - MSVC2019_64/* + - MSVC2019_64/*.log + - MSVC2019_64/*/*.log + - MSVC2019_64/*/*/*.log + - MSVC2019_64/*/*/*/*.log + - MSVC2019_64/*/*/*/*/*.log + - MSVC2019_64/*/*/*/*/*/*.log + - MSVC2019_64/*/*/*/*/*/*/*.log + - MSVC2019_64/*/*/*/*/*/*/*/*.log \ No newline at end of file From 82882beee68ef4098b94e684e2a510891d474733 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 27 Jun 2020 02:08:25 +0100 Subject: [PATCH 02/31] Fix missing line breaks --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1d6b5753..086107db2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,8 @@ Windows_Ninja_RelWithDebInfo: artifacts: when: always paths: - - "*.zip" - "*.log" + - "*.zip" + - "*.log" - MSVC2019_64_Ninja/* - MSVC2019_64_Ninja/*.log - MSVC2019_64_Ninja/*/*.log @@ -126,7 +127,8 @@ Windows_MSBuild_RelWithDebInfo: artifacts: when: always paths: - - "*.zip" - "*.log" + - "*.zip" + - "*.log" - MSVC2019_64/* - MSVC2019_64/*.log - MSVC2019_64/*/*.log From decf59d20e3f277ac0fbd558abf9005c52ac7196 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 27 Jun 2020 02:30:51 +0100 Subject: [PATCH 03/31] Don't try and activate MSVC when using MSBuild --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 086107db2..ac84ed953 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -111,7 +111,6 @@ Windows_MSBuild_RelWithDebInfo: - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - cd MSVC2019_64 - - .\ActivateMSVC.ps1 - cmake --build . --config $config - cd $config - | From c7cf163667510f1d9d0ee4decf6f549b9d304b86 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 27 Jun 2020 03:23:12 +0100 Subject: [PATCH 04/31] Don't keep whole build directory. --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac84ed953..774a163fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -80,7 +80,6 @@ Windows_Ninja_RelWithDebInfo: paths: - "*.zip" - "*.log" - - MSVC2019_64_Ninja/* - MSVC2019_64_Ninja/*.log - MSVC2019_64_Ninja/*/*.log - MSVC2019_64_Ninja/*/*/*.log @@ -128,7 +127,6 @@ Windows_MSBuild_RelWithDebInfo: paths: - "*.zip" - "*.log" - - MSVC2019_64/* - MSVC2019_64/*.log - MSVC2019_64/*/*.log - MSVC2019_64/*/*/*.log From d6ab2f965955eb88f988b3d3b301664c979b8c84 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 27 Jun 2020 03:23:59 +0100 Subject: [PATCH 05/31] Disallow failure --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 774a163fb..61e389f19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,6 @@ Windows_Ninja_RelWithDebInfo: - choco install python -y - refreshenv stage: build - allow_failure: true script: - $time = (Get-Date -Format "HH:mm:ss") - $config = "RelWithDebInfo" @@ -102,7 +101,6 @@ Windows_MSBuild_RelWithDebInfo: - choco install python -y - refreshenv stage: build - allow_failure: true script: - $time = (Get-Date -Format "HH:mm:ss") - $config = "RelWithDebInfo" From 53be725df264dea2d44bae6f3c80d17e865abe4c Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 27 Jun 2020 03:26:42 +0100 Subject: [PATCH 06/31] Make build succeed so cache is kept --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61e389f19..d252236ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,6 +60,7 @@ Windows_Ninja_RelWithDebInfo: - echo ${time} - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N + - exit 0 - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - cmake --build . --config $config @@ -107,6 +108,7 @@ Windows_MSBuild_RelWithDebInfo: - echo ${time} - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V + - exit 0 - cd MSVC2019_64 - cmake --build . --config $config - cd $config From bf69f90f8001e0951332d3390b8e71f2fdc5584f Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 27 Jun 2020 03:28:42 +0100 Subject: [PATCH 07/31] Revert "Make build succeed so cache is kept" This reverts commit 53be725df264dea2d44bae6f3c80d17e865abe4c. It was only needed for CI reasons. --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d252236ac..61e389f19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,7 +60,6 @@ Windows_Ninja_RelWithDebInfo: - echo ${time} - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N - - exit 0 - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - cmake --build . --config $config @@ -108,7 +107,6 @@ Windows_MSBuild_RelWithDebInfo: - echo ${time} - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - - exit 0 - cd MSVC2019_64 - cmake --build . --config $config - cd $config From 0d7b9c51fd9403b2c76f88b5879920d7dd0be7bc Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 28 Jun 2020 03:51:41 +0100 Subject: [PATCH 08/31] Log misparsed stuff as it caused an unexpected CI failure --- CI/activate_msvc.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CI/activate_msvc.sh b/CI/activate_msvc.sh index 0764cd02f..1641f6b3e 100644 --- a/CI/activate_msvc.sh +++ b/CI/activate_msvc.sh @@ -39,6 +39,10 @@ originalIFS="$IFS" IFS=$'\n\r' for pair in $(cmd //c "set"); do IFS='=' read -r -a separatedPair <<< "${pair}" + if [ ${#separatedPair[@]} -ne 2 ]; then + echo "Parsed '$pair' as ${#separatedPair[@]} parts, expected 2." + continue + fi originalCmdEnv["${separatedPair[0]}"]="${separatedPair[1]}" done @@ -49,6 +53,10 @@ declare -A cmdEnvChanges for pair in $cmdEnv; do if [ -n "$pair" ]; then IFS='=' read -r -a separatedPair <<< "${pair}" + if [ ${#separatedPair[@]} -ne 2 ]; then + echo "Parsed '$pair' as ${#separatedPair[@]} parts, expected 2." + continue + fi key="${separatedPair[0]}" value="${separatedPair[1]}" if ! [ ${originalCmdEnv[$key]+_} ] || [ "${originalCmdEnv[$key]}" != "$value" ]; then From 1bb54a28bc5903b27bd8bd8f368d10482b7181ee Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 11 Jul 2020 03:23:15 +0100 Subject: [PATCH 09/31] Build fewer targets Most importantly, skip the CS. This should bring the build time under an hour. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d77db4059..0f62bfa37 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ Windows_Ninja_RelWithDebInfo: - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - - cmake --build . --config $config + - cmake --build . --config $config --target openwm openmw-launcher openmw-wizard openmw-iniimporter - cd $config - | if (Get-ChildItem -Recurse *.pdb) { @@ -113,7 +113,7 @@ Windows_MSBuild_RelWithDebInfo: - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - cd MSVC2019_64 - - cmake --build . --config $config + - cmake --build . --config $config --target openwm openmw-launcher openmw-wizard openmw-iniimporter - cd $config - | if (Get-ChildItem -Recurse *.pdb) { From c29a1c256751650acc17c8f2018d03b4e40de953 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 11 Jul 2020 03:52:54 +0100 Subject: [PATCH 10/31] ninja: error: unknown target 'openwm', did you mean 'openmw'? --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f62bfa37..fda13c4be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ Windows_Ninja_RelWithDebInfo: - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - - cmake --build . --config $config --target openwm openmw-launcher openmw-wizard openmw-iniimporter + - cmake --build . --config $config --target openmw openmw-launcher openmw-wizard openmw-iniimporter - cd $config - | if (Get-ChildItem -Recurse *.pdb) { @@ -113,7 +113,7 @@ Windows_MSBuild_RelWithDebInfo: - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - cd MSVC2019_64 - - cmake --build . --config $config --target openwm openmw-launcher openmw-wizard openmw-iniimporter + - cmake --build . --config $config --target openmw openmw-launcher openmw-wizard openmw-iniimporter - cd $config - | if (Get-ChildItem -Recurse *.pdb) { From a9e6bf11c2df6c0380286b98b0283b11152ff4a1 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 11 Jul 2020 16:36:21 +0100 Subject: [PATCH 11/31] Configurations (via inheritance) --- .gitlab-ci.yml | 51 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fda13c4be..638e89317 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ MacOS: paths: - build/OpenMW-*.dmg -Windows_Ninja_RelWithDebInfo: +.Windows_Ninja_Base: tags: - windows before_script: @@ -61,7 +61,6 @@ Windows_Ninja_RelWithDebInfo: stage: build script: - $time = (Get-Date -Format "HH:mm:ss") - - $config = "RelWithDebInfo" - echo ${time} - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N @@ -71,10 +70,10 @@ Windows_Ninja_RelWithDebInfo: - cd $config - | if (Get-ChildItem -Recurse *.pdb) { - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${CIBuildRefName}_${CIBuildID}_symbols.zip '*.pdb' + 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CIBuildRefName}_${CIBuildID}_symbols.zip '*.pdb' Get-ChildItem -Recurse *.pdb | Remove-Item } - - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${CIBuildRefName}_${CIBuildID}.zip '*' + - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CIBuildRefName}_${CIBuildID}.zip '*' cache: paths: - deps @@ -93,8 +92,25 @@ Windows_Ninja_RelWithDebInfo: - MSVC2019_64_Ninja/*/*/*/*/*/*/*.log - MSVC2019_64_Ninja/*/*/*/*/*/*/*/*.log +Windows_Ninja_Release: + extends: + - .Windows_Ninja_Base + variables: + - config: "Release" -Windows_MSBuild_RelWithDebInfo: +Windows_Ninja_Debug: + extends: + - .Windows_Ninja_Base + variables: + - config: "Debug" + +Windows_Ninja_RelWithDebInfo: + extends: + - .Windows_Ninja_Base + variables: + - config: "RelWithDebInfo" + +.Windows_MSBuild_Base: tags: - windows before_script: @@ -108,7 +124,6 @@ Windows_MSBuild_RelWithDebInfo: stage: build script: - $time = (Get-Date -Format "HH:mm:ss") - - $config = "RelWithDebInfo" - echo ${time} - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V @@ -117,10 +132,10 @@ Windows_MSBuild_RelWithDebInfo: - cd $config - | if (Get-ChildItem -Recurse *.pdb) { - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${CIBuildRefName}_${CIBuildID}_symbols.zip '*.pdb' + 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CIBuildRefName}_${CIBuildID}_symbols.zip '*.pdb' Get-ChildItem -Recurse *.pdb | Remove-Item } - - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${CIBuildRefName}_${CIBuildID}.zip '*' + - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CIBuildRefName}_${CIBuildID}.zip '*' cache: paths: - deps @@ -137,4 +152,22 @@ Windows_MSBuild_RelWithDebInfo: - MSVC2019_64/*/*/*/*/*.log - MSVC2019_64/*/*/*/*/*/*.log - MSVC2019_64/*/*/*/*/*/*/*.log - - MSVC2019_64/*/*/*/*/*/*/*/*.log \ No newline at end of file + - MSVC2019_64/*/*/*/*/*/*/*/*.log + +Windows_MSBuild_Release: + extends: + - .Windows_MSBuild_Base + variables: + - config: "Release" + +Windows_MSBuild_Debug: + extends: + - .Windows_MSBuild_Base + variables: + - config: "Debug" + +Windows_MSBuild_RelWithDebInfo: + extends: + - .Windows_MSBuild_Base + variables: + - config: "RelWithDebInfo" \ No newline at end of file From 3862f0d10a09b3035656327b162981e119c40456 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 11 Jul 2020 16:42:15 +0100 Subject: [PATCH 12/31] Migrate variable names Some of the built-ins were deprecated/removed --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 638e89317..56b893338 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,10 +70,10 @@ MacOS: - cd $config - | if (Get-ChildItem -Recurse *.pdb) { - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CIBuildRefName}_${CIBuildID}_symbols.zip '*.pdb' + 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' Get-ChildItem -Recurse *.pdb | Remove-Item } - - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CIBuildRefName}_${CIBuildID}.zip '*' + - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' cache: paths: - deps @@ -132,10 +132,10 @@ Windows_Ninja_RelWithDebInfo: - cd $config - | if (Get-ChildItem -Recurse *.pdb) { - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CIBuildRefName}_${CIBuildID}_symbols.zip '*.pdb' + 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' Get-ChildItem -Recurse *.pdb | Remove-Item } - - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CIBuildRefName}_${CIBuildID}.zip '*' + - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' cache: paths: - deps From 81aed34588a464f0763823be2ac3d17911394896 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 11 Jul 2020 16:54:13 +0100 Subject: [PATCH 13/31] variables should be a hash of key value pairs --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56b893338..e49690153 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,19 +96,19 @@ Windows_Ninja_Release: extends: - .Windows_Ninja_Base variables: - - config: "Release" + config: "Release" Windows_Ninja_Debug: extends: - .Windows_Ninja_Base variables: - - config: "Debug" + config: "Debug" Windows_Ninja_RelWithDebInfo: extends: - .Windows_Ninja_Base variables: - - config: "RelWithDebInfo" + config: "RelWithDebInfo" .Windows_MSBuild_Base: tags: @@ -158,16 +158,16 @@ Windows_MSBuild_Release: extends: - .Windows_MSBuild_Base variables: - - config: "Release" + config: "Release" Windows_MSBuild_Debug: extends: - .Windows_MSBuild_Base variables: - - config: "Debug" + config: "Debug" Windows_MSBuild_RelWithDebInfo: extends: - .Windows_MSBuild_Base variables: - - config: "RelWithDebInfo" \ No newline at end of file + config: "RelWithDebInfo" \ No newline at end of file From 699ec9e06e8926ad9a6115dbb6f1ead6507096c3 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 11 Jul 2020 17:52:42 +0100 Subject: [PATCH 14/31] separate caches for MSBuild and Ninja --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e49690153..258963a2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,6 +75,7 @@ MacOS: } - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' cache: + key: ninja paths: - deps - MSVC2019_64_Ninja/deps @@ -137,6 +138,7 @@ Windows_Ninja_RelWithDebInfo: } - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' cache: + key: msbuild paths: - deps - MSVC2019_64/deps From 24129e8a54029dc92cbc5c94bdbb7f7397e62ae4 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 11 Jul 2020 20:40:36 +0100 Subject: [PATCH 15/31] Runner now supports sensible globbing patterns --- .gitlab-ci.yml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 258963a2f..e332c6a94 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,14 +84,7 @@ MacOS: paths: - "*.zip" - "*.log" - - MSVC2019_64_Ninja/*.log - - MSVC2019_64_Ninja/*/*.log - - MSVC2019_64_Ninja/*/*/*.log - - MSVC2019_64_Ninja/*/*/*/*.log - - MSVC2019_64_Ninja/*/*/*/*/*.log - - MSVC2019_64_Ninja/*/*/*/*/*/*.log - - MSVC2019_64_Ninja/*/*/*/*/*/*/*.log - - MSVC2019_64_Ninja/*/*/*/*/*/*/*/*.log + - MSVC2019_64_Ninja/**.log Windows_Ninja_Release: extends: @@ -147,14 +140,7 @@ Windows_Ninja_RelWithDebInfo: paths: - "*.zip" - "*.log" - - MSVC2019_64/*.log - - MSVC2019_64/*/*.log - - MSVC2019_64/*/*/*.log - - MSVC2019_64/*/*/*/*.log - - MSVC2019_64/*/*/*/*/*.log - - MSVC2019_64/*/*/*/*/*/*.log - - MSVC2019_64/*/*/*/*/*/*/*.log - - MSVC2019_64/*/*/*/*/*/*/*/*.log + - MSVC2019_64/**.log Windows_MSBuild_Release: extends: From 094f0d1772d86795dd07a8f8fddaf5dfb7977f7c Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 11 Jul 2020 22:46:12 +0100 Subject: [PATCH 16/31] Maybe this will make globbing work --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e332c6a94..4e2bb3451 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,7 +84,8 @@ MacOS: paths: - "*.zip" - "*.log" - - MSVC2019_64_Ninja/**.log + - MSVC2019_64_Ninja/*.log + - MSVC2019_64_Ninja/**/*.log Windows_Ninja_Release: extends: @@ -140,7 +141,8 @@ Windows_Ninja_RelWithDebInfo: paths: - "*.zip" - "*.log" - - MSVC2019_64/**.log + - MSVC2019_64/*.log + - MSVC2019_64/**/*.log Windows_MSBuild_Release: extends: From ef451fa26680a0536b053de73f0e27fe6c23d667 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 12 Jul 2020 03:17:46 +0100 Subject: [PATCH 17/31] Revert "Runner now supports sensible globbing patterns" & "Maybe this will make globbing work" Runner *actually* only supports sensible globbing patterns for cache, not artifacts. This reverts commits 24129e8a54029dc92cbc5c94bdbb7f7397e62ae4 and 094f0d1772d86795dd07a8f8fddaf5dfb7977f7c. --- .gitlab-ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e2bb3451..258963a2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,13 @@ MacOS: - "*.zip" - "*.log" - MSVC2019_64_Ninja/*.log - - MSVC2019_64_Ninja/**/*.log + - MSVC2019_64_Ninja/*/*.log + - MSVC2019_64_Ninja/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*/*/*/*.log + - MSVC2019_64_Ninja/*/*/*/*/*/*/*/*.log Windows_Ninja_Release: extends: @@ -142,7 +148,13 @@ Windows_Ninja_RelWithDebInfo: - "*.zip" - "*.log" - MSVC2019_64/*.log - - MSVC2019_64/**/*.log + - MSVC2019_64/*/*.log + - MSVC2019_64/*/*/*.log + - MSVC2019_64/*/*/*/*.log + - MSVC2019_64/*/*/*/*/*.log + - MSVC2019_64/*/*/*/*/*/*.log + - MSVC2019_64/*/*/*/*/*/*/*.log + - MSVC2019_64/*/*/*/*/*/*/*/*.log Windows_MSBuild_Release: extends: From 22c5c7a96e7f158c0d9feb45bd671f5bdc1ffe05 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 12 Jul 2020 03:18:56 +0100 Subject: [PATCH 18/31] Build the CS again. Maybe this will work now the cache isn't trash --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 258963a2f..f88029ce7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,7 +66,7 @@ MacOS: - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - - cmake --build . --config $config --target openmw openmw-launcher openmw-wizard openmw-iniimporter + - cmake --build . --config $config - cd $config - | if (Get-ChildItem -Recurse *.pdb) { @@ -129,7 +129,7 @@ Windows_Ninja_RelWithDebInfo: - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - cd MSVC2019_64 - - cmake --build . --config $config --target openmw openmw-launcher openmw-wizard openmw-iniimporter + - cmake --build . --config $config - cd $config - | if (Get-ChildItem -Recurse *.pdb) { From 20859bbc50341745b3be00ef8995d1f9d698bd8b Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 12 Jul 2020 13:55:45 +0100 Subject: [PATCH 19/31] Revert "Build the CS again." There wasn't enough time. This reverts commit 22c5c7a96e7f158c0d9feb45bd671f5bdc1ffe05. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f88029ce7..258963a2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,7 +66,7 @@ MacOS: - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - - cmake --build . --config $config + - cmake --build . --config $config --target openmw openmw-launcher openmw-wizard openmw-iniimporter - cd $config - | if (Get-ChildItem -Recurse *.pdb) { @@ -129,7 +129,7 @@ Windows_Ninja_RelWithDebInfo: - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - cd MSVC2019_64 - - cmake --build . --config $config + - cmake --build . --config $config --target openmw openmw-launcher openmw-wizard openmw-iniimporter - cd $config - | if (Get-ChildItem -Recurse *.pdb) { From 6f3e87ce696a904b1e3b40a0ec0042030ec597af Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 12 Jul 2020 13:58:12 +0100 Subject: [PATCH 20/31] Cache less stuff to avoid duplicate entries. This might make everything faster if we're network-bound. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 258963a2f..2d34e6fd3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,7 @@ MacOS: key: ninja paths: - deps - - MSVC2019_64_Ninja/deps + - MSVC2019_64_Ninja/deps/Qt artifacts: when: always paths: @@ -141,7 +141,7 @@ Windows_Ninja_RelWithDebInfo: key: msbuild paths: - deps - - MSVC2019_64/deps + - MSVC2019_64/deps/Qt artifacts: when: always paths: From 5934a9d145babfa36c7703c3fe4a0923543753c3 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 12 Jul 2020 15:08:47 +0100 Subject: [PATCH 21/31] Actualy build the reduced cache. It looks like cache is only invalidated if new files are added, not old ones removed. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d34e6fd3..2bdfa990e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,7 +75,7 @@ MacOS: } - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' cache: - key: ninja + key: ninja-v2 paths: - deps - MSVC2019_64_Ninja/deps/Qt @@ -138,7 +138,7 @@ Windows_Ninja_RelWithDebInfo: } - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' cache: - key: msbuild + key: msbuild-v2 paths: - deps - MSVC2019_64/deps/Qt From 7676a36b32bf86c79672878f7f4e696ce69283bc Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 12 Jul 2020 22:38:48 +0100 Subject: [PATCH 22/31] Time a build with the reduced cache --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2bdfa990e..313f21d4f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -172,4 +172,4 @@ Windows_MSBuild_RelWithDebInfo: extends: - .Windows_MSBuild_Base variables: - config: "RelWithDebInfo" \ No newline at end of file + config: "RelWithDebInfo" From 0d1fb31358b02b76835d4df70965bd4c4fd73ca2 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 12 Jul 2020 22:39:24 +0100 Subject: [PATCH 23/31] Revert "Revert "Build the CS again."" Maybe the reduced cache makes it fit. This reverts commit 20859bbc50341745b3be00ef8995d1f9d698bd8b. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 313f21d4f..cfb304af7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,7 +66,7 @@ MacOS: - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - - cmake --build . --config $config --target openmw openmw-launcher openmw-wizard openmw-iniimporter + - cmake --build . --config $config - cd $config - | if (Get-ChildItem -Recurse *.pdb) { @@ -129,7 +129,7 @@ Windows_Ninja_RelWithDebInfo: - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - cd MSVC2019_64 - - cmake --build . --config $config --target openmw openmw-launcher openmw-wizard openmw-iniimporter + - cmake --build . --config $config - cd $config - | if (Get-ChildItem -Recurse *.pdb) { From c132646b974de5641b7c3da2343fa5e44ddd8f91 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 13 Jul 2020 01:44:08 +0100 Subject: [PATCH 24/31] Time commands --- .gitlab-ci.yml | 80 +++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 36 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cfb304af7..3ae240162 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,30 +50,34 @@ MacOS: tags: - windows before_script: - - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - - choco install git --force --params "/GitAndUnixToolsOnPath" -y - - choco install 7zip -y - - choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y - - choco install vswhere -y - - choco install ninja -y - - choco install python -y - - refreshenv + - Get-Date -Format "HH:mm:ss" + - Measure-Command -Expression { Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | Out-Default } + - Measure-Command -Expression { choco install git --force --params "/GitAndUnixToolsOnPath" -y | Out-Default } + - Measure-Command -Expression { choco install 7zip -y | Out-Default } + - Measure-Command -Expression { choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y | Out-Default } + - Measure-Command -Expression { choco install vswhere -y | Out-Default } + - Measure-Command -Expression { choco install ninja -y | Out-Default } + - Measure-Command -Expression { choco install python -y | Out-Default } + - Measure-Command -Expression { refreshenv | Out-Default } + - Get-Date -Format "HH:mm:ss" stage: build script: - - $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 -N - - cd MSVC2019_64_Ninja - - .\ActivateMSVC.ps1 - - cmake --build . --config $config - - cd $config + - Get-Date -Format "HH:mm:ss" + - Measure-Command -Expression { $time = (Get-Date -Format "HH:mm:ss") | Out-Default } + - Measure-Command -Expression { echo ${time} | Out-Default } + - Measure-Command -Expression { echo "started by ${GITLAB_USER_NAME}" | Out-Default } + - Measure-Command -Expression { sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N | Out-Default } + - Measure-Command -Expression { cd MSVC2019_64_Ninja | Out-Default } + - Measure-Command -Expression { .\ActivateMSVC.ps1 | Out-Default } + - Measure-Command -Expression { cmake --build . --config $config | Out-Default } + - Measure-Command -Expression { cd $config | Out-Default } - | if (Get-ChildItem -Recurse *.pdb) { - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' - Get-ChildItem -Recurse *.pdb | Remove-Item + Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' | Out-Default } + Measure-Command -Expression { Get-ChildItem -Recurse *.pdb | Remove-Item | Out-Default } } - - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' + - Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' | Out-Default } + - Get-Date -Format "HH:mm:ss" cache: key: ninja-v2 paths: @@ -115,28 +119,32 @@ Windows_Ninja_RelWithDebInfo: tags: - windows before_script: - - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - - choco install git --force --params "/GitAndUnixToolsOnPath" -y - - choco install 7zip -y - - choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y - - choco install vswhere -y - - choco install python -y - - refreshenv + - Get-Date -Format "HH:mm:ss" + - Measure-Command -Expression { Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | Out-Default } + - Measure-Command -Expression { choco install git --force --params "/GitAndUnixToolsOnPath" -y | Out-Default } + - Measure-Command -Expression { choco install 7zip -y | Out-Default } + - Measure-Command -Expression { choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y | Out-Default } + - Measure-Command -Expression { choco install vswhere -y | Out-Default } + - Measure-Command -Expression { choco install python -y | Out-Default } + - Measure-Command -Expression { refreshenv | Out-Default } + - Get-Date -Format "HH:mm:ss" stage: build script: - - $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 - - cd MSVC2019_64 - - cmake --build . --config $config - - cd $config + - Get-Date -Format "HH:mm:ss" + - Measure-Command -Expression { $time = (Get-Date -Format "HH:mm:ss") | Out-Default } + - Measure-Command -Expression { echo ${time} | Out-Default } + - Measure-Command -Expression { echo "started by ${GITLAB_USER_NAME}" | Out-Default } + - Measure-Command -Expression { sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V | Out-Default } + - Measure-Command -Expression { cd MSVC2019_64 | Out-Default } + - Measure-Command -Expression { cmake --build . --config $config | Out-Default } + - Measure-Command -Expression { cd $config | Out-Default } - | if (Get-ChildItem -Recurse *.pdb) { - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' - Get-ChildItem -Recurse *.pdb | Remove-Item + Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' | Out-Default } + Measure-Command -Expression { Get-ChildItem -Recurse *.pdb | Remove-Item | Out-Default } } - - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' + - Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' | Out-Default } + - Get-Date -Format "HH:mm:ss" cache: key: msbuild-v2 paths: From 6a8e736bd247b2667d5d9f0abaf0e008e81fab60 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 13 Jul 2020 16:53:23 +0100 Subject: [PATCH 25/31] Revert "Time commands" This reverts commit c132646b974de5641b7c3da2343fa5e44ddd8f91. --- .gitlab-ci.yml | 80 +++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3ae240162..cfb304af7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,34 +50,30 @@ MacOS: tags: - windows before_script: - - Get-Date -Format "HH:mm:ss" - - Measure-Command -Expression { Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | Out-Default } - - Measure-Command -Expression { choco install git --force --params "/GitAndUnixToolsOnPath" -y | Out-Default } - - Measure-Command -Expression { choco install 7zip -y | Out-Default } - - Measure-Command -Expression { choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y | Out-Default } - - Measure-Command -Expression { choco install vswhere -y | Out-Default } - - Measure-Command -Expression { choco install ninja -y | Out-Default } - - Measure-Command -Expression { choco install python -y | Out-Default } - - Measure-Command -Expression { refreshenv | Out-Default } - - Get-Date -Format "HH:mm:ss" + - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + - choco install git --force --params "/GitAndUnixToolsOnPath" -y + - choco install 7zip -y + - choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y + - choco install vswhere -y + - choco install ninja -y + - choco install python -y + - refreshenv stage: build script: - - Get-Date -Format "HH:mm:ss" - - Measure-Command -Expression { $time = (Get-Date -Format "HH:mm:ss") | Out-Default } - - Measure-Command -Expression { echo ${time} | Out-Default } - - Measure-Command -Expression { echo "started by ${GITLAB_USER_NAME}" | Out-Default } - - Measure-Command -Expression { sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N | Out-Default } - - Measure-Command -Expression { cd MSVC2019_64_Ninja | Out-Default } - - Measure-Command -Expression { .\ActivateMSVC.ps1 | Out-Default } - - Measure-Command -Expression { cmake --build . --config $config | Out-Default } - - Measure-Command -Expression { cd $config | Out-Default } + - $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 -N + - cd MSVC2019_64_Ninja + - .\ActivateMSVC.ps1 + - cmake --build . --config $config + - cd $config - | if (Get-ChildItem -Recurse *.pdb) { - Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' | Out-Default } - Measure-Command -Expression { Get-ChildItem -Recurse *.pdb | Remove-Item | Out-Default } + 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' + Get-ChildItem -Recurse *.pdb | Remove-Item } - - Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' | Out-Default } - - Get-Date -Format "HH:mm:ss" + - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' cache: key: ninja-v2 paths: @@ -119,32 +115,28 @@ Windows_Ninja_RelWithDebInfo: tags: - windows before_script: - - Get-Date -Format "HH:mm:ss" - - Measure-Command -Expression { Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | Out-Default } - - Measure-Command -Expression { choco install git --force --params "/GitAndUnixToolsOnPath" -y | Out-Default } - - Measure-Command -Expression { choco install 7zip -y | Out-Default } - - Measure-Command -Expression { choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y | Out-Default } - - Measure-Command -Expression { choco install vswhere -y | Out-Default } - - Measure-Command -Expression { choco install python -y | Out-Default } - - Measure-Command -Expression { refreshenv | Out-Default } - - Get-Date -Format "HH:mm:ss" + - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + - choco install git --force --params "/GitAndUnixToolsOnPath" -y + - choco install 7zip -y + - choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y + - choco install vswhere -y + - choco install python -y + - refreshenv stage: build script: - - Get-Date -Format "HH:mm:ss" - - Measure-Command -Expression { $time = (Get-Date -Format "HH:mm:ss") | Out-Default } - - Measure-Command -Expression { echo ${time} | Out-Default } - - Measure-Command -Expression { echo "started by ${GITLAB_USER_NAME}" | Out-Default } - - Measure-Command -Expression { sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V | Out-Default } - - Measure-Command -Expression { cd MSVC2019_64 | Out-Default } - - Measure-Command -Expression { cmake --build . --config $config | Out-Default } - - Measure-Command -Expression { cd $config | Out-Default } + - $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 + - cd MSVC2019_64 + - cmake --build . --config $config + - cd $config - | if (Get-ChildItem -Recurse *.pdb) { - Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' | Out-Default } - Measure-Command -Expression { Get-ChildItem -Recurse *.pdb | Remove-Item | Out-Default } + 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' + Get-ChildItem -Recurse *.pdb | Remove-Item } - - Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' | Out-Default } - - Get-Date -Format "HH:mm:ss" + - 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' cache: key: msbuild-v2 paths: From 5549ddab97f8d9b5cf0581219497deb92ccf6fd9 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 13 Jul 2020 17:08:46 +0100 Subject: [PATCH 26/31] Split CS into separate jobs so build time is less tight. Now we have twelve Windows jobs. Yay! --- .gitlab-ci.yml | 70 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cfb304af7..9d0645eda 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,6 +46,12 @@ MacOS: paths: - build/OpenMW-*.dmg +variables: &engine-targets + targets: openmw openmw-essimporter openmw-iniimporter openmw-launcher openmw-wizard + +variables: &cs-targets + targets: openmw-cs bsatool esmtool niftest + .Windows_Ninja_Base: tags: - windows @@ -66,7 +72,7 @@ MacOS: - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - - cmake --build . --config $config + - cmake --build . --config $config --target $targets - cd $config - | if (Get-ChildItem -Recurse *.pdb) { @@ -93,22 +99,46 @@ MacOS: - MSVC2019_64_Ninja/*/*/*/*/*/*/*.log - MSVC2019_64_Ninja/*/*/*/*/*/*/*/*.log -Windows_Ninja_Release: +Windows_Ninja_Engine_Release: extends: - .Windows_Ninja_Base variables: + <<: *engine-targets config: "Release" -Windows_Ninja_Debug: +Windows_Ninja_Engine_Debug: extends: - .Windows_Ninja_Base variables: + <<: *engine-targets config: "Debug" -Windows_Ninja_RelWithDebInfo: +Windows_Ninja_Engine_RelWithDebInfo: extends: - .Windows_Ninja_Base variables: + <<: *engine-targets + config: "RelWithDebInfo" + +Windows_Ninja_CS_Release: + extends: + - .Windows_Ninja_Base + variables: + <<: *cs-targets + config: "Release" + +Windows_Ninja_CS_Debug: + extends: + - .Windows_Ninja_Base + variables: + <<: *cs-targets + config: "Debug" + +Windows_Ninja_CS_RelWithDebInfo: + extends: + - .Windows_Ninja_Base + variables: + <<: *cs-targets config: "RelWithDebInfo" .Windows_MSBuild_Base: @@ -129,7 +159,7 @@ Windows_Ninja_RelWithDebInfo: - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - cd MSVC2019_64 - - cmake --build . --config $config + - cmake --build . --config $config --target $targets - cd $config - | if (Get-ChildItem -Recurse *.pdb) { @@ -156,20 +186,44 @@ Windows_Ninja_RelWithDebInfo: - MSVC2019_64/*/*/*/*/*/*/*.log - MSVC2019_64/*/*/*/*/*/*/*/*.log -Windows_MSBuild_Release: +Windows_MSBuild_Engine_Release: extends: - .Windows_MSBuild_Base variables: + <<: *engine-targets config: "Release" -Windows_MSBuild_Debug: +Windows_MSBuild_Engine_Debug: extends: - .Windows_MSBuild_Base variables: + <<: *engine-targets config: "Debug" -Windows_MSBuild_RelWithDebInfo: +Windows_MSBuild_Engine_RelWithDebInfo: extends: - .Windows_MSBuild_Base variables: + <<: *engine-targets + config: "RelWithDebInfo" + +Windows_MSBuild_CS_Release: + extends: + - .Windows_MSBuild_Base + variables: + <<: *cs-targets + config: "Release" + +Windows_MSBuild_CS_Debug: + extends: + - .Windows_MSBuild_Base + variables: + <<: *cs-targets + config: "Debug" + +Windows_MSBuild_CS_RelWithDebInfo: + extends: + - .Windows_MSBuild_Base + variables: + <<: *cs-targets config: "RelWithDebInfo" From a43766bbc82f9e672939d3bea517a38fedbe53b9 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 13 Jul 2020 18:02:05 +0100 Subject: [PATCH 27/31] Try removing bashism reliance --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d0645eda..e70892f18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,10 +47,10 @@ MacOS: - build/OpenMW-*.dmg variables: &engine-targets - targets: openmw openmw-essimporter openmw-iniimporter openmw-launcher openmw-wizard + targets: "openmw", "openmw-essimporter", "openmw-iniimporter", "openmw-launcher", "openmw-wizard" variables: &cs-targets - targets: openmw-cs bsatool esmtool niftest + targets: "openmw-cs", "bsatool", "esmtool", "niftest" .Windows_Ninja_Base: tags: From a03fd0330299abd29fe924ff52cca4eeb9a56732 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 13 Jul 2020 18:04:25 +0100 Subject: [PATCH 28/31] YAML wants lots of quotes --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e70892f18..90f1c5135 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,10 +47,10 @@ MacOS: - build/OpenMW-*.dmg variables: &engine-targets - targets: "openmw", "openmw-essimporter", "openmw-iniimporter", "openmw-launcher", "openmw-wizard" + targets: '"openmw", "openmw-essimporter", "openmw-iniimporter", "openmw-launcher", "openmw-wizard"' variables: &cs-targets - targets: "openmw-cs", "bsatool", "esmtool", "niftest" + targets: '"openmw-cs", "bsatool", "esmtool", "niftest"' .Windows_Ninja_Base: tags: From 1720e2e1fda17f7a2aa989d935b9970c65cfd661 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 13 Jul 2020 18:47:42 +0100 Subject: [PATCH 29/31] CI kick --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90f1c5135..1afb7b2ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -226,4 +226,4 @@ Windows_MSBuild_CS_RelWithDebInfo: - .Windows_MSBuild_Base variables: <<: *cs-targets - config: "RelWithDebInfo" + config: "RelWithDebInfo" \ No newline at end of file From 000b52fc05623e1993fb73036be340cc32eece67 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 13 Jul 2020 22:03:48 +0100 Subject: [PATCH 30/31] Swap quotes around --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1afb7b2ad..01947e374 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,10 +47,10 @@ MacOS: - build/OpenMW-*.dmg variables: &engine-targets - targets: '"openmw", "openmw-essimporter", "openmw-iniimporter", "openmw-launcher", "openmw-wizard"' + targets: "'openmw', 'openmw-essimporter', 'openmw-iniimporter', 'openmw-launcher', 'openmw-wizard'" variables: &cs-targets - targets: '"openmw-cs", "bsatool", "esmtool", "niftest"' + targets: "'openmw-cs', 'bsatool', 'esmtool', 'niftest'" .Windows_Ninja_Base: tags: From cd4ab320d8b8b4cf3391d1b11becfec7e2231ba7 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 13 Jul 2020 22:34:58 +0100 Subject: [PATCH 31/31] Don't bother trying to set a PowerShell array from YAML Just set a string and split it in the script. --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01947e374..e16aefcc1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,10 +47,10 @@ MacOS: - build/OpenMW-*.dmg variables: &engine-targets - targets: "'openmw', 'openmw-essimporter', 'openmw-iniimporter', 'openmw-launcher', 'openmw-wizard'" + targets: "openmw,openmw-essimporter,openmw-iniimporter,openmw-launcher,openmw-wizard" variables: &cs-targets - targets: "'openmw-cs', 'bsatool', 'esmtool', 'niftest'" + targets: "openmw-cs,bsatool,esmtool,niftest" .Windows_Ninja_Base: tags: @@ -72,7 +72,7 @@ variables: &cs-targets - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N - cd MSVC2019_64_Ninja - .\ActivateMSVC.ps1 - - cmake --build . --config $config --target $targets + - cmake --build . --config $config --target ($targets.Split(',')) - cd $config - | if (Get-ChildItem -Recurse *.pdb) { @@ -159,7 +159,7 @@ Windows_Ninja_CS_RelWithDebInfo: - echo "started by ${GITLAB_USER_NAME}" - sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V - cd MSVC2019_64 - - cmake --build . --config $config --target $targets + - cmake --build . --config $config --target ($targets.Split(',')) - cd $config - | if (Get-ChildItem -Recurse *.pdb) {