-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
98 lines (77 loc) · 3.87 KB
/
bitbucket-pipelines.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
image: debian:9
pipelines:
default:
- step:
name: check
script:
- apt update -y && apt install -y cmake clang clang-tidy git make cppcheck
- cmake -DCMAKE_C_COMPILER=/usr/lib/llvm-3.8/libexec/ccc-analyzer -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS_DEBUG="-Wall -Wextra -pedantic -std=c99 -D__linux__" -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .
- mkdir reports
- cppcheck --enable=all --project=compile_commands.json 1>/dev/null 2>reports/cppcheck
- find -name '*.[ch]' | xargs clang-tidy -checks=-clang-diagnostic-unused-parameter 1>reports/clang-tidy
- scan-build -o reports make -j $(cat /proc/cpuinfo | grep processor | wc -l) > /dev/null
- cat reports/cppcheck
- cat reports/clang-tidy
- step:
name: build-x86_64-linux
script:
- apt update -y && apt install -y ninja-build cmake git gcc
- mkdir build
- cd build
- cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -Wall -Wextra -pedantic -Werror -Wno-unused-parameter -std=c99" ..
- ninja
- ninja test
- step:
name: build-x86_64-linux-memsan
script:
- apt update -y && apt install -y ninja-build cmake git gcc
- mkdir build
- cd build
- cmake -G "Ninja" -DCMAKE_C_FLAGS="-g -O0 -fsanitize=leak -fsanitize=address" ..
- ninja
- ninja test
- step:
name: build-x86_64-linux-valgrind
script:
- apt update -y && apt install -y ninja-build cmake git gcc valgrind
- mkdir build
- cd build
- cmake -G "Ninja" -DCMAKE_C_FLAGS="-g -O0" ..
- ninja
- find -executable -type f -name 'unit_*' -exec valgrind '{}' \;
- step:
name: build-x86_64-linux-coverage
script:
- apt update -y && apt install -y ninja-build cmake git gcc gcovr curl
- mkdir build
- cd build
- cmake -G "Ninja" -DTEKON_TESTS_COVERAGE=1 ..
- ninja
- ninja test
- ../test/suite_msr.sh $(pwd)
- ../test/suite_arch.sh $(pwd)
- ../test/suite_sync.sh $(pwd)
- gcov $(find -name '*gcno')
- gcovr -r $(pwd)/.. --exclude-directories test --exclude-directories tekon/test --exclude-directories utils/test -s
- |
[ -z "${CODECOV_TOKEN}" ] && echo "codecove disabled" || bash <(curl -s https://codecov.io/bash)
- step:
name: build-armhf-linux
script:
- apt update -y && apt install -y ninja-build cmake git gcc-arm-linux-gnueabihf qemu
- mkdir build
- cd build
- cmake -G "Ninja" -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -Wall -Wextra -Wno-unused-parameter -std=c99" ..
- ninja
- find -executable -type f -name 'unit_*' -exec qemu-arm -L /usr/arm-linux-gnueabihf '{}' \;
- step:
name: build-x86_64-mingw
script:
- apt update && apt install -y ninja-build cmake git gcc-mingw-w64-x86-64 build-essential autoconf automake libtool wine
- mkdir build
- cd build
- cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_LINKER=/usr/x86_64-w64-mingw32/bin/ld -DCMAKE_C_STANDARD_LIBRARIES="-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -lws2_32 -liphlpapi -lpsapi -luserenv" -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -Wall -Wextra -Wno-unused-parameter -std=c99 -DWINVER=0x0501" -DCMAKE_EXE_LINKER_FLAGS="-Wl,-Bstatic -lwinpthread" ..
- ninja
- find -executable -type f -name 'unit_*' -exec wine '{}' \;
options:
docker: true