forked from ned14/outcome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
175 lines (167 loc) · 4.94 KB
/
.travis.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
dist: trusty
language: cpp
compiler:
- g++-6
- clang-4.0
sudo: false
os:
- linux
- osx
osx_image: xcode9
branches:
only:
- develop
notifications:
email:
recipients:
addons:
apt:
sources:
- ubuntu-toolchain-r-test
# - george-edison55-precise-backports
# - george-edison55-cmake-3.x
- llvm-toolchain-trusty-4.0
packages:
- g++-6
- clang-4.0
- cmake
- cmake-data
# - abi-compliance-checker
- abi-dumper
env:
# - __="Code bloat tests"
# - __="ABI stability" NAME=TravisABICheck
- __="Documentation" NAME=TravisDocumentation
- __="cmake tests" NAME=TravisLinuxWorker
- __="cmake tests osx" NAME=TravisOSXWorker
matrix:
exclude:
- os: osx
compiler: g++-6
# - os: linux
# compiler: clang-4.0
# env: __="ABI stability" NAME=TravisABICheck
- os: linux
compiler: clang-4.0
env: __="Documentation" NAME=TravisDocumentation
- os: linux
env: __="cmake tests osx" NAME=TravisOSXWorker
- os: osx
env: __="Code bloat tests"
# - os: osx
# env: __="ABI stability" NAME=TravisABICheck
- os: osx
env: __="Documentation" NAME=TravisDocumentation
- os: osx
env: __="cmake tests" NAME=TravisLinuxWorker
cache:
apt: true
directories:
- hugo_bin
before_install:
- git config --global push.default simple
- git config --global user.name "Jenkins nedprod CI"
- git config --global user.email "foo@nowhere"
- if [ ! -f "hugo_bin/hugo" ]; then
wget -O hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz;
mkdir hugo_bin;
tar xf hugo.tar.gz -C hugo_bin;
fi;
ls -l hugo_bin;
export PATH=$PATH:`pwd`/hugo_bin;
script:
-
if [ "$__" = "Code bloat tests" ]; then
cd test/constexprs;
./compile_and_count.py;
cat results.posix.xml;
if grep -q "failure message" results.posix.xml; then
exit 1;
fi;
fi
-
if [ "$__" = "ABI stability" ]; then
pip install ply --user `whoami`;
if [ "$CXX" = "g++" ]; then export CXX=g++-6; export NAME=TravisABICheck; fi;
mkdir build;
cd build;
cmake ..;
make outcome_hl-pp-abi;
cd ../abi-compliance;
sh ./check-abi.sh abi_dumps/Outcome/2.1/binary_only.dump;
fi
# sh ./check-api-abi.sh abi_dumps/Outcome/2.1/ABI.dump;
-
if [ "$__" = "cmake tests" ]; then
if [ "$CXX" = "g++" ]; then export CXX=g++-6; export NAME=TravisLinuxWorkerGCC; fi;
if [ "$CXX" = "clang++" ]; then export CXX=clang++-4.0; export NAME=TravisLinuxWorkerClang; fi;
ctest -S .ci.cmake -V;
fi
-
if [ "$__" = "cmake tests osx" ]; then
ctest -S .ci.cmake -V;
fi
- >
if [ "$__" = "Documentation" ]; then
cd doc/html;
git checkout gh-pages;
cd ../..;
CXX=clang++-4.0 ctest -S .docs.cmake -V;
cd doc/html;
echo "google-site-verification: google5fc8a1f8de4b73f0.html" > google5fc8a1f8de4b73f0.html;
git add . || true;
git commit -a -m "Travis CI updates documentation" || true;
git push -f https://jenkins-nedprod:[email protected]/ned14/outcome gh-pages;
cd ../..;
fi
after_success:
-
if [ "$__" = "cmake tests" ] && [ "$NAME" = "TravisLinuxWorkerGCC" ]; then
pip install --user gitpython;
git remote add outcome https://github.com/ned14/outcome;
git fetch outcome;
git submodule update --init;
cd ..;
git clone https://github.com/boostorg/outcome boost-outcome;
cd boost-outcome;
git checkout -b develop origin/develop;
git checkout master;
git remote add outcome https://github.com/ned14/outcome;
git fetch outcome;
git checkout -b orig-develop outcome/develop;
git checkout -b orig-master outcome/master;
git checkout master;
cd ..;
python outcome/include/outcome/quickcpplib/scripts/boostify_git_repo.py boost-outcome outcome ned14/outcome@;
cd boost-outcome;
git checkout master;
cd doc/src;
rm -rf ../html;
HUGO_BOOSTDOCDISABLECOMMONHEADING=1 hugo;
cd ../html;
git add . || true;
cd ../..;
git commit -a -m "Travis CI regenerates Boost.Outcome docs" || true;
git checkout develop;
cd doc/src;
rm -rf ../html;
HUGO_BOOSTDOCDISABLECOMMONHEADING=1 hugo;
cd ../html;
git add . || true;
cd ../..;
git commit -a -m "Travis CI regenerates Boost.Outcome docs" || true;
git push https://jenkins-nedprod:[email protected]/boostorg/outcome master || true;
git push https://jenkins-nedprod:[email protected]/boostorg/outcome develop || true;
cd doc;
rm -rf html;
git clone -b gh-pages --single-branch https://github.com/boostorg/outcome html;
cd src;
hugo;
cd ../html;
git add . || true;
git commit -a -m "Travis CI regenerates Boost.Outcome docs" || true;
git push -f https://jenkins-nedprod:[email protected]/boostorg/outcome gh-pages;
cd ../..;
fi
after_failure: