This repository has been archived by the owner on Oct 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
/
.travis.yml
175 lines (160 loc) · 4.67 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
language: cpp
sudo: true
cache: apt
dist: trusty
group: deprecated-2017Q3
addons:
apt:
sources: &apt_sources
- ubuntu-toolchain-r-test
- sourceline: 'ppa:kalakris/cmake' # cmake 2.8 for precise
- sourceline: 'ppa:adrozdoff/cmake' # cmake 3 for trusty
- sourceline: 'ppa:h-rayflood/llvm'
- sourceline: ppa:hvr/z3 # z3 for the smt interface package
packages: &default_packages
- cmake
- libgmp-dev
- libgoogle-perftools-dev
- g++-4.9
- clang-3.4
matrix:
include:
- os: linux
dist: precise
env:
CMAKE_CXX_COMPILER=g++-4.9
CMAKE_BUILD_TYPE=Release
UPLOAD=ON
STATIC=ON
FIRST=1
- os: linux
env:
CMAKE_CXX_COMPILER=clang++-3.4
CMAKE_BUILD_TYPE=Release
LEAN_EXTRA_MAKE_OPTS=-t0
TCMALLOC=ON
- os: linux
addons: &gcc6_addons
apt:
sources: *apt_sources
packages:
- *default_packages
- g++-6
- gcc-6
env:
CMAKE_CXX_COMPILER=g++-6
CMAKE_BUILD_TYPE=Release
TCMALLOC=ON
- os: linux
addons: *gcc6_addons
env:
CMAKE_CXX_COMPILER=g++-6
CMAKE_BUILD_TYPE=Release
TESTCOV=ON
- os: linux
addons: *gcc6_addons
env:
CMAKE_CXX_COMPILER=g++-6
CMAKE_BUILD_TYPE=Release
MULTI_THREAD=OFF
- os: linux
addons:
apt:
sources: *apt_sources
packages:
- *default_packages
- z3
env:
CMAKE_CXX_COMPILER=g++-4.9
CMAKE_BUILD_TYPE=Release
TEST=OFF
TEST_LEANPKG_REGISTRY=ON
- os: linux
env:
CMAKE_CXX_COMPILER=clang++-3.4
CMAKE_BUILD_TYPE=Debug
TCMALLOC=ON
- os: linux
dist: precise
env:
CMAKE_CXX_COMPILER=g++-4.9
CMAKE_BUILD_TYPE=Debug
- os: osx
env:
CMAKE_CXX_COMPILER=clang++
CMAKE_BUILD_TYPE=Release
UPLOAD=ON
TEST_LEANPKG_REGISTRY=ON
- os: osx
env:
CMAKE_CXX_COMPILER=g++
CMAKE_BUILD_TYPE=Debug
before_install:
- |
if [[ $TRAVIS_OS_NAME == osx ]]; then
brew update &&
(brew install gcc || brew link --overwrite gcc) &&
brew install gmp &&
# workaround for https://github.com/travis-ci/travis-ci/issues/6307
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
rvm get head || true
fi
script:
- set -e
- mkdir -p build
- cd build
- if [[ $TESTCOV != ON ]]; then TESTCOV=OFF; fi
- if [[ $TCMALLOC != ON ]]; then TCMALLOC=OFF; fi
- if [[ $STATIC != ON ]]; then STATIC=OFF; fi
- if [[ $MULTI_THREAD != OFF ]]; then MULTI_THREAD=ON; fi
- OPTIONS=""
- |
if [[ $TRAVIS_EVENT_TYPE == cron ]]
then
# trigger AppVeyor build from first Travis job because they can't be bothered to let us set up a cron build
[[ -n $FIRST ]] && curl -H "Authorization: Bearer $APPVEYOR_TOKEN" -H "Content-Type: application/json" https://ci.appveyor.com/api/builds -d '{"accountName": "leodemoura", "projectSlug": "lean", "branch": "master", "environmentVariables": {"APPVEYOR_SCHEDULED_BUILD": "True"}}'
git fetch --unshallow --tags origin
. ../script/setup_nightly.sh
fi
- cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
-DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER
-DTESTCOV=$TESTCOV
-DTCMALLOC=$TCMALLOC
-DMULTI_THREAD=$MULTI_THREAD
-DSTATIC=$STATIC
-DLEAN_EXTRA_MAKE_OPTS=$LEAN_EXTRA_MAKE_OPTS
$OPTIONS
../src
- make -j2
- if [[ $TEST != OFF ]]; then yes "A" | travis_wait 60 ctest -j2 --output-on-failure; fi
- |
# don't test packages when building nightly
if [[ $TEST_LEANPKG_REGISTRY == ON && -z $LEAN_VERSION_STRING ]]; then
(cd ../packages
if [[ $TRAVIS_OS_NAME == linux ]]; then ../bin/leanpkg add "https://github.com/leanprover/smt2_interface"; fi
../bin/leanpkg configure
for d in _target/deps/*; do (cd $d; ../../../../bin/leanpkg test); done)
fi
- if [[ $UPLOAD == ON ]]; then cpack; fi
- if [[ $UPLOAD == ON && $GH_TOKEN && $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == master ]]; then (cd ..; bash script/deploy_nightly.sh build/lean-*); fi
- cd ..
after_script:
- if [[ $TESTCOV == ON ]]; then bash <(curl -s https://codecov.io/bash) -x gcov-6; fi
notifications:
email:
recipients:
on_success: change
on_failure: always
deploy:
provider: releases
api_key: $GH_TOKEN
file_glob: true
file: build/lean-*
skip_cleanup: true
overwrite: true
on:
condition: $UPLOAD = ON && $GH_TOKEN
repo: leanprover/lean
tags: true