build:bht: stage: build image: registry.gitlab.ost.ch:45023/teachos/devcontainers/bht.ci:latest script: - cmake --preset $PRESET - cmake --build --preset $PRESET-dbg 2>&1 | tee build_output.txt - set -o pipefail - python3 scripts/ci/parse_clang_tidy.py build_output.txt > code-quality-$PRESET.json artifacts: paths: - build/$PRESET/ reports: codequality: code-quality-$PRESET.json expire_in: 5 min parallel: matrix: - PRESET: ["bht", "bht-tsan"] build:bootable: stage: build image: registry.gitlab.ost.ch:45023/teachos/devcontainers/x86-64.ci:latest script: - cmake --preset $PLATFORM - cmake --build --preset $PLATFORM-$TYPE 2>&1 | tee build_output.txt - set -o pipefail - python3 scripts/ci/parse_clang_tidy.py build_output.txt > code-quality-$PLATFORM-$TYPE.json - cp build/${PLATFORM}/bin/**/kernel.{dis,elf,sym,iso} . artifacts: paths: - kernel.dis - kernel.elf - kernel.sym - kernel.iso reports: codequality: code-quality-$PLATFORM-$TYPE.json expire_in: 1 week parallel: matrix: - PLATFORM: ["x86_64"] TYPE: ["dbg", "rel"] test:bht: stage: test image: registry.gitlab.ost.ch:45023/teachos/devcontainers/bht.ci:latest script: - ctest --preset bht-dbg --parallel --output-on-failure - lcov --quiet --config-file .lcovrc --capture --directory $(pwd) --output-file coverage.info - lcov --quiet --config-file .lcovrc --list coverage.info - genhtml --quiet --config-file .lcovrc --prefix $(pwd) --output-directory coverage coverage.info - gcovr --root . --cobertura-pretty --output coverage/cobertura-coverage.xml after_script: - echo "CoverageReport public URL - https://teachos.pages.ost.ch/-/kernel/-/jobs/$CI_JOB_ID/artifacts/coverage/index.html" coverage: '/Total:\|\s*(\d+(?:\.\d+)?)\%/' artifacts: paths: - coverage/ expire_in: 24 hours reports: coverage_report: coverage_format: cobertura path: coverage/cobertura-coverage.xml junit: build/bht-dbg/**/bht_results/*.xml needs: - job: build:bht parallel: matrix: - PRESET: ["bht"] test:bht-tsan: stage: test image: registry.gitlab.ost.ch:45023/teachos/devcontainers/bht.ci:latest script: - TSAN_OPTIONS=halt_on_error=1 ctest --preset bht-tsan-dbg --parallel --output-on-failure artifacts: expire_in: 24 hours reports: junit: build/bht-tsan-dbg/**/bht_results/*.xml needs: - job: build:bht parallel: matrix: - PRESET: ["bht-tsan"] license_check: stage: .pre image: name: docker.io/fsfe/reuse entrypoint: [""] script: reuse lint