From 9e6a3414d3ad1892224f2cbd21c58632a5913d43 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Tue, 2 Feb 2021 15:36:08 +0100 Subject: [PATCH] [ci] CMake presets on Win jobs. --- scripts/ci/extends/template-build-win.yml | 7 +++---- scripts/ci/jobs/build-gui-win.yml | 6 +----- scripts/ci/jobs/build-win.yml | 5 +++-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/ci/extends/template-build-win.yml b/scripts/ci/extends/template-build-win.yml index 8b5d9e76144..ac696034ed3 100644 --- a/scripts/ci/extends/template-build-win.yml +++ b/scripts/ci/extends/template-build-win.yml @@ -8,14 +8,13 @@ dependencies: [meta, meta_container] variables: script: - - mkdir -p $env:BUILD_DIR - - cd $env:BUILD_DIR - - $cmake_cmd = "cmake .. -G Ninja + - $build_directory = if ($env:BUILD_DIR) { $env:BUILD_DIR } else { "build/" + $env:CMAKE_PRESET } + - $cmake_cmd = "cmake -S . --preset=$env:CMAKE_PRESET $env:CMAKE_ARGS - -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE -DOGS_BUILD_PROCESSES=$env:BUILD_PROCESSES" - $cmake_cmd - Invoke-Expression $cmake_cmd + - cd $build_directory - cmake --build . --target package | Tee-Object -FilePath make.output - if($env:BUILD_TESTS -eq "true") { cmake --build . --target tests } - if($env:BUILD_CTEST -eq "true") { cmake --build . --target ctest } diff --git a/scripts/ci/jobs/build-gui-win.yml b/scripts/ci/jobs/build-gui-win.yml index 2798c7f2d92..5835286efd3 100644 --- a/scripts/ci/jobs/build-gui-win.yml +++ b/scripts/ci/jobs/build-gui-win.yml @@ -8,13 +8,9 @@ build gui win: - when: manual allow_failure: true variables: - BUILD_DIR: build-gui-win + CMAKE_PRESET: release-gui CMAKE_ARGS: >- -DOGS_$USE_PYTHON - -DOGS_BUILD_CLI=OFF - -DOGS_BUILD_GUI=ON - -DOGS_BUILD_UTILS=ON - -DOGS_USE_NETCDF=ON -DOGS_CI_TESTRUNNER_REPEAT=1 parallel: matrix: diff --git a/scripts/ci/jobs/build-win.yml b/scripts/ci/jobs/build-win.yml index bd4459720de..5fc3a970ff0 100644 --- a/scripts/ci/jobs/build-win.yml +++ b/scripts/ci/jobs/build-win.yml @@ -7,13 +7,14 @@ build win: - when: manual allow_failure: true variables: - BUILD_DIR: build-win + BUILD_DIR: build/win-release + CMAKE_PRESET: release CMAKE_ARGS: >- - -DOGS_BUILD_UTILS=ON -DOGS_CI_TESTRUNNER_REPEAT=1 -DOGS_$USE_PYTHON -DOGS_USE_CONAN=AUTO -DOGS_USE_XDMF=ON + -B $BUILD_DIR parallel: matrix: - USE_PYTHON: ["USE_PYTHON=ON", "USE_PYTHON=OFF"] -- GitLab