-
Notifications
You must be signed in to change notification settings - Fork 451
/
Copy path.gitlab-ci.yml
104 lines (94 loc) · 2.8 KB
/
.gitlab-ci.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# gitlab ci/cd pipeline configuration
image: debian
stages:
- build
- test
variables:
DEBIAN_FRONTEND: noninteractive
before_script:
- apt-get -qq update
- apt-get -qq install -y --no-install-recommends build-essential cmake valgrind time curl
# build main library and run test programs
build:
stage: build
script:
- rm -rf build
- mkdir build
- cd build
- cmake -DBUILD_AUTOTESTS=ON -DBUILD_BENCHMARKS=ON -DBUILD_EXAMPLES=ON -DBUILD_SANDBOX=ON -DCOVERAGE=OFF ..
- make -j4
- ./benchmark -q -o benchmark.json -f
- ./xautotest -q -o autotest.json
#- make check-doc # compile and run documenation checks (e.g. example code in README)
- make install
- ldconfig
- cd ..
- make -f scripts/liquid_linker_test.mk
artifacts:
paths:
- build/benchmark.json
- build/autotest.json
# generate coverage report and push to codecov.io
coverage:
stage: test
script:
- rm -rf build
- mkdir build
- cd build
- cmake -DBUILD_AUTOTESTS=ON -DCOVERAGE=ON -DBUILD_BENCHMARKS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SANDBOX=OFF ..
- make -j4
- ./xautotest -q -o autotest.json
- cd ..
- apt-get -qq install -y --no-install-recommends virtualenv
- virtualenv coverage
- source coverage/bin/activate
- pip install codecov-cli gcovr==7.0
- gcovr --version
- gcovr --filter="src/.*/src/.*.c" --print-summary | tee coverage.out
- codecovcli --version
- codecovcli upload-process -t $CODECOV_TOKEN --git-service gitlab --slug jgaeddert/liquid-dsp
coverage: '/lines: \d+\.\d+%/'
artifacts:
paths:
- coverage.out
- build/autotest.json
# test building using legacy environment
legacy:
stage: test
script:
- apt-get -qq install -y --no-install-recommends automake autoconf
- ./bootstrap.sh
- ./configure
- make -j4
- make check-doc
- make install
- ldconfig
- make -f scripts/liquid_linker_test.mk
# test cross-compiling with platformio
platformio:
stage: test
script:
- apt-get -qq install -y --no-install-recommends virtualenv
- virtualenv platformio
- source platformio/bin/activate
- pip install platformio
- pio ci --lib="." --board=pico examples/platformio_example.c
# compile and run all example programs, timing how long each takes to run
.examples:
stage: test
script:
- make -j4 examples
- echo '' > time.txt
- ls examples/*_example | sed -E "s#(.*)#echo '\1' >> time.txt; { time -p ./\1 ; } 2>> time.txt#g" > run_examples.sh
- /bin/sh run_examples.sh
artifacts:
paths: [run_examples.sh, time.txt]
# compile and run all autotest programs with valgrind
.autotest-memcheck:
stage: test
script:
- make -j4 xautotest
- mkdir valgrind
- ./scripts/valgrind_eval.py -output valgrind -test 881
artifacts:
paths: [valgrind/*]