On Linux and macOS we use the "before script" for both build and test
jobs. On Windows we only want a subset of it, but give it a dedicated
helper for consistency.
In commit 4c7c66dcf5 (gitlab-ci: Add jobs to make Windows x86_64 and
i386 packages, 2022-05-19, v3.24.0-rc1~112^2) we used a separate Windows
packaging job in nightly packaging pipelines. It did not run in release
pipelines, where we need to run the final packaging step manually with
signing. Simplify nightly packaging pipelines by running `cpack` at the
end of the build job as we do for other platforms.
For release packaging pipelines, create an archive of the files needed
to build a package, and present this as the built "package" on Windows.
46b2849550 ci: Update LLVM/Clang to 15.0 in nightly CI jobs on Windows
3eb94e4d51 ci: Simplify LLVM/Clang CI job specs on Windows
8ba5835c8d ci: Factor out helper to load clang into environment on Windows
bf2e4a2e85 ci: Factor out helper to load ninja into environment on Windows
93ff726114 Tests: Fix TryCompile bad source case for clang-cl 15 on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7897
Problems with `cmake-gui` when compiled with the MSVC 14.33 toolset,
that did not occur with the MSVC 14.32 toolset, no longer occur with the
MSVC 14.34 toolset. Revert commit cb8b27a901 (gitlab-ci: Use separate
MSVC toolset specification for packaging jobs, 2022-08-18, v3.24.2~24^2~1)
and update the remaining toolset version references.
Fixes: #23859
Load env scripts with `.` sourcing instead of `Invoke-Expression`.
This allows powershell variables to persist, much like bash.
Leave helper script loading unchanged, as those scripts may set
powershell variables that we do not want to persist.
Restore the change from commit 6f17996edc (gitlab-ci: Update Windows
builds to MSVC 14.33 toolset, 2022-08-15, v3.24.1~3^2), but not for
packaging jobs. `cmake-gui` is still buggy when compiled with
the newer toolset.
Issue: #23859
Revert commit 6f17996edc (gitlab-ci: Update Windows builds to MSVC 14.33
toolset, 2022-08-15). A `cmake-gui` built with the MSVC 14.33 toolset
emits spurious errors when configuring CMake projects, even when the
adjacent `cmake` binary succeeds reliably. Revert to the known-working
MSVC 14.32 toolset pending further investigation.
Issue: #23859
Base it on the approach from commit 4c7c66dcf5 (gitlab-ci: Add jobs to
make Windows x86_64 and i386 packages, 2022-05-19). Leave out the
packaging and upload steps for now because they are only for the nightly
binaries, and will need a new release of CPack to pass the `arm64`
architecture to WiX.
Issue: #21902
Apply the approach from commit 747940157f (gitlab-ci: init environment
with per-CMAKE_CONFIGURATION shell scripts, 2021-03-12,
v3.21.0-rc1~480^2~4) to macOS and Windows too.