aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 26e474e080038aa9b4e166e8fdb3790cbd6355ef (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
54
55
56
57
58
59
build:bht:
  stage: build
  image: registry.gitlab.ost.ch:45023/teachos/devcontainers/bht.ci:latest
  script:
    - cmake --preset bht
    - cmake --build --preset bht-dbg
  artifacts:
    paths:
      - build/bht/
    expire_in: 5 min

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
    - cp build/${PLATFORM}/bin/**/kernel.{dis,elf,sym,iso} .
  artifacts:
    paths:
      - kernel.dis
      - kernel.elf
      - kernel.sym
      - kernel.iso
    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
  needs: ["build:bht"]
  script:
    - ctest --preset bht-dbg
    - lcov --quiet --config-file .lcovrc --capture --directory $(pwd) --output-file coverage.info
    - lcov --quiet --list coverage.info
    - genhtml --quiet --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

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