diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5af2d674..e31e7e60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,11 +37,6 @@ build_netgen_win64: -DUSE_OCC=ON -DCMAKE_BUILD_TYPE=Release - cmake --build . --target INSTALL --config Release - cache: - key: "netgen_win64_${CI_BUILD_REF_NAME}" - paths: - - build/ - - src/ test_win64: <<: *win64 @@ -113,7 +108,59 @@ linux_cleanup: script: # remove intermediate and old docker images and containers - docker rm -f `docker ps --no-trunc -aq` - - docker images --no-trunc -aqf "dangling=true" | xargs docker rmi -f + - docker images --no-trunc -aqf "dangling=true" | xargs docker rmi -f || true + when: always + allow_failure: true + +############################################ +# MacOSX +############################################ + +.template_mac: &mac + tags: + - mac + 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 + +mac_build: + <<: *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 + -DUSE_NATIVE_ARCH=OFF + -DUSE_CCACHE=ON + -DENABLE_UNIT_TESTS=ON + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 + -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk + - make -j5 install + +mac_test: + <<: *mac + stage: test + script: + - cd $BUILD_DIR/netgen + - ctest . --output-on-failure + +mac_cleanup: + <<: *mac + stage: cleanup + script: + - rm -rf $ROOT_DIR when: always allow_failure: true