.gitlab-ci.yml 6.40 KiB
stages:
- build
# global variables
variables:
GIT_DEPTH: "1"
.linux_build: &linux_build
stage: build
artifacts:
paths:
- build/installer/BornAgain*.sh
- build/py/wheel/manylinux/*.whl
expire_in: 3 days
native_Debian:
tags:
- Debian
<<: *linux_build
before_script: &native_before
- pwd
- export CC=gcc; export CXX=g++
- export CHECK_FLAGS="-DZERO_TOLERANCE=ON -DDEVELOPER_CHECKS=ON"
- export MPLBACKEND=Agg
# avoid using the default Debian Qt framework
- QTCMAKE="/usr/local/Qt6/6.2.3/gcc_64/lib/cmake"
- cmake --version
script: &native_scr
- env
- mkdir build
- cd build
# NOTE: CMake's Ninja generator should not be used with CMake < 3.26 due to internal bugs.
- time cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_PREFIX_PATH="$QTCMAKE" -DBA_PY_PACK=ON $CHECK_FLAGS
- time make -j16
- time make ba_wheel
- time ctest -j16 --output-on-failure
- time cpack -V -B ./installer
.compile_dependency: &compile_dependency
- mkdir build
- cd build
- cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- make -j4
- ctest
- make install
.debian_oldstable_py311: &debian_oldstable
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
tags:
- LinuxDocker
<<: *linux_build
image: scg-debian-oldstable:latest
script: &docker_build
- export CHECK_FLAGS=""
- ORIGINAL_DIR=$(pwd)
- export CC=gcc; export CXX=g++
- export MPLBACKEND=Agg
- ldd --version
- cmake --version
- eval "$(pyenv init -)"
- python --version
- cd /libheinz
- *compile_dependency
- cd /libcerf
- *compile_dependency
- cd /libformfactor
- *compile_dependency
- cd $ORIGINAL_DIR
- *native_scr