Skip to content

Commit 82ccc59

Browse files
authored
Merge pull request #376 from sourceryinstitute/travis-experiment
Travis-CI tidy and expand build matrix for GCC 7, with and without developer tests
2 parents 29c7c92 + 34f470a commit 82ccc59

File tree

6 files changed

+224
-192
lines changed

6 files changed

+224
-192
lines changed

.pullapprove.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
---
12
version: 2
2-
extends: Default # see https://pullapprove.com/sourceryinstitute/
3+
extends: Default # see https://pullapprove.com/sourceryinstitute/
34
groups:
45
# These have all the group_defaults
56
Maintainers:
@@ -13,9 +14,9 @@ groups:
1314
- caffeinate-opencoarrays
1415
teams:
1516
- team-opencoarrays
16-
# https://github.com/orgs/sourceryinstitute/teams/team-opencoarrays
17+
# https://github.com/orgs/sourceryinstitute/teams/team-opencoarrays
1718
OpenCoarrays:
18-
# Whenever someone has a PR, on any branch require at least 1
19+
# Whenever someone has a PR, on any branch require at least 1
1920
# collaborator to explicitly review it
2021
required: 1
2122
users: all

.travis.yml

Lines changed: 102 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
1+
---
12
language: generic
23

4+
os: osx
5+
36
env:
47
global:
5-
- CACHE="$HOME/.local"
8+
- CACHE="${HOME}/.local"
69
- MPICH_VER="3.2"
7-
- MPICH_URL_HEAD="http://www.mpich.org/static/downloads/$MPICH_VER"
10+
- MPICH_URL_HEAD="http://www.mpich.org/static/downloads/${MPICH_VER}"
811
- MPICH_URL_TAIL="mpich-${MPICH_VER}.tar.gz"
9-
- MPICH_DIR="$HOME/.local/usr/mpich"
10-
- MPICH_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/976766/"
12+
- MPICH_DIR="${HOME}/.local/usr/mpich"
13+
- MPICH_GCC6_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/979804/"
14+
- MPICH_GCC7_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/976779/"
1115
- MPICH_BOT_URL_TAIL="mpich-3.2_3.yosemite.bottle.1.tar.gz"
12-
- FC=gfortran-6
13-
- CC=gcc-6
14-
- CXX=g++-6
16+
- BUILD_TYPES="Release Debug RelWithDebInfo CodeCoverage"
17+
matrix:
18+
- GCC=6 OSX_PACKAGES="gcc@6 cmake"
19+
- GCC=7 OSX_PACKAGES="gcc cmake"
1520

1621
matrix:
22+
fast_finish: true
1723
include:
1824
- os: osx
1925
env:
20-
- BUILD_TYPE="CodeCoverage"
21-
OSX_PACKAGES="gcc@6 cmake"
22-
- os: osx
23-
env:
24-
- BUILD_TYPE="Release"
25-
OSX_PACKAGES="gcc@6 cmake"
26+
- BUILD_TYPE="InstallScript"
27+
OSX_PACKAGES="gcc@6"
28+
GCC=6
2629
- os: osx
2730
env:
28-
- BUILD_TYPE="InstallScript"
29-
OSX_PACKAGES="gcc@6"
31+
- OSX_PACKAGES="gcc cmake"
32+
GCC=7
33+
OPENCOARRAYS_DEVELOPER=ON
3034
- &ubuntu
3135
os: linux
3236
sudo: false
3337
env:
34-
- BUILD_TYPE="CodeCoverage"
38+
- GCC=6
3539
cache:
3640
apt: false
3741
directories:
@@ -48,14 +52,27 @@ matrix:
4852
- binutils
4953
- cmake-data
5054
- cmake
51-
-
52-
<<: *ubuntu
53-
env:
54-
- BUILD_TYPE="Release"
55+
# -
56+
# <<: *ubuntu
57+
# env:
58+
# - GCC=7
59+
# addons:
60+
# apt:
61+
# sources:
62+
# - ubuntu-toolchain-r-test
63+
# - george-edison55-precise-backports
64+
# packages:
65+
# - gcc-7
66+
# - gfortran-7
67+
# - g++-7
68+
# - binutils
69+
# - cmake-data
70+
# - cmake
5571
-
5672
<<: *ubuntu
5773
env:
5874
- BUILD_TYPE="InstallScript"
75+
GCC=6
5976
cache: false
6077
addons:
6178
apt:
@@ -65,86 +82,92 @@ matrix:
6582
- gcc-6
6683
- gfortran-6
6784
- g++-6
85+
allow_failures:
86+
- os: osx
87+
env:
88+
- OSX_PACKAGES="gcc cmake"
89+
GCC=7
90+
OPENCOARRAYS_DEVELOPER=ON
6891

6992
before_install:
93+
- export FC=gfortran-${GCC}
94+
- export CC=gcc-${GCC}
95+
- export CXX=g++-${GCC}
96+
- export MPICH_BOT_URL_HEAD=MPICH_GCC${GCC}_BOT_URL_HEAD
7097
- |
7198
set -o errexit
72-
if [[ "$TRAVIS_TAG" ]] && [[ "X$TRAVIS_OS_NAME" = "Xosx" ]] && $TRAVIS_SECURE_ENV_VARS ; then
99+
if [[ (-n ${TRAVIS_TAG}) && (${TRAVIS_OS_NAME} == osx) ]] && ${TRAVIS_SECURE_ENV_VARS} ; then
73100
brew update > /dev/null
74101
[[ "$(brew ls --versions gpg2)" ]] || brew install gpg2
75102
brew outdated gpg2 || brew upgrade gpg2
76-
which openssl || brew install openssl
103+
type -P openssl || brew install openssl
77104
fi
78-
if ! [[ "$TRAVIS_TAG" ]] || ! $TRAVIS_SECURE_ENV_VARS ; then
105+
if ! [[ "${TRAVIS_TAG}" ]] || ! ${TRAVIS_SECURE_ENV_VARS} ; then
79106
unset encrypted_ef4535c39461_key || true
80107
unset encrypted_ef4535c39461_iv || true
81108
rm subkey-328B3A0E-secret.asc{,.enc} || true
82109
83110
fi
84-
if [[ "$TRAVIS_TAG" ]] ; then
111+
if [[ "${TRAVIS_TAG}" ]] ; then
85112
curl https://izaakbeekman.com/izaak.pubkey.txt | gpg --import
86113
git tag -v ${TRAVIS_TAG}
87114
fi
88115
set +o errexit
89-
-
90-
-
91-
-
92116
- |
93117
set -o errexit
94-
if [[ $TRAVIS ]] && [[ "X$TRAVIS_OS_NAME" = "Xosx" ]]; then
95-
export PATH="$PATH:$HOME/Library/Python/2.7/bin"
118+
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
119+
export PATH="${PATH}:${HOME}/Library/Python/2.7/bin"
96120
else
97-
[[ -d "$CACHE/bin" ]] || mkdir -p "$CACHE/bin"
98-
[[ -d "$MPICH_DIR" ]] || mkdir -p "$MPICH_DIR"
99-
export PATH="$CACHE/bin:$PATH"
100-
$FC --version
101-
$CC --version
102-
$CXX --version
121+
[[ -d "${CACHE}/bin" ]] || mkdir -p "${CACHE}/bin"
122+
[[ -d "${MPICH_DIR}" ]] || mkdir -p "${MPICH_DIR}"
123+
export PATH="${CACHE}/bin:${PATH}"
124+
${FC} --version
125+
${CC} --version
126+
${CXX} --version
103127
fi
104128
set +o errexit
105129
106130
install:
107131
- |
108132
set -o errexit
109-
if [[ $TRAVIS ]] && [[ "X$TRAVIS_OS_NAME" = "Xosx" ]]; then
133+
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
110134
brew update > /dev/null
111135
112-
for pkg in $OSX_PACKAGES; do
113-
[[ "$(brew ls --versions $pkg)" ]] || brew install --force-bottle $pkg
114-
brew outdated $pkg || brew upgrade --force-bottle $pkg
136+
for pkg in ${OSX_PACKAGES}; do
137+
[[ "$(brew ls --versions ${pkg})" ]] || brew install --force-bottle ${pkg}
138+
brew outdated ${pkg} || brew upgrade --force-bottle ${pkg}
115139
done
116-
if ! [[ "$(brew ls --versions mpich)" ]] && [[ "X$BUILD_TYPE" != "XInstallScript" ]]; then
117-
wget ${MPICH_BOT_URL_HEAD}${MPICH_BOT_URL_TAIL}
140+
if [[ ${BUILD_TYPE} == InstallScript ]]; then # uninstall some stuff if present
141+
brew uninstall --force --ignore-dependencies cmake || true
142+
brew uninstall --force --ignore-dependencies mpich || true
143+
brew uninstall --force --ignore-dependencies openmpi || true
144+
else
145+
wget "${!MPICH_BOT_URL_HEAD}${MPICH_BOT_URL_TAIL}"
118146
brew install --force-bottle ${MPICH_BOT_URL_TAIL}
119147
if ! [[ "$(brew ls --versions mpich)" ]]; then
120148
brew install --force-bottle mpich
121149
fi
122-
rm -rf /usr/local/opt/gcc || true
123-
ln -s /usr/local/opt/gcc@6 /usr/local/opt/gcc # hack to get dynamic linker to find gcc 6 stuff
124-
mpif90 --version || mpif90 -show
125-
mpicc --version || mpicc -show
126-
cmake --version
127-
elif [[ "X$BUILD_TYPE" = "XInstallScript" ]]; then # uninstall some stuff if present
128-
[[ "$(brew ls --versions cmake)" ]] && brew rm cmake || true
129-
[[ "$(brew ls --versions mpich)" ]] && brew rm mpich || true
130-
[[ "$(brew ls --versions openmpi)" ]] && brew rm openmpi || true
131150
fi
132-
elif [[ "X$BUILD_TYPE" != "XInstallScript" ]]; then # Ubuntu on Travis-CI, NOT testing install.sh
133-
if ! ( [[ -x "$HOME/.local/bin/mpif90" ]] && [[ -x "$HOME/.local/bin/mpicc" ]] ); then
151+
mpif90 --version || mpif90 -show || true
152+
mpicc --version || mpicc -show || true
153+
cmake --version || true
154+
155+
elif [[ ${BUILD_TYPE} != InstallScript ]]; then # Ubuntu on Travis-CI, NOT testing install.sh
156+
if ! [[ -x "${HOME}/.local/bin/mpif90" && -x "${HOME}/.local/bin/mpicc" ]]; then
134157
# mpich install not cached
135158
# could use prerequisites/build instead...
136159
wget "${MPICH_URL_HEAD}/${MPICH_URL_TAIL}"
137-
mv "$MPICH_URL_TAIL" "$MPICH_DIR/.."
138-
pushd "$MPICH_DIR/.."
139-
tar -xzvf "$MPICH_URL_TAIL"
160+
mv "${MPICH_URL_TAIL}" "${MPICH_DIR}/.."
161+
pushd "${MPICH_DIR}/.."
162+
tar -xzvf "${MPICH_URL_TAIL}"
140163
cd "${MPICH_URL_TAIL%.tar.gz}"
141-
./configure --prefix="$MPICH_DIR"
164+
./configure --prefix="${MPICH_DIR}"
142165
make -j 4
143166
make install
144167
popd
145-
for f in "$MPICH_DIR/bin/"*; do
146-
if [[ -x "$f" ]]; then
147-
ln -fs "$f" "$HOME/.local/bin/${f##*/}"
168+
for f in "${MPICH_DIR}/bin/"*; do
169+
if [[ -x "${f}" ]]; then
170+
ln -fs "${f}" "${HOME}/.local/bin/${f##*/}"
148171
fi
149172
done
150173
fi
@@ -157,55 +180,55 @@ install:
157180
script:
158181
- |
159182
set -o errexit
160-
if [[ "X$BUILD_TYPE" = "XInstallScript" ]]; then
161-
[[ -d "$HOME/opt" ]] || mkdir "$HOME/opt"
162-
[[ -d "$HOME/bin" ]] || mkdir "$HOME/bin"
163-
ln -fs "$(which gfortran-6)" "$HOME/bin/gfortran"
164-
ln -fs "$(which gcc-6)" "$HOME/bin/gcc"
165-
ln -fs "$(which g++-6)" "$HOME/bin/g++"
166-
export PATH="$PATH:$HOME/bin"
167-
./install.sh --yes-to-all -i "$HOME/opt/opencoarrays" -j 4 -f "$HOME/bin/gfortran" -c "$HOME/bin/gcc" -C "$HOME/bin/g++"
183+
if [[ ${BUILD_TYPE} == InstallScript ]]; then
184+
./install.sh --yes-to-all -i "${HOME}/opencoarrays" -j 4 -f "$(type -P "${FC}")" -c "$(type -P "${CC}")" -C "$(type -P "${CXX}")"
168185
cd prerequisites/builds/opencoarrays/*
169186
../../../installations/cmake/*/bin/ctest --output-on-failure --schedule-random --repeat-until-fail 7
170187
cd -
171188
else
172189
mkdir cmake-build
173-
cd cmake-build
174-
cmake -DCMAKE_INSTALL_PREFIX:PATH="$HOME/OpenCoarrays" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" ..
175-
make -j 4
176-
ctest --output-on-failure --schedule-random --repeat-until-fail 7
177-
make install
178-
cd ..
190+
for BUILD_TYPE in ${BUILD_TYPES}; do
191+
rm -rf cmake-build/* || true
192+
cd cmake-build
193+
cmake -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ..
194+
make -j 4
195+
ctest --output-on-failure --schedule-random --repeat-until-fail 7
196+
make install
197+
make uninstall
198+
cd ..
199+
done
179200
fi
180201
set +o errexit
181202
182203
after_script:
183204
- |
184-
if [ "$TRAVIS_TAG" ]; then
185-
if [[ "v$TRAVIS_TAG" != "v$(sed -n 's/\([0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}\)/\1/p' .VERSION)" ]]; then
205+
set -o errexit
206+
if [[ "${TRAVIS_TAG}" ]]; then
207+
if [[ "v${TRAVIS_TAG}" != "v$(sed -n 's/\([0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}\)/\1/p' .VERSION)" ]]; then
186208
echo "ERROR: You are trying to tag a new release but have a version missmatch in \`.VERSION\`"
187209
false # throw an error
188210
fi
189211
fi
212+
set +o errexit
190213
191214
after_success:
192215
- find . -name '*.gcno' -print
193-
- gcov-6 --version
194-
- bash <(curl -s https://codecov.io/bash) -x $(which gcov-6)
216+
- gcov-${GCC} --version
217+
- bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC})
195218

196219
# before_deploy:
197220
# - git archive -v --prefix "OpenCoarrays-${TRAVIS_TAG}/" -o "OpenCoarrays-${TRAVIS_TAG}.tar.gz" ${TRAVIS_TAG}
198221
# - |
199222
# echo '# To verify cryptographic checksums `shasum -c opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt` on Mac OS X,' > "opencoarrays-${TRAVIS_TAG}-SHA256.txt
200223
# echo '# `sha256sum -c opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt` on Linux.' >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
201-
# if [[ "X$(uname -s)" == "XDarwin" ]]; then
224+
# if [[ $(uname -s) == Darwin ]]; then
202225
# shasum -a 256 "OpenCoarrays-${TRAVIS_TAG}.tar.gz" >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
203226
# else
204227
# sha256sum "OpenCoarrays-${TRAVIS_TAG}.tar.gz" >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
205228
# fi
206229
# - |
207230
# set -o errexit
208-
# openssl aes-256-cbc -K $encrypted_ef4535c39461_key -iv $encrypted_ef4535c39461_iv -in subkey-328B3A0E-secret.asc.enc -out ./subkey-328B3A0E-secret.asc -d
231+
# openssl aes-256-cbc -K ${encrypted_ef4535c39461_key} -iv ${encrypted_ef4535c39461_iv} -in subkey-328B3A0E-secret.asc.enc -out ./subkey-328B3A0E-secret.asc -d
209232
# gpg --allow-secret-key-import --import ./subkey-328B3A0E-secret.asc && rm subkey-328B3A0E-secret.asc
210233
# rm subkey-328B3A0E-secret.* || true
211234
# unset encrypted_ef4535c39461_key || true

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set ( CMAKE_BUILD_TYPE "Release"
77
set_property ( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
88

99
# Add option and check environment to determine if developer tests should be run
10-
if(ENV{OPENCOARRAYS_DEVELOPER})
10+
if($ENV{OPENCOARRAYS_DEVELOPER})
1111
option(RUN_DEVELOPER_TESTS "Run tests intended only for developers" ON)
1212
else()
1313
option(RUN_DEVELOPER_TESTS "Run tests intended only for developers" OFF)
@@ -477,6 +477,7 @@ if(opencoarrays_aware_compiler)
477477
add_mpi_test(register_alloc_comp_2 2 ${tests_root}/unit/init_register/register_alloc_comp_2)
478478
add_mpi_test(register_alloc_comp_3 2 ${tests_root}/unit/init_register/register_alloc_comp_3)
479479
if (RUN_DEVELOPER_TESTS)
480+
message ( STATUS "Running Developer tests is enabled." )
480481
add_mpi_test(async_comp_alloc 6 ${tests_root}/unit/init_register/async_comp_alloc)
481482
# Timeout async_comp_alloc test after 3 seconds to progess past the known failure
482483
set_property(TEST async_comp_alloc PROPERTY TIMEOUT_AFTER_MATCH 3 "known failure")

codecov.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1+
---
12
comment:
23
layout: header, changes, diff, sunburst
34
coverage:
45
ignore:
5-
- src/tests
6-
- src/single
7-
- src/gasnet
8-
- src/mpi_cuda
9-
- src/armci
6+
- src/tests
7+
- src/single
8+
- src/gasnet
9+
- src/mpi_cuda
10+
- src/armci
1011
notify:
1112
gitter:
1213
default:
1314
branches:
14-
- master
15+
- master
1516
threshold: '0.1'
1617
url: https://webhooks.gitter.im/e/cd081feecb000a89d36b
1718
slack:
1819
default:
1920
branches:
20-
- master
21+
- master
2122
threshold: '0.01'
2223
url: https://hooks.slack.com/services/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
2324
status:
2425
patch: false
2526
project:
2627
default:
2728
branches:
28-
- master
29-
- devel
29+
- master
30+
- devel
3031
target: auto
31-

0 commit comments

Comments
 (0)