-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
87 lines (77 loc) · 2.03 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
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
# Make sure the submodules are pulled in
# Set the compiler versions
variables:
GIT_SUBMODULE_STRATEGY: recursive
# Only trigger a build if any of the below files change
.fileignore_template: &CI_Ignore
only:
changes:
- CMakelists.txt
- cmake/*.cmake
- .gitlab-ci.yml
- src/*.cpp
- include/inch/*.hpp
- tests/*
# Which packages are required for GCC compilation
.gcc_install_template: &GCCPackages
- apt -y install gcc g++
# Which pacakges are required for clang compilation
.clang_install_template: &ClangPackages
- apt -y install clang
# Specify "rolling" rather than "latest"
# We need gcc >=8 and clang >=7 for std::filesystem
image: ubuntu:rolling
# List the stages to be run
stages:
- BuildAndTest
# Install common packages for all stages
before_script:
- apt update && apt -y install cmake ninja-build
# GCC - Debug
gcc-Debug:
stage: BuildAndTest
<<: *CI_Ignore
tags:
- linux
script:
- *GCCPackages
- cmake -H. -B../build -GNinja -DINCH_UNIT_TESTS=ON -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_BUILD_TYPE=Debug
- cmake --build ../build
- cd ../build
- ctest -j2 -V
# GCC - Release
gcc-Release:
stage: BuildAndTest
<<: *CI_Ignore
tags:
- linux
script:
- *GCCPackages
- cmake -H. -B../build -GNinja -DINCH_UNIT_TESTS=ON -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_BUILD_TYPE=Release
- cmake --build ../build
- cd ../build
- ctest -j2 -V
# Clang - Debug
clang-Debug:
stage: BuildAndTest
<<: *CI_Ignore
tags:
- linux
script:
- *ClangPackages
- cmake -H. -B../build -GNinja -DINCH_UNIT_TESTS=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE=Debug
- cmake --build ../build
- cd ../build
- ctest -j2 -V
# Clang - Release
clang-Release:
stage: BuildAndTest
<<: *CI_Ignore
tags:
- linux
script:
- *ClangPackages
- cmake -H. -B../build -GNinja -DINCH_UNIT_TESTS=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE=Release
- cmake --build ../build
- cd ../build
- ctest -j2 -V