aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml92
1 files changed, 37 insertions, 55 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ca18bd90..e77794b9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,20 +1,52 @@
-build:bht:
- stage: build
+bht:
+ stage: test
image: registry.gitlab.ost.ch:45023/teachos/devcontainers/bht.ci:latest
script:
- cmake --preset $PRESET
- cmake --build --preset $PRESET-$TYPE --target all all_verify_interface_header_sets --parallel $(nproc) 2>&1 | tee build_output.txt
- set -o pipefail
- python3 scripts/ci/parse_clang_tidy.py build_output.txt > code-quality-$PRESET-$TYPE.json
+ - ctest --preset $PRESET-$TYPE --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"
artifacts:
paths:
- - build/$PRESET/
+ - coverage/
reports:
codequality: code-quality-$PRESET-$TYPE.json
- expire_in: 15 min
+ coverage_report:
+ coverage_format: cobertura
+ path: coverage/cobertura-coverage.xml
+ junit: build/bht/**/bht_results/*.xml
+ expire_in: 24 hours
parallel:
matrix:
- - PRESET: ["bht", "bht-stress"]
+ - PRESET: ["bht"]
+ TYPE: ["dbg", "rel"]
+
+bht-stress:
+ stage: test
+ image: registry.gitlab.ost.ch:45023/teachos/devcontainers/bht.ci:latest
+ script:
+ - cmake --preset $PRESET
+ - cmake --build --preset $PRESET-$TYPE --target all all_verify_interface_header_sets --parallel $(nproc) 2>&1 | tee build_output.txt
+ - set -o pipefail
+ - python3 scripts/ci/parse_clang_tidy.py build_output.txt > code-quality-$PRESET-$TYPE.json
+ - TSAN_OPTIONS=halt_on_error=1 ctest --preset $PRESET-$TYPE --parallel --output-on-failure
+ artifacts:
+ paths:
+ - coverage/
+ reports:
+ codequality: code-quality-$PRESET-$TYPE.json
+ junit: build/bht-stress/**/bht_results/*.xml
+ expire_in: 24 hours
+ parallel:
+ matrix:
+ - PRESET: ["bht-stress"]
TYPE: ["dbg", "rel"]
build:bootable:
@@ -40,56 +72,6 @@ build:bootable:
- 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-$TYPE --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/**/bht_results/*.xml
- parallel:
- matrix:
- - TYPE: ["dbg", "rel"]
- needs:
- - job: build:bht
- parallel:
- matrix:
- - PRESET: ["bht"]
- TYPE: ["$[[ matrix.TYPE ]]"]
-
-test:bht-stress:
- stage: test
- image: registry.gitlab.ost.ch:45023/teachos/devcontainers/bht.ci:latest
- script:
- - TSAN_OPTIONS=halt_on_error=1 ctest --preset bht-stress-$TYPE --parallel --output-on-failure
- artifacts:
- expire_in: 24 hours
- reports:
- junit: build/bht-stress/**/bht_results/*.xml
- parallel:
- matrix:
- - TYPE: ["dbg", "rel"]
- needs:
- - job: build:bht
- parallel:
- matrix:
- - PRESET: ["bht-stress"]
- TYPE: ["$[[ matrix.TYPE ]]"]
-
license_check:
stage: .pre
image: