forked from jgaeddert/liquid-dsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
86 lines (77 loc) · 2.11 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
# base configuration
image: debian
stages: [build, test]
before_script:
- apt-get -qq update
- apt-get -qq install -y --no-install-recommends automake autoconf gcc g++ gcovr make valgrind time curl
# 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]
# test installation and linking appropriately
install:
stage: test
script:
- make -j4
- make install
- ldconfig
- make check-link
# 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
- bash <(curl -s https://codecov.io/bash)
coverage: '/lines: \d+\.\d+%/'
artifacts:
paths: [coverage.out]