forked from erthink/libfpta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
108 lines (102 loc) · 3.97 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
language: cpp
sudo: required
env:
global:
- secure: "VB9Ni1X3t4Ey08EdFKjwX74n66OedisIl5NgRZpcchcqW3wyU1w1wCE2lsYAGx26NwKh77CbFArmofLi6QpJarWnLpelwUnhNT02eggXFOCmMQSdrRNifScROBJJScCn8sFfPueJTw1MifGOHaruoqMrfjHWeuFZtaZV5Xku4cYOPNMgvQSxV5FradnjbfdzS0hmZQgh8XO7Mj6+nhDU0GTLENjajBZ6BAGBezpiR8FZ0PQjVkAEYn66qusUXSdFXVxi8lEqIC4ehLDwxtmImgtN05hpMETiR1mlO9AR3tZuLe0bk1u+gFabzbrPHHoSAb45yDI5k+C69hsmA5ntwkLOkE/ZWXqvqeA82yaAXdICq9E5knXpNJEiwAug+EC5SaY1nhi7/WdbrN9RlLh0kNdC4GvMQlw5pP2F64nDU2Dxq6meDLdXZ9NHVnU95QvGS2XpGJzZ69Y1cTe4cRGyCsQU3EIFspjL+e1ZnY3QOLpkg9W2Ni2h8lVFItUoBLgpAs+jNLwxCN+UY/QkvWTLK8CFrr7ym/SFMnQ3z/vS6YuPPKk4F2+EQxwomMY08MOjqXZzWeJQbfYdWGPhIYc9o35nUxLxfZ7aZDO55avRRZCk+gZRwddCxZjJigdeGlJCf26GI28E8oEHmjP07wfrJFSVfup4PdImKi7zIQPzg3c="
- GTEST_SHUFFLE=1
- GTEST_RUNTIME_LIMIT=99
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- libgtest-dev
- clang-format
- xz-utils
- coreutils
update: true
homebrew:
packages:
- xz
- base64
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++
# Disabled at 2021-02-27 since Bionic's GCC 7.5 has a bug with the __attribute__((cold))
# - 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 "-------------------------------------------------------------------------------"; \
xz -c -9 Testing/Temporary/LastTest.log | base64 && \
echo "-------------------------------------------------------------------------------"; \
exit 1) \
) && \
MALLOC_CHECK_=7 MALLOC_PERTURB_=42 externals/libfptu/test/fptu_c_mode && \
MALLOC_CHECK_=7 MALLOC_PERTURB_=42 test/fpta_c_mode
else
COVERITY_SCAN_PROJECT_NAME="leo-yuriev/libfpta" \
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