diff --git a/scripts/ci/extends/template-build-win.yml b/scripts/ci/extends/template-build-win.yml index 8b5d9e761446e4e706899e16be21d7092c403838..ac696034ed366e7b8f56998e39ca1cc06b4383f8 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 2798c7f2d92e2c5f5796b9cba7ba9e940cb79a70..5835286efd3a62308b607b52a28872a16621ec8f 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 bd4459720dec7268ef43a4f545ba0f5608f299c8..5fc3a970ff0f9b8247f5760902ee31e98780fd47 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"]