forked from jgaeddert/liquid-dsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
75 lines (67 loc) · 1.89 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
# base configuration
image: debian
stages: [build, test]
before_script:
- apt-get -qq update && apt-get -qq install -y automake autoconf gcc g++ gcovr make valgrind time
# build from scratch
compile:
stage: build
script:
- ./bootstrap.sh
- ./configure --enable-strict
- make -j4
artifacts: # save output objects for test stages
paths: [makefile, configure, config.h, config.h.in]
# run all test programs
check:
stage: test
script:
- ./configure
- make -j4 check
artifacts:
paths: [autotest.json]
# compile and run benchmark program
bench:
stage: test
script:
- make -j4 bench
artifacts:
paths: [benchmark.json]
# compile and run documenation checks (e.g. example code in README.md)
doc-check:
stage: test
script:
- make doc-check
# 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 example programs with valgrind
# TODO: ensure no errors
#examples-memcheck:
# stage: test
# script:
# - make -j4 examples
# # setting --track-origins=yes gives more detail but takes longer than gitlab allows
# - ls examples/*_example | sed -E "s#examples/(.*)#valgrind --tool=memcheck --log-file=examples/\1.log ./examples/\1#g" > run_examples_valgrind.sh
# - /bin/sh run_examples_valgrind.sh
# - tail -n +1 examples/*.log > valgrind.log
# artifacts:
# paths: [run_examples_valgrind.sh, valgrind.log]
# build from scratch
coverage:
stage: test
script:
- make distclean
- ./bootstrap.sh
- ./configure --enable-coverage
- make -j4 coverage
coverage: '/lines: \d+\.\d+%/'
artifacts:
paths: [coverage.out]