forked from guangie88/spdlog_setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yml
141 lines (121 loc) · 3.15 KB
/
codefresh.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: '1.0'
stages:
- lint
- test
steps:
clone_submodules:
title: Clone submodules
image: codefresh/cfstep-gitsubmodules
environment:
- GITHUB_TOKEN=""
- CF_SUBMODULE_SYNC=true
- CF_SUBMODULE_UPDATE_RECURSIVE=true
lint:
title: Run format linting
stage: lint
image: guangie88/clang-cmake:7
working_directory: ${{main_clone}}
entrypoint: bash
commands:
- |-
find include/ src/ -type f \( -iname *.h -o -iname *.cpp \) -print0 | \
xargs -0 -I {} bash -c 'if [[ $(clang-format {} | diff - {}) ]]; then (echo {}; exit 1); else (exit 0); fi'
# GCC test section
gcc_8: &gcc_test
title: Run test gcc-8
stage: test
image: guangie88/gcc-cmake:8_cmake-3.14
environment:
- BUILD_DIR=build-gcc-8
working_directory: ${{main_clone}}
commands:
- |-
for BUILD in Debug Release; do
BUILD_DIR_FULL=${BUILD_DIR}-${BUILD}
mkdir -p ${BUILD_DIR_FULL}
cd ${BUILD_DIR_FULL}
(
set -x
cmake -DCMAKE_BUILD_TYPE="${BUILD}" \
-DCMAKE_INSTALL_PREFIX:PATH=install \
-DSPDLOG_SETUP_INCLUDE_UNIT_TESTS=ON ..
)
cmake --build . --target install
ctest -R spdlog_setup_unit_test -V
ec=$?
cd -
(exit $ec)
done
gcc_7:
<<: *gcc_test
title: Run test gcc-7
image: guangie88/gcc-cmake:7_cmake-3.14
environment:
- BUILD_DIR=build-gcc-7
gcc_6:
<<: *gcc_test
title: Run test gcc-6
image: guangie88/gcc-cmake:6_cmake-3.14
environment:
- BUILD_DIR=build-gcc-6
gcc_5:
<<: *gcc_test
title: Run test gcc-5
image: guangie88/gcc-cmake:5_cmake-3.14
environment:
- BUILD_DIR=build-gcc-5
gcc_4_9:
<<: *gcc_test
title: Run test gcc-4.9
image: guangie88/gcc-cmake:4.9_cmake-3.14
environment:
- BUILD_DIR=build-gcc-4.9
# Clang test section
clang_7: &clang_test
<<: *gcc_test
title: Run test clang-7
image: guangie88/clang-cmake:7_cmake-3.14
environment:
- BUILD_DIR=build-clang-7
clang_6_0:
<<: *clang_test
title: Run test clang-6
image: guangie88/clang-cmake:6_cmake-3.14
environment:
- BUILD_DIR=build-clang-6
clang_5_0:
<<: *clang_test
title: Run test clang-5
image: guangie88/clang-cmake:5_cmake-3.14
environment:
- BUILD_DIR=build-clang-5
clang_4_0:
<<: *clang_test
title: Run test clang-4
image: guangie88/clang-cmake:4_cmake-3.14
environment:
- BUILD_DIR=build-clang-4
clang_3_9:
<<: *clang_test
title: Run test clang-3.9
image: guangie88/clang-cmake:3.9_cmake-3.14
environment:
- BUILD_DIR=build-clang-3.9
clang_3_8:
<<: *clang_test
title: Run test clang-3.8
image: guangie88/clang-cmake:3.8_cmake-3.14
environment:
- BUILD_DIR=build-clang-3.8
clang_3_7:
<<: *clang_test
title: Run test clang-3.7
image: guangie88/clang-cmake:3.7_cmake-3.14
environment:
- BUILD_DIR=build-clang-3.7
clang_3_6:
<<: *clang_test
title: Run test clang-3.6
image: guangie88/clang-cmake:3.6_cmake-3.14
environment:
- BUILD_DIR=build-clang-3.6