diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 89455251463e2204b1824cb7162d2799643480ef..d9aae7690fea09863127c611966c9c37e247d58f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,5 +11,6 @@ include: - local: '/scripts/ci/extends/container-maker-setup.yml' - local: '/scripts/ci/jobs/build_image.yml' - local: '/scripts/ci/jobs/build.yml' + - local: '/scripts/ci/jobs/build-win.yml' - local: '/scripts/ci/jobs/checks.yml' - local: '/scripts/ci/jobs/container.yml' diff --git a/scripts/ci/jobs/build-win.yml b/scripts/ci/jobs/build-win.yml new file mode 100644 index 0000000000000000000000000000000000000000..96edf6cc13930bb0b7193ea06a97de6d92a89328 --- /dev/null +++ b/scripts/ci/jobs/build-win.yml @@ -0,0 +1,35 @@ +build win: + stage: test + tags: + - windows + + before_script: + # Load VS environment + - | + pushd $env:VS160COMNTOOLS + cmd /c "VsDevCmd.bat -arch=amd64 -host_arch=amd64&set" | + foreach { + if ($_ -match "=") { + $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" + } + } + popd + Write-Host "`nVisual Studio Command Prompt variables set." -ForegroundColor Yellow + - mkdir -p build-win + - cd build-win + + script: + - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DOGS_BUILD_PROCESSES=GroundwaterFlow + - cmake --build . + - cmake --build . --target tests + - cmake --build . --target ctest + - cp Testing/**/Test.xml Tests/ctest.xml + + artifacts: + paths: + - build-win/Tests/ctest.xml + - build-win/Tests/testrunner.xml + expire_in: 1 week + reports: + junit: + - build-win/Tests/testrunner.xml diff --git a/scripts/ci/jobs/checks.yml b/scripts/ci/jobs/checks.yml index 85fe1c517da6cf22e7dbf1dc852f510075965b21..4462980f67626e5c748fe208c1d5e3700a71bd2f 100644 --- a/scripts/ci/jobs/checks.yml +++ b/scripts/ci/jobs/checks.yml @@ -18,12 +18,16 @@ ctest results: - singularity dependencies: - build + - "build win" script: - singularity run docker://$XUNIT_TO_JUNIT_IMAGE -s:./build/Tests/ctest.xml > build/ctest-junit.xml + - singularity run docker://$XUNIT_TO_JUNIT_IMAGE -s:./build-win/Tests/ctest.xml > build-win/ctest-junit.xml artifacts: paths: - build/ctest-junit.xml + - build-win/ctest-junit.xml expire_in: 1 week reports: junit: - build/ctest-junit.xml + - build-win/ctest-junit.xml