diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0e77c43339d4fd929d7b5646cf36c53420e08b1..f169ebbec1e60ca015af43bf36e7c18ab7d896bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - pre-checks - test - checks + - gui - package variables: @@ -12,9 +13,11 @@ variables: include: - local: '/scripts/ci/extends/container-maker-setup.yml' - local: '/scripts/ci/extends/vs2019-environment.yml' + - local: '/scripts/ci/extends/test-artifacts.yml' - local: '/scripts/ci/jobs/pre-commit.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' + - local: '/scripts/ci/jobs/gui.yml' diff --git a/scripts/ci/extends/test-artifacts.yml b/scripts/ci/extends/test-artifacts.yml new file mode 100644 index 0000000000000000000000000000000000000000..d00efc239606f754f39e55b17e7aeaddb9fc137d --- /dev/null +++ b/scripts/ci/extends/test-artifacts.yml @@ -0,0 +1,10 @@ +.test-artifacts: + artifacts: + paths: + - $BUILD_DIR/Tests/ctest.xml + - $BUILD_DIR/Tests/testrunner.xml + - $BUILD_DIR/make.output + expire_in: 1 week + reports: + junit: + - $BUILD_DIR/Tests/testrunner.xml diff --git a/scripts/ci/jobs/build-win.yml b/scripts/ci/jobs/build-win.yml index d9f5b7afa2727253f8862268219ef0d8b14177be..f27edf8c4f07c1380da6512f6376242fa0c5fbc2 100644 --- a/scripts/ci/jobs/build-win.yml +++ b/scripts/ci/jobs/build-win.yml @@ -4,7 +4,9 @@ build win: - windows variables: BUILD_DIR: "build-win" - extends: .vs2019-environment + extends: + - .vs2019-environment + - .test-artifacts script: - mkdir -p $BUILD_DIR @@ -13,21 +15,8 @@ build win: cmake .. -G Ninja ` -DCMAKE_BUILD_TYPE=Release ` -DOGS_BUILD_PROCESSES=GroundwaterFlow ` - -DOGS_USE_PYTHON=ON ` - -DOGS_BUILD_GUI=ON ` - -DOGS_BUILD_UTILS=ON ` - -DOGS_BUILD_SWMM=ON ` - -DOGS_USE_NETCDF=ON + -DOGS_USE_PYTHON=ON + - cmake --build . - cmake --build . --target tests - cmake --build . --target ctest - cp Testing/**/Test.xml Tests/ctest.xml - - cmake --build . - - artifacts: - paths: - - $BUILD_DIR/Tests/ctest.xml - - $BUILD_DIR/Tests/testrunner.xml - expire_in: 1 week - reports: - junit: - - $BUILD_DIR/Tests/testrunner.xml diff --git a/scripts/ci/jobs/build.yml b/scripts/ci/jobs/build.yml index 2fe53f8e3b094c530bb6e65a51a2310d66c9137f..f7adb9cfff48fd95cb7d0c1244352c457a3ceae2 100644 --- a/scripts/ci/jobs/build.yml +++ b/scripts/ci/jobs/build.yml @@ -18,16 +18,18 @@ build docs: build: stage: test variables: + BUILD_DIR: "build" CCACHE_DIR: "$CI_PROJECT_DIR/.ccache" image: name: $CONTAINER_GCC_IMAGE cache: paths: - .ccache + extends: .test-artifacts before_script: - - mkdir -p build - - cd build + - mkdir -p $BUILD_DIR + - cd $BUILD_DIR script: - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DOGS_USE_CONAN=OFF -DOGS_BUILD_PROCESSES=GroundwaterFlow @@ -35,13 +37,3 @@ build: - cmake --build . --target tests - cmake --build . --target ctest - cp Testing/**/Test.xml Tests/ctest.xml - - artifacts: - paths: - - build/Tests/ctest.xml - - build/Tests/testrunner.xml - - build/make.output - expire_in: 1 week - reports: - junit: - - build/Tests/testrunner.xml diff --git a/scripts/ci/jobs/gui.yml b/scripts/ci/jobs/gui.yml new file mode 100644 index 0000000000000000000000000000000000000000..973443ab7faf72c083fc085e8b7095e49809a8d4 --- /dev/null +++ b/scripts/ci/jobs/gui.yml @@ -0,0 +1,26 @@ +gui win: + stage: gui + tags: + - windows + variables: + BUILD_DIR: "build-gui-win" + extends: + - .vs2019-environment + - .test-artifacts + + script: + - mkdir -p $BUILD_DIR + - cd $BUILD_DIR + - | + cmake .. -G Ninja ` + -DCMAKE_BUILD_TYPE=Release ` + -DOGS_BUILD_PROCESSES=GroundwaterFlow ` + -DOGS_USE_PYTHON=ON ` + -DOGS_BUILD_GUI=ON ` + -DOGS_BUILD_UTILS=ON ` + -DOGS_BUILD_SWMM=ON ` + -DOGS_USE_NETCDF=ON + - cmake --build . --target tests + - cmake --build . --target ctest + - cp Testing/**/Test.xml Tests/ctest.xml + - cmake --build .