2016-06-22 16:26:05 +05:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
2019-08-29 18:55:58 +05:00
|
|
|
- test_ngsolve
|
2021-10-27 19:50:07 +05:00
|
|
|
- deploy
|
2016-06-22 16:26:05 +05:00
|
|
|
- cleanup
|
|
|
|
|
2022-03-18 15:44:04 +05:00
|
|
|
push_github:
|
2019-08-29 18:55:58 +05:00
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- linux
|
|
|
|
- docker
|
2021-10-15 12:56:17 +05:00
|
|
|
- bash
|
2019-08-29 18:55:58 +05:00
|
|
|
script:
|
|
|
|
- git remote add github git@github.com:NGSolve/netgen.git || true
|
|
|
|
- git remote update
|
2021-09-03 18:17:27 +05:00
|
|
|
- git checkout --track origin/master
|
2019-08-29 18:55:58 +05:00
|
|
|
- git pull origin master
|
2020-09-07 18:50:48 +05:00
|
|
|
- git push github master --tags
|
2019-08-29 18:55:58 +05:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
2016-06-22 16:26:05 +05:00
|
|
|
############################################
|
2018-12-14 15:24:07 +05:00
|
|
|
# Windows
|
2016-06-22 16:26:05 +05:00
|
|
|
############################################
|
|
|
|
|
2018-12-14 15:56:11 +05:00
|
|
|
.template_windows: &win
|
2016-06-22 16:26:05 +05:00
|
|
|
tags:
|
|
|
|
- windows
|
|
|
|
- x64
|
|
|
|
before_script:
|
|
|
|
- "echo off"
|
2022-05-03 12:21:19 +05:00
|
|
|
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64"
|
2018-12-14 16:13:22 +05:00
|
|
|
- set CI_DIR=C:\ci\%CI_PIPELINE_ID%
|
2019-02-13 16:53:01 +05:00
|
|
|
- set CLCACHE_BASEDIR=C:\ci\%CI_PIPELINE_ID%
|
2017-01-31 18:12:22 +05:00
|
|
|
- set NETGEN_BUILD_DIR=%CI_DIR%\build
|
|
|
|
- set INSTALL_DIR=%CI_DIR%\install
|
2019-02-13 16:53:01 +05:00
|
|
|
- set SRC_DIR=%CI_DIR%\src
|
2017-01-31 18:12:22 +05:00
|
|
|
- set NETGENDIR=%INSTALL_DIR%\bin
|
|
|
|
- set PYTHONPATH=%INSTALL_DIR%\lib\site-packages
|
2019-08-22 17:15:43 +05:00
|
|
|
- set PATH=%NETGENDIR%;%PATH%
|
2016-06-22 16:26:05 +05:00
|
|
|
|
2018-12-14 15:56:11 +05:00
|
|
|
build_win:
|
|
|
|
<<: *win
|
2016-06-22 16:26:05 +05:00
|
|
|
stage: build
|
|
|
|
script:
|
2019-02-13 16:53:01 +05:00
|
|
|
- mkdir %SRC_DIR%
|
|
|
|
- xcopy . %SRC_DIR%\ /O /X /E /H /K /Q
|
|
|
|
- cd %SRC_DIR%
|
2017-01-31 18:12:22 +05:00
|
|
|
- git submodule update --init --recursive
|
|
|
|
- rd /s /q %NETGEN_BUILD_DIR%
|
|
|
|
- mkdir %NETGEN_BUILD_DIR%
|
|
|
|
- cd %NETGEN_BUILD_DIR%
|
2016-06-22 16:26:05 +05:00
|
|
|
- >-
|
2019-02-13 16:53:01 +05:00
|
|
|
cmake %SRC_DIR%
|
|
|
|
-G Ninja
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%
|
2020-10-19 18:18:42 +05:00
|
|
|
-DCHECK_RANGE=ON
|
2020-03-11 19:53:08 +05:00
|
|
|
-DUSE_CGNS=ON
|
2016-06-22 16:26:05 +05:00
|
|
|
-DUSE_OCC=ON
|
2019-02-13 16:53:01 +05:00
|
|
|
-DUSE_CCACHE=ON
|
2019-08-22 13:17:57 +05:00
|
|
|
-DENABLE_UNIT_TESTS=ON
|
2016-12-22 23:12:11 +05:00
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
2019-02-13 16:53:01 +05:00
|
|
|
- cmake --build . --target install --config Release
|
2016-06-22 16:26:05 +05:00
|
|
|
|
2018-12-14 15:56:11 +05:00
|
|
|
test_win:
|
|
|
|
<<: *win
|
2018-12-14 15:24:07 +05:00
|
|
|
stage: test
|
|
|
|
script:
|
2021-01-14 22:18:42 +05:00
|
|
|
- pip install pytest-check
|
2019-10-04 15:25:14 +05:00
|
|
|
- cd tests\pytest
|
2018-12-14 16:13:22 +05:00
|
|
|
- cd %NETGEN_BUILD_DIR%\netgen
|
2019-08-08 13:20:16 +05:00
|
|
|
- ctest -C Release -V --output-on-failure
|
2018-12-14 15:24:07 +05:00
|
|
|
- cd ..
|
2019-08-29 18:55:58 +05:00
|
|
|
needs: ["build_win"]
|
2018-12-14 15:24:07 +05:00
|
|
|
|
2018-12-14 15:56:11 +05:00
|
|
|
cleanup_win:
|
|
|
|
<<: *win
|
2018-12-14 15:24:07 +05:00
|
|
|
stage: cleanup
|
|
|
|
tags:
|
|
|
|
- windows
|
|
|
|
- x64
|
|
|
|
script:
|
|
|
|
- cd %CI_PROJECT_DIR%
|
|
|
|
- rd /s /q %CI_DIR%
|
|
|
|
when: always
|
|
|
|
allow_failure: true
|
2019-08-29 18:55:58 +05:00
|
|
|
needs: ["test_win"]
|
2018-12-14 15:24:07 +05:00
|
|
|
|
|
|
|
############################################
|
|
|
|
# Ubuntu/Linux
|
|
|
|
############################################
|
|
|
|
|
|
|
|
.template_ubuntu: &ubuntu
|
|
|
|
tags:
|
|
|
|
- linux
|
2021-10-15 12:56:17 +05:00
|
|
|
- bash
|
2018-12-14 15:24:07 +05:00
|
|
|
before_script:
|
|
|
|
- pwd
|
|
|
|
- ls
|
|
|
|
- docker info
|
|
|
|
variables:
|
2022-04-25 13:14:02 +05:00
|
|
|
UBUNTU_VERSION: "22.04"
|
2018-12-14 15:24:07 +05:00
|
|
|
|
2019-08-15 09:55:46 +05:00
|
|
|
build_ubuntu_debug:
|
2018-12-14 15:20:39 +05:00
|
|
|
<<: *ubuntu
|
2016-06-22 16:26:05 +05:00
|
|
|
stage: build
|
|
|
|
script:
|
2019-04-17 19:51:52 +05:00
|
|
|
- docker build -t netgen_${CI_PIPELINE_ID}:${UBUNTU_VERSION} -f tests/dockerfile .
|
|
|
|
- rm -f netgen_${CI_PIPELINE_ID}_$UBUNTU_VERSION.id
|
2019-08-29 20:41:22 +05:00
|
|
|
- >-
|
|
|
|
docker run
|
|
|
|
--cidfile netgen_${CI_PIPELINE_ID}_${UBUNTU_VERSION}.id
|
|
|
|
-e CCACHE_DIR=/ccache
|
|
|
|
-v /mnt/ccache:/ccache
|
|
|
|
netgen_${CI_PIPELINE_ID}:${UBUNTU_VERSION}
|
|
|
|
bash /root/src/netgen/tests/build_debug.sh
|
2019-04-17 19:51:52 +05:00
|
|
|
- docker commit `cat netgen_${CI_PIPELINE_ID}_${UBUNTU_VERSION}.id` netgen_${CI_PIPELINE_ID}_installed:${UBUNTU_VERSION}
|
|
|
|
- rm netgen_${CI_PIPELINE_ID}_${UBUNTU_VERSION}.id
|
2016-06-22 16:26:05 +05:00
|
|
|
|
2019-04-17 18:25:30 +05:00
|
|
|
build_ubuntu_mpi:
|
|
|
|
<<: *ubuntu
|
|
|
|
stage: build
|
|
|
|
script:
|
2019-04-17 19:51:52 +05:00
|
|
|
- docker build -t netgen_mpi_${CI_PIPELINE_ID}:${UBUNTU_VERSION} -f tests/dockerfile_mpi .
|
|
|
|
- rm -f netgen_mpi_${CI_PIPELINE_ID}_$UBUNTU_VERSION.id_mpi
|
2019-08-29 20:41:22 +05:00
|
|
|
- >-
|
|
|
|
docker run>-
|
|
|
|
--cidfile netgen_mpi_${CI_PIPELINE_ID}_${UBUNTU_VERSION}.id>-
|
|
|
|
-e CCACHE_DIR=/ccache
|
|
|
|
-e RUN_SLOW_TESTS=${RUN_SLOW_TESTS}
|
|
|
|
-v /mnt/ccache:/ccache
|
|
|
|
netgen_mpi_${CI_PIPELINE_ID}:${UBUNTU_VERSION}
|
|
|
|
bash /root/src/netgen/tests/build_mpi.sh
|
2019-04-17 19:51:52 +05:00
|
|
|
- docker commit `cat netgen_mpi_${CI_PIPELINE_ID}_${UBUNTU_VERSION}.id` netgen_mpi_${CI_PIPELINE_ID}_installed:${UBUNTU_VERSION}
|
|
|
|
- rm netgen_mpi_${CI_PIPELINE_ID}_${UBUNTU_VERSION}.id
|
2019-04-17 18:25:30 +05:00
|
|
|
|
2019-08-29 18:55:58 +05:00
|
|
|
test_ubuntu_debug:
|
2018-12-14 15:20:39 +05:00
|
|
|
<<: *ubuntu
|
2016-06-22 16:26:05 +05:00
|
|
|
stage: test
|
|
|
|
script:
|
2017-02-23 20:41:27 +05:00
|
|
|
- >-
|
|
|
|
docker run
|
|
|
|
-e NETGENDIR=/opt/netgen/bin
|
|
|
|
-e PYTHONPATH=/opt/netgen/lib/python3/dist-packages
|
2019-04-17 19:51:52 +05:00
|
|
|
netgen_${CI_PIPELINE_ID}_installed:${UBUNTU_VERSION}
|
2019-08-08 14:06:59 +05:00
|
|
|
bash -c 'cd /root/build/netgen && make test_netgen ARGS="-V --output-on-failure"'
|
2019-08-29 18:55:58 +05:00
|
|
|
needs: ["build_ubuntu_debug"]
|
2016-06-22 16:26:05 +05:00
|
|
|
|
2019-04-17 18:25:30 +05:00
|
|
|
test_ubuntu_mpi:
|
|
|
|
<<: *ubuntu
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- >-
|
|
|
|
docker run
|
2019-08-29 20:41:22 +05:00
|
|
|
-e RUN_SLOW_TESTS=${RUN_SLOW_TESTS}
|
2019-04-17 18:25:30 +05:00
|
|
|
-e NETGENDIR=/opt/netgen/bin
|
|
|
|
-e PYTHONPATH=/opt/netgen/lib/python3/dist-packages
|
2019-04-17 19:51:52 +05:00
|
|
|
netgen_mpi_${CI_PIPELINE_ID}_installed:${UBUNTU_VERSION}
|
2019-08-08 14:06:59 +05:00
|
|
|
bash -c 'cd /root/build/netgen && make test_netgen ARGS="-V --output-on-failure"'
|
2019-08-29 18:55:58 +05:00
|
|
|
needs: ["build_ubuntu_mpi"]
|
2019-04-17 18:25:30 +05:00
|
|
|
|
2019-04-25 15:04:11 +05:00
|
|
|
test_build_ngsolve:
|
|
|
|
<<: *ubuntu
|
|
|
|
allow_failure: true
|
2019-08-29 18:55:58 +05:00
|
|
|
stage: test_ngsolve
|
2019-04-25 15:04:11 +05:00
|
|
|
script:
|
|
|
|
- >-
|
|
|
|
docker run
|
|
|
|
-e NETGENDIR=/opt/netgen/bin
|
|
|
|
-e PYTHONPATH=/opt/netgen/lib/python3/dist-packages
|
|
|
|
-e MKLROOT=/opt/intel/mkl
|
|
|
|
-v /opt/intel:/opt/intel
|
|
|
|
-e CCACHE_DIR=/ccache
|
|
|
|
-v /mnt/ccache:/ccache
|
|
|
|
netgen_${CI_PIPELINE_ID}_installed:${UBUNTU_VERSION}
|
|
|
|
bash -c 'cd /root/src/netgen/tests/ && ./build_ngsolve.sh'
|
|
|
|
|
2018-12-12 15:43:28 +05:00
|
|
|
# cpp guideline checks
|
2019-10-01 14:22:22 +05:00
|
|
|
# test_guidelines:
|
|
|
|
# <<: *ubuntu
|
|
|
|
# stage: test
|
|
|
|
# script:
|
|
|
|
# - docker run -e CCACHE_DIR=/ccache -v /mnt/ccache:/ccache netgen_${CI_PIPELINE_ID}:${UBUNTU_VERSION} bash /root/src/netgen/tests/build_guidelines.sh
|
|
|
|
# when: always
|
|
|
|
# allow_failure: true
|
2018-12-14 15:20:39 +05:00
|
|
|
|
2018-12-28 17:43:15 +05:00
|
|
|
# check if it compiles without spdlog
|
|
|
|
test_noSpdlog:
|
|
|
|
<<: *ubuntu
|
|
|
|
stage: test
|
|
|
|
script:
|
2019-04-17 19:51:52 +05:00
|
|
|
- docker run -e CCACHE_DIR=/ccache -v /mnt/ccache:/ccache netgen_${CI_PIPELINE_ID}:${UBUNTU_VERSION} bash /root/src/netgen/tests/build_nospdlog.sh
|
2018-12-28 17:43:15 +05:00
|
|
|
|
2018-12-14 15:56:11 +05:00
|
|
|
cleanup_ubuntu:
|
2018-12-14 15:24:07 +05:00
|
|
|
stage: cleanup
|
|
|
|
tags:
|
|
|
|
- linux
|
2021-10-15 12:56:17 +05:00
|
|
|
- bash
|
2018-12-14 15:24:07 +05:00
|
|
|
script:
|
|
|
|
# remove intermediate and old docker images and containers
|
|
|
|
- docker rm -f `docker ps --no-trunc -aq`
|
2018-12-14 15:31:42 +05:00
|
|
|
- docker images --no-trunc -aqf "dangling=true" | xargs docker rmi -f || true
|
2019-09-28 14:21:40 +05:00
|
|
|
- docker rmi -f netgen_${CI_PIPELINE_ID}:${UBUNTU_VERSION} || true
|
|
|
|
- docker rmi -f netgen_${CI_PIPELINE_ID}_installed:${UBUNTU_VERSION} || true
|
|
|
|
- docker rmi -f netgen_mpi_${CI_PIPELINE_ID}:${UBUNTU_VERSION} || true
|
|
|
|
- docker rmi -f netgen_mpi_${CI_PIPELINE_ID}_installed:${UBUNTU_VERSION} || true
|
2018-12-14 15:31:42 +05:00
|
|
|
when: always
|
|
|
|
allow_failure: true
|
|
|
|
|
2019-04-17 18:25:30 +05:00
|
|
|
|
2018-12-14 15:31:42 +05:00
|
|
|
############################################
|
|
|
|
# MacOSX
|
|
|
|
############################################
|
|
|
|
|
|
|
|
.template_mac: &mac
|
|
|
|
tags:
|
|
|
|
- mac
|
2021-10-27 12:21:46 +05:00
|
|
|
- x64
|
2018-12-14 15:31:42 +05:00
|
|
|
before_script:
|
|
|
|
- export ROOT_DIR=/tmp/$CI_PIPELINE_ID
|
|
|
|
- export SRC_DIR=$ROOT_DIR/src
|
|
|
|
- export BUILD_DIR=$ROOT_DIR/build
|
|
|
|
- export CMAKE_INSTALL_PREFIX=/tmp/$CI_PIPELINE_ID/install/Netgen.app
|
|
|
|
- export PYTHONPATH=$CMAKE_INSTALL_PREFIX/Contents/Resources/`python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))"`:.
|
|
|
|
- export PATH=$CMAKE_INSTALL_PREFIX/Contents/MacOS:$PATH
|
|
|
|
|
2018-12-14 15:56:11 +05:00
|
|
|
build_mac:
|
2018-12-14 15:31:42 +05:00
|
|
|
<<: *mac
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- git submodule update --init --recursive
|
|
|
|
- rm -rf $BUILD_DIR
|
|
|
|
- mkdir -p $BUILD_DIR
|
|
|
|
- rm -rf $SRC_DIR
|
|
|
|
- mkdir -p $SRC_DIR
|
|
|
|
- cp -a . $SRC_DIR/
|
|
|
|
- cd $BUILD_DIR
|
|
|
|
- >-
|
|
|
|
cmake $SRC_DIR
|
|
|
|
-DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX
|
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
2020-10-19 18:18:42 +05:00
|
|
|
-DCHECK_RANGE=ON
|
2018-12-14 15:31:42 +05:00
|
|
|
-DUSE_NATIVE_ARCH=OFF
|
|
|
|
-DUSE_CCACHE=ON
|
|
|
|
-DENABLE_UNIT_TESTS=ON
|
2021-11-04 16:59:49 +05:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
|
2018-12-14 15:31:42 +05:00
|
|
|
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
2020-03-12 01:30:43 +05:00
|
|
|
-DUSE_CGNS=ON
|
2019-10-28 18:25:48 +05:00
|
|
|
-DUSE_OCC=ON
|
2018-12-14 15:31:42 +05:00
|
|
|
- make -j5 install
|
|
|
|
|
2018-12-14 15:56:11 +05:00
|
|
|
test_mac:
|
2018-12-14 15:31:42 +05:00
|
|
|
<<: *mac
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- cd $BUILD_DIR/netgen
|
2019-08-08 14:06:59 +05:00
|
|
|
- ctest . -V --output-on-failure
|
2019-08-29 18:55:58 +05:00
|
|
|
needs: ["build_mac"]
|
2018-12-14 15:31:42 +05:00
|
|
|
|
2018-12-14 15:56:11 +05:00
|
|
|
cleanup_mac:
|
2018-12-14 15:31:42 +05:00
|
|
|
<<: *mac
|
|
|
|
stage: cleanup
|
|
|
|
script:
|
|
|
|
- rm -rf $ROOT_DIR
|
2018-12-14 15:24:07 +05:00
|
|
|
when: always
|
|
|
|
allow_failure: true
|
2019-08-29 18:55:58 +05:00
|
|
|
needs: ["test_mac"]
|
2018-12-14 15:24:07 +05:00
|
|
|
|
2021-10-27 19:50:07 +05:00
|
|
|
pip_linux:
|
|
|
|
image: quay.io/pypa/manylinux2014_x86_64
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- pip
|
|
|
|
- linux
|
|
|
|
- docker
|
|
|
|
script:
|
|
|
|
- ./tests/build_pip.sh
|
|
|
|
when: manual
|
|
|
|
|
|
|
|
pip_windows:
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- pip
|
|
|
|
- windows
|
|
|
|
script:
|
|
|
|
- .\tests\build_pip.ps1 C:\Python38
|
|
|
|
- .\tests\build_pip.ps1 C:\Python39
|
|
|
|
- .\tests\build_pip.ps1 C:\Python310
|
2022-10-27 00:07:35 +05:00
|
|
|
- .\tests\build_pip.ps1 C:\Python311
|
2021-10-27 19:50:07 +05:00
|
|
|
when: manual
|
|
|
|
|
|
|
|
pip_macos:
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- pip
|
|
|
|
- macosx
|
|
|
|
- m1
|
|
|
|
script:
|
|
|
|
- ./tests/build_pip_mac.sh 3.8
|
2021-11-08 14:31:27 +05:00
|
|
|
- ./tests/build_pip_mac.sh 3.9
|
2021-10-27 19:50:07 +05:00
|
|
|
- ./tests/build_pip_mac.sh 3.10
|
2022-11-02 19:49:39 +05:00
|
|
|
- ./tests/build_pip_mac.sh 3.11
|
2021-10-27 19:50:07 +05:00
|
|
|
when: manual
|