-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
101 lines (95 loc) · 3.76 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
language: cpp
sudo: required
env:
global:
- secure: "rX82CxWJ5AauFnCyEYAvR7IW33A1wHZaGepTea/qsBt6HDe092XD8j7HjM3Dokksaklpm0wGa8aFsPLDjy9QSOROL+7spjXUBIJGjZtSiQwl9jRa7IPpKte9SU5pTVavu1gmCmjVkM6h1E3UV5ick8atDS0hTx062R7aNILcqYLLJOw6MnP9d1ldfVKaRV1HtfBqbVgzivp312ubITeyGG9FTxec2JeBwZNSLtv/8IpZSADBeEAlYEXlFN3DoARsNDw/hnO0zoffk2Za7BaIyXT2jMrx0Izq3e1s0hMvLmP/l6Io9R2UJKJFNr+YQEsbPmCi0m780uHfP7qwUqo9GTiscmypqRmhke1E6DqPvnPgJ8I13XEbVDrOua+8U5fqdQPOwt1UJ5B6ZfKxYBl1Zj1jSGM7iSAueKbVWSeSaWrcswO0PRdt7GiLg9IH13UeNzGuzjfv3Yk5Y2Crm+rafLo9eJd5SmBBb2d8r2iXddcJyNuvnCtr2Qzn7p5OAuyuAp8fKOWkldHqrMzaW5TcdWoqIDzpaM/12mtojBeGt7QltPKpUTdnCnExcf80mi1H8zHg3p91YxaFmTXmqti0B7aFG+X+sSKX/jpUgfzXUJAlc+qavl7AAoAY5UN+6aSWs4aeIPnSfq0t8y9Yc3kCuwVEvmFb5L1z3QFNSVdsEgQ="
- GTEST_SHUFFLE=1
- GTEST_RUNTIME_LIMIT=99
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- libgtest-dev
- re2c
- lemon
- clang-format
update: true
matrix:
include:
- os: linux
dist: focal
compiler: gcc
env: CC=cc CXX=c++
- os: linux
dist: focal
compiler: clang
env: CC=clang CXX=clang++
- os: linux
dist: bionic
compiler: gcc
env: CC=cc CXX=c++
- os: linux
dist: bionic
compiler: clang
env: CC=clang CXX=clang++
- os: linux
dist: xenial
compiler: gcc
env: CC=cc CXX=c++
- os: linux
dist: xenial
compiler: clang
env: CC=clang CXX=clang++
- os: osx
osx_image: xcode11.3
env: CC=cc CXX=c++
- os: osx
osx_image: xcode9.4
env: CC=cc CXX=c++
before_script: |
if [ "${TRAVIS_BRANCH}" = "coverity_scan" ]; then
# call Coverity Scan manually of addons.coverity_scan for first job only
if [ "${TRAVIS_JOB_NUMBER}" = "${TRAVIS_BUILD_NUMBER}.1" ]; then
export COVERITY_SCAN_BRANCH=1
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' -o coverity_scan.sh
else
echo 'echo "Skip CoverityScan for unrelated os/compiler"' > coverity_scan.sh
fi
fi
script: |
git fetch --unshallow --tags --prune --force
git submodule foreach --recursive git fetch --unshallow --tags --prune --force
cmake --version
if [ ! -s ./coverity_scan.sh ]; then
cmake . && \
make --keep-going all && \
(MALLOC_CHECK_=7 MALLOC_PERTURB_=42 make --keep-going test || \
(echo "-------------------------------------------------------------------------------"; \
cat Testing/Temporary/*.log && \
echo "-------------------------------------------------------------------------------" ) \
) && \
([ ! -x test/fptu_c_mode ] || MALLOC_CHECK_=7 MALLOC_PERTURB_=42 test/fptu_c_mode)
else
COVERITY_UNSUPPORTED_COMPILER_INVOCATION=1 \
COVERITY_SCAN_PROJECT_NAME="leo-yuriev/libfptu" \
COVERITY_SCAN_NOTIFICATION_EMAIL="leo@yuriev.ru" \
COVERITY_SCAN_BUILD_COMMAND_PREPEND="cmake -DCMAKE_BUILD_TYPE=Debug ." \
COVERITY_SCAN_BUILD_COMMAND="make" \
COVERITY_SCAN_BRANCH_PATTERN="$TRAVIS_BRANCH" \
bash ./coverity_scan.sh || cat cov-int/scm_log.txt
fi
after_script: |
if [ "${TRAVIS_BRANCH}" != "coverity_scan" -a "${TRAVIS_JOB_NUMBER}" = "${TRAVIS_BUILD_NUMBER}.1" ] && make reformat && [[ -n $(git diff) ]]; then
echo "You must run 'make reformat' before submitting a pull request"
echo "-------------------------------------------------------------------------------"
git diff
sleep 1
echo "-------------------------------------------------------------------------------"
sleep 1
exit -1
fi
echo "-------------------------------------------------------------------------------"
sleep 1