/
config.yml
135 lines (133 loc) · 3.95 KB
/
config.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
version: 2.1
aliases:
- &branch-filter
branches:
only:
- master
- develop
- /^feature.*/
- /^fix.*/
- /^circleci.*/
- &default
working_directory: ~/srz-zumix/iutest
shell: /bin/bash --login
docker:
- image: circleci/buildpack-deps:disco-curl
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
MAKE_OPTION: -j4 OUTPUTXML=1
MAKE_TARGET: default
MAKE_RUN_TARGET: test
# MAKE_TARGET: all_tests
# MAKE_RUN_TARGET: run_all_tests
- &restore_cache
keys:
# This branch if available
- v2-dep-{{ .Branch }}-
# Default branch if not
- v2-dep-master-
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
- v2-dep-
- &setup-step
name: SetUp
command: |
sudo apt-get -y --allow-unauthenticated update
sudo apt-get install software-properties-common
./.ci/linux/install-clang.sh
./.ci/linux/install-gcc.sh
- &save_cache
key: v2-dep-{{ .Branch }}-{{ epoch }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- &check-version-step
name: check compiler version
working_directory: test
command: |
if [ "$CIRCLE_NODE_INDEX" == "0" ]; then
make showcxxversion;
fi
- &min-tests-and-spec-step
name: minimum_tests and show feature / spec
command: if [ "$CIRCLE_NODE_INDEX" == "0" ]; then make minimum_tests && ./minimum_tests --spec --feature; fi
working_directory: test
- &build-step
name: build
command: |
make clean
case $CIRCLE_NODE_INDEX in \
0) make $MAKE_TARGET $MAKE_OPTION $MAKE_ADD_OPTION OPTIMIZE=-O2 ;; \
1) make $MAKE_TARGET $MAKE_OPTION $MAKE_ADD_OPTION OPTIMIZE=-O3 ;; \
2) make $MAKE_TARGET $MAKE_OPTION $MAKE_ADD_OPTION OPTIMIZE=-Os ;; \
3) make $MAKE_TARGET $MAKE_OPTION $MAKE_ADD_OPTION OPTIMIZE=$FAST_OPTIMIZE ;; \
esac
cp *.json $CIRCLE_ARTIFACTS/ 2>/dev/null || true
working_directory: test
- &test-step
name: run test
command: |
make $MAKE_RUN_TARGET
working_directory: test
- &move-result-step
name: move result xml
command: |
if [ "$CIRCLE_NODE_INDEX" == "0" ]; then
mkdir -p $CIRCLE_TEST_REPORTS/junit/;
find . -type f -regex ".*/test/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;;
fi
- &build-test-steps
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- restore_cache: *restore_cache
- run: *setup-step
- save_cache: *save_cache
# Test
- run: *check-version-step
- run: *min-tests-and-spec-step
- run: *build-step
- run: *test-step
- run: *move-result-step
# Teardown
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results
jobs:
gcc_optimize_test:
parallelism: 4
<<: *default
environment:
CXX: g++
GCC_VERSION: "8"
FAST_OPTIMIZE: -Og
# FAST_OPTIMIZE: -Ofast # https://github.com/srz-zumix/iutest/issues/396
steps: *build-test-steps
clang_optimize_test:
parallelism: 4
<<: *default
environment:
CXX: clang++
CLANG_VERSION: "9"
FAST_OPTIMIZE: -Ot
MAKE_ADD_OPTION: CXXFLAGS=-ftime-trace
steps: *build-test-steps
workflows:
version: 2.1
default-test:
jobs:
- gcc_optimize_test:
filters: *branch-filter
- clang_optimize_test:
filters: *branch-filter