-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
31 lines (27 loc) · 883 Bytes
/
.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
image: pavelverigo/cse2000
# Build library to object file
build-job:
stage: build
script:
- cmake -S . -B build
- cmake --build build --target EasyScaner
# clang-format on all files in repository
clang-format:
stage: test
script:
- find . \( -name '*.hpp' -or -name '*.cpp' \) -print0 | xargs -0 clang-format --dry-run --Werror
allow_failure: true
# Make enviroment for clang-tidy (exporting compile commands), then running clang-tidy
clang-tidy:
stage: test
script:
- cmake -S . -B build -G "Unix Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- find ./EasyScaner/ \( -name '*.hpp' -or -name '*.cpp' \) -print0 | xargs -0 clang-tidy -p build --warnings-as-errors=*
allow_failure: true
# Compiles Google Test and executes it
gtest:
stage: test
script:
- cmake -S . -B build
- cmake --build build --target mytest
- build/mytest