You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.5 KiB
53 lines
1.5 KiB
variables: |
|
GIT_SUBMODULE_STRATEGY: recursive |
|
|
|
stages: |
|
- lint |
|
- test |
|
|
|
.script: &compile |
|
stage: test |
|
script: |
|
- mkdir build && cd build |
|
- CXXFLAGS=-Werror cmake .. |
|
- make -j$(nproc) |
|
|
|
arch: |
|
image: registry.gitlab.com/eidheim/docker-images:arch |
|
<<: *compile |
|
|
|
static-analysis: |
|
image: registry.gitlab.com/eidheim/docker-images:arch |
|
stage: test |
|
script: |
|
- mkdir build && cd build |
|
- scan-build cmake .. |
|
- scan-build --status-bugs make -j$(nproc) |
|
|
|
thread-safety-analysis: |
|
image: registry.gitlab.com/eidheim/docker-images:arch |
|
stage: test |
|
script: |
|
- mkdir build && cd build |
|
- CXX=clang++ CXXFLAGS=-Werror cmake .. |
|
- make -j$(nproc) |
|
|
|
address-sanitizer: |
|
image: registry.gitlab.com/eidheim/docker-images:arch |
|
stage: test |
|
script: |
|
- mkdir build && cd build |
|
- CXXFLAGS="-fsanitize=address" cmake .. |
|
- make -j$(nproc) |
|
|
|
check-format: |
|
image: cppit/jucipp:arch |
|
stage: lint |
|
script: |
|
- 'find src -name "*.cpp" -exec clang-format --Werror --assume-filename={} {} -n 2>> lint-errors.txt \;' |
|
- 'find include -name "*.hpp" -exec clang-format --Werror --assume-filename={} {} -n 2>> lint-errors.txt \;' |
|
- 'find tests -name "*.cpp" -exec clang-format --Werror --assume-filename={} {} -n 2>> lint-errors.txt \;' |
|
- 'find tests -name "*.hpp" -exec clang-format --Werror --assume-filename={} {} -n 2>> lint-errors.txt \;' |
|
- 'HAS_ERRORS=$(cat lint-errors.txt | wc -l)' |
|
- '[ "$HAS_ERRORS" == "0" ] || cat lint-errors.txt' |
|
- '[ "$HAS_ERRORS" == "0" ]'
|
|
|