.gitlab-ci.yml 973 Bytes
Newer Older
1
image: "dbisilm/nvm-based_data_structures:latest"
2
3
4
5
6
7
8
9
10
11

stages:
  - build
  - test

build:
  stage: build
  script:
    - mkdir build
    - cd build
12
    - cmake -DCMAKE_BUILD_TYPE=Release ../src
13
    - make
14
15
16
    # clean up unnecessary files and strip binaries
    - rm -rf _deps *tree generated
    - strip bench/point bench/scan bench/tree_* test/*Test
17
18
  artifacts:
    paths:
19
      - build/
20
    expire_in: 30 minutes
21
22
23
24

test:
  stage: test
  script:
25
26
    - echo pass | sudo -S mkdir -m 777 -p /mnt/pmem/test
    - cd build
27
    - ctest
28
29
  dependencies:
    - build
30

31
32
33
34
35
36
37
38
39
40
41
42
43
44
coverage:
  stage: build
  script:
    - echo pass | sudo -S dnf -y install python-pip
    - pip install gcovr --user
    - mkdir build
    - cd build
    - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage" ../src
    - make
    - echo pass | sudo -S mkdir -m 777 -p /mnt/pmem/test
    - ctest
    - ~/.local/bin/gcovr -r .. --exclude _deps
  coverage: '/^TOTAL.*\s+(\d+\%)$/'