forked from randy408/libspng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
44 lines (40 loc) · 1.62 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
image: debian:buster-slim
stages:
- test
- coverity
before_script:
- apt update
- apt install -y build-essential meson git git-lfs unzip clang-tools clang-tidy libfuzzer-7-dev libubsan1 zlib1g-dev libpng-dev pkg-config gcovr wget tar curl
test:
stage: test
script:
- CC=clang-7 CXX=clang++-7 meson -Ddev_build=true -Duse_miniz=true -Db_sanitize=address,undefined -Db_lundef=false --wrap-mode=forcefallback -Doptimization=1 -Doss_fuzz=true clang_build
- cd clang_build
- ninja scan-build # this uses gcc due to a bug: https://github.com/mesonbuild/meson/issues/5716
- ninja test
- meson configure -Db_sanitize=memory
- MSAN_OPTIONS=exitcode=100 ninja test
- cd ..
- CC=gcc CXX=g++ meson -Ddev_build=true -Db_sanitize=address,undefined -Db_coverage=true gcc_build
- cd gcc_build
- ninja
- meson test info -v
- ninja test
- ninja coverage-text
- cat meson-logs/coverage.txt
artifacts:
paths:
- clang_build/
- gcc_build/
coverity:
stage: coverity
script:
- wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_TOKEN&project=randy408%2Flibspng" -O coverity_tool.tgz
- mkdir coverity_tool
- tar -xvzf coverity_tool.tgz -C coverity_tool --strip-components=1
- ninja -C gcc_build clean
- ./coverity_tool/bin/cov-build --dir cov-int ninja -C gcc_build
- tar czvf spng.tgz cov-int
- curl --form token=$COVERITY_TOKEN --form email=randy408@protonmail.com --form file=@spng.tgz --form version="master" --form description="libspng" https://scan.coverity.com/builds?project=randy408%2Flibspng
- rm spng.tgz
- rm -r cov-int