aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 0b933c492d8d5096e5f6728eb50c1b85f3d4bdf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.build_matrix: &build_matrix
  parallel:
    matrix:
      - PLATFORM: ["x86_64"]
        TYPE: ["dbg", "rel"]

build:
  stage: build
  image: registry.gitlab.ost.ch:45023/teachos/devcontainers/x86-64.ci:latest
  script:
    - cmake --preset $PLATFORM
    - cmake --build --preset $PLATFORM-$TYPE
    - cp build/${PLATFORM}/bin/**/kernel.{dis,elf,sym,iso} .
  artifacts:
    paths:
      - kernel.dis
      - kernel.elf
      - kernel.sym
      - kernel.iso
    expire_in: 1 week
  <<: *build_matrix

bht:
  stage: build
  image: registry.gitlab.ost.ch:45023/teachos/devcontainers/bht.ci:latest
  script:
    - cmake --preset bht
    - cmake --build --preset bht-dbg
    - ctest --preset bht-dbg
    - lcov --config-file .lcovrc --capture --directory $(pwd) --output-file coverage.info
    - lcov --config-file .lcovrc --list coverage.info
    - genhtml --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.info
      - coverage/
    expire_in: 24 hours
    when: always
    reports:
      coverage_report:
        coverage_format: cobertura
        path: coverage/cobertura-coverage.xml

license_check:
  stage: .pre
  image:
    name: docker.io/fsfe/reuse
    entrypoint: [""]
  script: reuse lint