99 - MPICH_VER="3.2"
1010 - MPICH_URL_HEAD="https://www.mpich.org/static/downloads/${MPICH_VER}"
1111 - MPICH_URL_TAIL="mpich-${MPICH_VER}.tar.gz"
12- - MPICH_DIR="${HOME}/.local/usr/mpich"
1312 - MPICH_GCC6_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/979804/"
1413 - MPICH_GCC7_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/976779/"
1514 - MPICH_BOT_URL_TAIL="mpich-3.2_3.yosemite.bottle.1.tar.gz"
1615 - BUILD_TYPES="Release Debug RelWithDebInfo CodeCoverage"
17- matrix : # shellcheck installed manually below for macOS
18- - GCC=6 OSX_PACKAGES="gcc@6 cmake "
19- - GCC=7 OSX_PACKAGES="gcc cmake"
16+ matrix :
17+ - GCC=6 OSX_PACKAGES="gcc@6 shellcheck" BUILD_TYPE="InstallScript "
18+ - GCC="6 7" OSX_PACKAGES="gcc gcc@6 cmake shellcheck" BUILD_TYPE=" cmake"
2019
2120matrix :
2221 fast_finish : true
2322 include :
24- - os : osx
25- env :
26- - BUILD_TYPE="InstallScript"
27- OSX_PACKAGES="gcc@6"
28- GCC=6
2923 - &ubuntu
3024 os : linux
3125 sudo : false
@@ -45,8 +39,6 @@ matrix:
4539 - gcc-6
4640 - gfortran-6
4741 - g++-6
48- - binutils
49- - cmake-data
5042 - cmake
5143 -
5244 << : *ubuntu
@@ -59,8 +51,6 @@ matrix:
5951 - gcc-7
6052 - gfortran-7
6153 - g++-7
62- - binutils
63- - cmake-data
6454 - cmake
6555 -
6656 << : *ubuntu
@@ -88,113 +78,20 @@ matrix:
8878 - *linux_allowed_failure
8979
9080before_install :
91- - export FC=gfortran-${GCC}
92- - export CC=gcc-${GCC}
93- - export CXX=g++-${GCC}
94- - export MPICH_BOT_URL_HEAD=MPICH_GCC${GCC}_BOT_URL_HEAD
95- - |
96- if [[ (-n ${TRAVIS_TAG}) && (${TRAVIS_OS_NAME} == osx) ]] && ${TRAVIS_SECURE_ENV_VARS} ; then
97- brew update > /dev/null
98- brew ls --versions gpg2 >/dev/null || brew install gpg2
99- brew outdated gpg2 || brew upgrade gpg2
100- type -P openssl || brew install openssl
101- fi
102- if ! [[ "${TRAVIS_TAG}" ]] || ! ${TRAVIS_SECURE_ENV_VARS} ; then
103- unset encrypted_ef4535c39461_key || true
104- unset encrypted_ef4535c39461_iv || true
105- rm subkey-328B3A0E-secret.asc{,.enc} || true
106-
107- fi
108- if [[ "${TRAVIS_TAG}" ]] ; then
109- curl https://izaakbeekman.com/izaak.pubkey.txt | gpg --import
110- git tag -v ${TRAVIS_TAG}
111- fi
112- - |
113- if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
114- export PATH="${PATH}:${HOME}/Library/Python/2.7/bin"
115- else
116- [[ -d "${CACHE}/bin" ]] || mkdir -p "${CACHE}/bin"
117- [[ -d "${MPICH_DIR}" ]] || mkdir -p "${MPICH_DIR}"
118- export PATH="${CACHE}/bin:${PATH}"
119- ${FC} --version
120- ${CC} --version
121- ${CXX} --version
122- fi
81+ - source developer-scripts/travis/before_install.all.sh
82+ - developer-scripts/travis/before_install.${TRAVIS_OS_NAME}.sh
12383
12484install :
125- - |
126- if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
127- brew update > /dev/null
128-
129- brew ls --versions shellcheck >/dev/null || brew install --force-bottle shellcheck
130- brew outdated shellcheck || brew upgrade --force-bottle shellcheck
131- for pkg in ${OSX_PACKAGES}; do
132- brew ls --versions ${pkg} >/dev/null || brew install ${pkg} || brew link --overwrite ${pkg}
133- brew outdated ${pkg} || brew upgrade ${pkg}
134- done
135- if [[ ${BUILD_TYPE} == InstallScript ]]; then # uninstall some stuff if present
136- brew uninstall --force --ignore-dependencies cmake || true
137- brew uninstall --force --ignore-dependencies mpich || true
138- brew uninstall --force --ignore-dependencies openmpi || true
139- else
140- wget "${!MPICH_BOT_URL_HEAD}${MPICH_BOT_URL_TAIL}"
141- brew install --force-bottle ${MPICH_BOT_URL_TAIL}
142- brew ls --versions mpich >/dev/null || brew install --force-bottle mpich
143- fi
144- mpif90 --version || mpif90 -show || true
145- mpicc --version || mpicc -show || true
146- cmake --version || true
147-
148- elif [[ ${BUILD_TYPE} != InstallScript ]]; then # Ubuntu on Travis-CI, NOT testing install.sh
149- if ! [[ -x "${HOME}/.local/bin/mpif90" && -x "${HOME}/.local/bin/mpicc" ]]; then
150- # mpich install not cached
151- # could use prerequisites/build instead...
152- wget "${MPICH_URL_HEAD}/${MPICH_URL_TAIL}"
153- mv "${MPICH_URL_TAIL}" "${MPICH_DIR}/.."
154- pushd "${MPICH_DIR}/.."
155- tar -xzvf "${MPICH_URL_TAIL}"
156- cd "${MPICH_URL_TAIL%.tar.gz}"
157- ./configure --prefix="${MPICH_DIR}"
158- make -j 4
159- make install
160- popd
161- for f in "${MPICH_DIR}/bin/"*; do
162- if [[ -x "${f}" ]]; then
163- ln -fs "${f}" "${HOME}/.local/bin/${f##*/}"
164- fi
165- done
166- fi
167- mpif90 --version
168- mpicc --version
169- cmake --version
170- fi
85+ - pwd
86+ - developer-scripts/travis/install.${TRAVIS_OS_NAME}.sh
17187
17288script :
173- - echo "In Travis-CI 'script' section."
174- - |
175- if [[ ${BUILD_TYPE} == InstallScript ]]; then
176- ./install.sh --yes-to-all -i "${HOME}/opencoarrays" -j 4 -f "$(type -P "${FC}")" -c "$(type -P "${CC}")" -C "$(type -P "${CXX}")"
177- cd prerequisites/builds/opencoarrays/*
178- ../../../installations/cmake/*/bin/ctest --output-on-failure --schedule-random --repeat-until-fail ${NREPEAT:-5}
179- cd -
180- else
181- mkdir cmake-build || echo "Cannot mkdir cmake-build"
182- for BUILD_TYPE in ${BUILD_TYPES}; do
183- rm -rf cmake-build/* || true
184- cd cmake-build || echo 'cannot cd to cmake-build/'
185- cmake -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" .. || echo "running cmake failed"
186- make -j 4 || echo "running make failed"
187- ctest --output-on-failure --schedule-random --repeat-until-fail ${NREPEAT:-5} --timeout ${TEST_TIMEOUT:-200}
188- make install
189- make uninstall
190- cd ..
191- done
192- fi
89+ - pwd
90+ - developer-scripts/travis/test-script.${BUILD_TYPE:-cmake}.sh
19391
19492after_script :
19593 - find . -name '*.gcno' -print
196- - gcov-${GCC} --version
197- - bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC})
94+ - for version in ${GCC}; do bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC}) ; done
19895 - |
19996 if [[ "${TRAVIS_TAG}" ]]; then
20097 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
@@ -254,3 +151,7 @@ notifications:
254151 on_success : change # options: [always|never|change]
255152 on_failure : always
256153 on_start : always
154+ email :
155+ on_success : change
156+ on_failure : always
157+ on_start : never
0 commit comments