| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- stages:
- #- analysis
- - build
- #- test
- .build_template: &job_definition
- stage: build
- before_script:
- - env
- - apt update
- - apt install -y wget curl tar
- - wget https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-linux-x86_64.sh
- - chmod +x cmake-3.29.6-linux-x86_64.sh
- - ./cmake-3.29.6-linux-x86_64.sh --skip-license --prefix=/usr/local
- script:
- - echo $USER --- $HOME
- - cmake --version
- - echo Working directory $PWD
- - apt install -y python3-pip python3-setuptools rpm ${ADDITIONAL_PACKAGES}
- - pip3 install conan ${ADDITIONAL_PYTHON_PACKAGES} ${ADDITIONAL_PIP3_ARGS}
-
- - mkdir -p build && cd build
- - conan profile detect --force
- - conan install --build missing -s:h "&:build_type=${BUILD_TYPE}" -s "compiler.cppstd=20" -s compiler.libcxx=libstdc++11 -of=$PWD ../conanfile.txt
- - cmake .. --preset conan-$(echo "${BUILD_TYPE}" | tr '[:upper:]' '[:lower:]')
- - cmake --build . --parallel $(nproc)
- - ctest
- - export TZ="America/New_York"
- - ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
-
- - if [[ ${BUILD_TYPE} == "Debug" ]]; then apt install -y gcovr; fi
- - if [[ ${BUILD_TYPE} == "Debug" ]]; then cmake --build . --target coverage; fi
- # Build a debian Package
- - cpack -G DEB
- # Build an RPM package
- - cpack -G RPM
- - mkdir -p ../artifacts
- - mv *.deb *.rpm ../artifacts
-
- artifacts:
- paths:
- - artifacts/*
- expire_in: 1 week
- build-jammy-gcc11:
- <<: *job_definition # Merge the contents of the 'job_definition' alias
- image: ubuntu:jammy
- variables:
- ADDITIONAL_PACKAGES: 'gcc g++'
- CC: '/usr/bin/gcc-11'
- CXX: '/usr/bin/g++-11'
- BUILD_TYPE: 'Debug'
- ADDITIONAL_PYTHON_PACKAGES: ''
- ADDITIONAL_CMAKE_FLAGS: ''
- ADDITIONAL_CONAN_FLAGS: '-s compiler.libcxx=libstdc++11'
- artifacts:
- paths:
- - build/coverage/
- coverage: '/^TOTAL.*\s+(\d+\%)$/'
- build-jammy-clang14:
- <<: *job_definition # Merge the contents of the 'job_definition' alias
- image: ubuntu:jammy
- variables:
- ADDITIONAL_PACKAGES: 'clang'
- CC: '/usr/bin/clang'
- CXX: '/usr/bin/clang++'
- BUILD_TYPE: 'Release'
- ADDITIONAL_PYTHON_PACKAGES: ''
- ADDITIONAL_CMAKE_FLAGS: ''
- ADDITIONAL_CONAN_FLAGS: '-s compiler.libcxx=libstdc++11'
- build-noble-gcc13:
- <<: *job_definition # Merge the contents of the 'job_definition' alias
- image: ubuntu:noble
- variables:
- ADDITIONAL_PACKAGES: 'gcc g++'
- CC: '/usr/bin/gcc-13'
- CXX: '/usr/bin/g++-13'
- BUILD_TYPE: 'Release'
- ADDITIONAL_PYTHON_PACKAGES: ''
- ADDITIONAL_CMAKE_FLAGS: ''
- ADDITIONAL_CONAN_FLAGS: '-s compiler.libcxx=libstdc++11'
- ADDITIONAL_PIP3_ARGS: '--break-system-packages'
- build-noble-clang18:
- <<: *job_definition # Merge the contents of the 'job_definition' alias
- image: ubuntu:noble
- variables:
- ADDITIONAL_PACKAGES: 'clang'
- CC: '/usr/bin/clang'
- CXX: '/usr/bin/clang++'
- BUILD_TYPE: 'Release'
- ADDITIONAL_PYTHON_PACKAGES: ''
- ADDITIONAL_CMAKE_FLAGS: ''
- ADDITIONAL_CONAN_FLAGS: '-s compiler.libcxx=libstdc++11'
- ADDITIONAL_PIP3_ARGS: '--break-system-packages'
|