Skip to content

Commit aca08d6

Browse files
committed
Run developer test on linux only
Other .travis.yml enhancements: - Use more anchors and aliases to avoid repition - Try to upload code coverage info even when runs fail - Add a test timeout so that hung tests don't cause travis to abort - Use variables that can be overridden for the test timeouts (`TEST_TIMEOUT`) - Use variables that can be overridden for the number of times to repeat the test (`NREPEAT`)
1 parent 68a306c commit aca08d6

File tree

1 file changed

+21
-31
lines changed

1 file changed

+21
-31
lines changed

.travis.yml

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,72 +26,66 @@ matrix:
2626
- BUILD_TYPE="InstallScript"
2727
OSX_PACKAGES="gcc@6"
2828
GCC=6
29-
- os: osx
30-
env:
31-
- OSX_PACKAGES="gcc cmake"
32-
GCC=7
33-
OPENCOARRAYS_DEVELOPER=ON
3429
- &ubuntu
3530
os: linux
3631
sudo: false
3732
dist: trusty
3833
env:
3934
- GCC=6
4035
cache:
41-
apt: false
36+
apt: true
4237
directories:
4338
- "$CACHE"
4439
addons:
4540
apt:
46-
sources:
41+
sources: &linuxsrcs
4742
- ubuntu-toolchain-r-test
4843
- george-edison55-precise-backports
49-
packages:
44+
packages: &gcc6pkgs
5045
- gcc-6
5146
- gfortran-6
5247
- g++-6
5348
- binutils
5449
- cmake-data
5550
- cmake
56-
# - shellcheck
5751
-
5852
<<: *ubuntu
5953
env:
6054
- GCC=7
6155
addons:
6256
apt:
63-
sources:
64-
- ubuntu-toolchain-r-test
65-
- george-edison55-precise-backports
66-
packages:
57+
sources: *linuxsrcs
58+
packages: &gcc7pkgs
6759
- gcc-7
6860
- gfortran-7
6961
- g++-7
7062
- binutils
7163
- cmake-data
7264
- cmake
73-
# - shellcheck
7465
-
7566
<<: *ubuntu
7667
env:
7768
- BUILD_TYPE="InstallScript"
7869
GCC=6
79-
cache: false
8070
addons:
8171
apt:
82-
sources:
83-
- ubuntu-toolchain-r-test
72+
sources: *linuxsrcs
8473
packages:
8574
- gcc-6
8675
- gfortran-6
8776
- g++-6
88-
# - shellcheck
89-
allow_failures:
90-
- os: osx
77+
- &linux_allowed_failure
78+
<<: *ubuntu
9179
env:
92-
- OSX_PACKAGES="gcc cmake"
93-
GCC=7
80+
- GCC=7
9481
OPENCOARRAYS_DEVELOPER=ON
82+
addons:
83+
apt:
84+
sources: *linuxsrcs
85+
packages: *gcc7pkgs
86+
87+
allow_failures:
88+
- *linux_allowed_failure
9589

9690
before_install:
9791
- export FC=gfortran-${GCC}
@@ -181,7 +175,7 @@ script:
181175
if [[ ${BUILD_TYPE} == InstallScript ]]; then
182176
./install.sh --yes-to-all -i "${HOME}/opencoarrays" -j 4 -f "$(type -P "${FC}")" -c "$(type -P "${CC}")" -C "$(type -P "${CXX}")"
183177
cd prerequisites/builds/opencoarrays/*
184-
../../../installations/cmake/*/bin/ctest --output-on-failure --schedule-random --repeat-until-fail 7
178+
../../../installations/cmake/*/bin/ctest --output-on-failure --schedule-random --repeat-until-fail ${NREPEAT:-5}
185179
cd -
186180
else
187181
mkdir cmake-build || echo "Cannot mkdir cmake-build"
@@ -190,14 +184,17 @@ script:
190184
cd cmake-build || echo 'cannot cd to cmake-build/'
191185
cmake -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" .. || echo "running cmake failed"
192186
make -j 4 || echo "running make failed"
193-
ctest --output-on-failure --schedule-random --repeat-until-fail 7
187+
ctest --output-on-failure --schedule-random --repeat-until-fail ${NREPEAT:-5} --timeout ${TEST_TIMEOUT:-200}
194188
make install
195189
make uninstall
196190
cd ..
197191
done
198192
fi
199193
200194
after_script:
195+
- find . -name '*.gcno' -print
196+
- gcov-${GCC} --version
197+
- bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC})
201198
- |
202199
if [[ "${TRAVIS_TAG}" ]]; then
203200
if [[ "v${TRAVIS_TAG}" != "v$(sed -n '/[0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}/{s/^\([^.]*\)\([0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}\)\(.*\)/\2/p;q;}' .VERSION)" ]]; then
@@ -206,11 +203,6 @@ after_script:
206203
fi
207204
fi
208205
209-
after_success:
210-
- find . -name '*.gcno' -print
211-
- gcov-${GCC} --version
212-
- bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC})
213-
214206
# before_deploy:
215207
# - git archive -v --prefix "OpenCoarrays-${TRAVIS_TAG}/" -o "OpenCoarrays-${TRAVIS_TAG}.tar.gz" ${TRAVIS_TAG}
216208
# - |
@@ -222,7 +214,6 @@ after_success:
222214
# sha256sum "OpenCoarrays-${TRAVIS_TAG}.tar.gz" >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
223215
# fi
224216
# - |
225-
# set -o errexit
226217
# openssl aes-256-cbc -K ${encrypted_ef4535c39461_key} -iv ${encrypted_ef4535c39461_iv} -in subkey-328B3A0E-secret.asc.enc -out ./subkey-328B3A0E-secret.asc -d
227218
# gpg --allow-secret-key-import --import ./subkey-328B3A0E-secret.asc && rm subkey-328B3A0E-secret.asc
228219
# rm subkey-328B3A0E-secret.* || true
@@ -241,7 +232,6 @@ after_success:
241232
# --comment 'verify with:' \
242233
# --comment '`gpg --verify opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt.asc`' \
243234
# "opencoarrays-${TRAVIS_TAG}-SHA256.txt"
244-
# set +o errexit
245235

246236
# deploy:
247237
# provider: releases

0 commit comments

Comments
 (0)