/
config.yml
136 lines (134 loc) · 4.73 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
136
version: 2
default: &default
shell: /bin/bash --login
docker:
- image: circleci/buildpack-deps:cosmic-browsers
jobs:
optimize_test:
working_directory: ~/srz-zumix/iutest
parallelism: 4
<<: *default
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
MAKE_OPTION: -j4 OUTPUTXML=1
MAKE_TARGET: all_tests
MAKE_RUN_TARGET: run_all_tests
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- restore_cache: &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-
- run: &setup-step
name: SetUp
command: |
sudo apt-get -y --allow-unauthenticated update
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y 'deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic-7 main'
sudo apt-get -y --allow-unauthenticated update
sudo apt-get -qq install clang-7
sudo apt-get -qq install g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-7 60
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-7 60
- save_cache: &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
# Test
- run:
name: check compiler version
working_directory: test
command: |
if [ "$CIRCLE_NODE_INDEX" == "0" ]; then
make CXX=g++ showcxxversion;
make CXX=clang++ showcxxversion;
fi
- run:
name: g++ minimum_tests and show feature / spec
command: if [ "$CIRCLE_NODE_INDEX" == "0" ]; then make minimum_tests && ./minimum_tests --spec --feature; fi
working_directory: test
environment:
CXX: g++
- run:
name: clang++ minimum_tests and show feature / spec
command: if [ "$CIRCLE_NODE_INDEX" == "0" ]; then make minimum_tests && ./minimum_tests --spec --feature; fi
working_directory: test
environment:
CXX: clang++
- run:
name: g++ build
command: |
make clean
case $CIRCLE_NODE_INDEX in 0) make $MAKE_TARGET $MAKE_OPTION OPTIMIZE=-O2 ;; 1) make $MAKE_TARGET $MAKE_OPTION OPTIMIZE=-Os ;; 2) make $MAKE_TARGET $MAKE_OPTION OPTIMIZE=-O3 ;; 3) make $MAKE_TARGET $MAKE_OPTION OPTIMIZE=-O4 ;; esac
working_directory: test
environment:
CXX: g++
- run:
name: g++ test
command: |
make $MAKE_RUN_TARGET
working_directory: test
environment:
CXX: g++
- run:
name: clang++ build
command: |
make clean
case $CIRCLE_NODE_INDEX in 0) make $MAKE_TARGET $MAKE_OPTION OPTIMIZE=-O2 ;; 1) make $MAKE_TARGET $MAKE_OPTION OPTIMIZE=-Os ;; 2) make $MAKE_TARGET $MAKE_OPTION OPTIMIZE=-O3 ;; 3) make $MAKE_TARGET $MAKE_OPTION OPTIMIZE=-Oz ;; esac
working_directory: test
environment:
CXX: clang++
- run:
name: clang++ test
command: |
make $MAKE_RUN_TARGET
working_directory: test
environment:
CXX: clang++
- run:
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
# Teardown
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results
workflows:
version: 2
default-test:
jobs:
- optimize_test:
filters:
branches:
only:
- master
- develop
- /^feature.*/
- /^fix.*/
- /^circleci.*/