diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2018-02-22 15:43:07 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-02-24 18:45:13 +0100 |
commit | 03e8efaeeb6234ca9f7edea108719191e4effb30 (patch) | |
tree | b0c38c109f44b341fd27cf63342dc8dc24edd023 /.gitlab-ci.yml | |
parent | f6c647f638a2f8da434daadf4fef8fb5d4e3124c (diff) | |
download | libmicrohttpd-03e8efaeeb6234ca9f7edea108719191e4effb30.tar.gz libmicrohttpd-03e8efaeeb6234ca9f7edea108719191e4effb30.zip |
New file .gitlab-ci.yml
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..bc8f81ef --- /dev/null +++ b/.gitlab-ci.yml | |||
@@ -0,0 +1,92 @@ | |||
1 | # we utilize the images generated by the build-images project, to | ||
2 | # speed up CI runs. We also use ccache and store config.cache | ||
3 | # to speed up compilation. We include a version number in cache | ||
4 | # name to allow expiration of old caches. | ||
5 | |||
6 | cache: | ||
7 | key: "$CI_JOB_NAME-ver1" | ||
8 | paths: | ||
9 | - cache/ | ||
10 | |||
11 | before_script: | ||
12 | # CCache Config | ||
13 | - mkdir -p cache | ||
14 | - export CCACHE_BASEDIR=${PWD} | ||
15 | - export CCACHE_DIR=${PWD}/cache | ||
16 | - export CC="ccache gcc" | ||
17 | |||
18 | after_script: | ||
19 | # somehow after_script looses environment | ||
20 | - export CCACHE_BASEDIR=${PWD} | ||
21 | - export CCACHE_DIR=${PWD}/cache | ||
22 | - ccache -s | ||
23 | |||
24 | variables: | ||
25 | BUILD_IMAGES_PROJECT: libmicrohttpd/build-images | ||
26 | DEBIAN_BUILD: buildenv-debian-stretch | ||
27 | GET_SOURCES_ATTEMPTS: "3" | ||
28 | CONFIGURE_BASE_FLAGS: --enable-asserts --cache-file cache/config.cache | ||
29 | CFLAGS_DEFAULT: -O0 -g -ggdb3 | ||
30 | |||
31 | # In this build we combine | ||
32 | # * gcc | ||
33 | # * check, distcheck | ||
34 | gcc/Stretch: | ||
35 | image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD | ||
36 | script: | ||
37 | - export CFLAGS=$CFLAGS_DEFAULT | ||
38 | - ./bootstrap | ||
39 | - ./configure $CONFIGURE_BASE_FLAGS | ||
40 | - make -j$(nproc) | ||
41 | - make -j$(nproc) check | ||
42 | - make -j$(nproc) distcheck | ||
43 | tags: | ||
44 | - shared | ||
45 | artifacts: | ||
46 | expire_in: 2 weeks | ||
47 | when: on_failure | ||
48 | paths: | ||
49 | - ./*.log | ||
50 | - src/microhttpd/*.log | ||
51 | |||
52 | # In this build we combine | ||
53 | # * clang | ||
54 | # * ASan, UBSan | ||
55 | # * check, distcheck | ||
56 | Sanitizers/Stretch: | ||
57 | image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD | ||
58 | script: | ||
59 | - export CFLAGS="$CFLAGS_DEFAULT -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address" | ||
60 | - ./bootstrap | ||
61 | - export CC="ccache clang" | ||
62 | - export UBSAN_OPTIONS=print_stacktrace=1 | ||
63 | - export ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-3.8/bin/llvm-symbolizer | ||
64 | - ./configure $CONFIGURE_BASE_FLAGS --disable-doc | ||
65 | - make -j$(nproc) check | ||
66 | - make -j$(nproc) distcheck | ||
67 | tags: | ||
68 | - shared | ||
69 | artifacts: | ||
70 | expire_in: 2 weeks | ||
71 | when: on_failure | ||
72 | paths: | ||
73 | - ./*.log | ||
74 | - src/microhttpd/*.log | ||
75 | |||
76 | Scan-Build/Debian: | ||
77 | image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD | ||
78 | script: | ||
79 | - export CFLAGS=$CFLAGS_DEFAULT | ||
80 | - ./bootstrap | ||
81 | - scan-build ./configure $CONFIGURE_BASE_FLAGS | ||
82 | - scan-build -v -enable-checker security,nullability --status-bugs -o scan-build make -j$(nproc) | ||
83 | - scan-build -v -enable-checker security,nullability --status-bugs -o scan-build make -j$(nproc) check | ||
84 | tags: | ||
85 | - shared | ||
86 | except: | ||
87 | - tags | ||
88 | artifacts: | ||
89 | expire_in: 2 weeks | ||
90 | when: on_failure | ||
91 | paths: | ||
92 | - scan-build/* | ||