Skip to content

Commit 395261f

Browse files
committed
Update Travis-CI to use the new homebrew addon
- This reduces the complexity of the CI infra and makes specifying dependencies easier - More testing on macOS should now be enabled using both: - Native CMake w/ Apple Clang and OpenMPI builds and - The projects Brewfile to build w/ GCC & MPICH
1 parent a956e55 commit 395261f

File tree

3 files changed

+44
-105
lines changed

3 files changed

+44
-105
lines changed

.travis.yml

Lines changed: 33 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,64 @@
11
---
2-
language: c
2+
language: minimal
33

44
os: osx
55

66
env:
77
global:
8-
# - ZERO_AR_DATE=1
8+
- ZERO_AR_DATE=1
99
- TZ=UTC
1010
- CACHE="${HOME}/.local"
11-
- MPICH_VER="3.2.1"
11+
- MPICH_VER="3.3"
1212
- MPICH_URL_HEAD="https://www.mpich.org/static/downloads/${MPICH_VER}"
1313
- MPICH_URL_TAIL="mpich-${MPICH_VER}.tar.gz"
14-
- MPICH_GCC6_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/1956499/"
15-
- MPICH_GCC7_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/1956441/"
16-
- MPICH_BOT_URL_TAIL="mpich-3.2.1_1.high_sierra.bottle.1.tar.gz"
1714
- BUILD_TYPES="Debug RelWithDebInfo Release CodeCoverage"
1815
- PATH="${HOME}/.local/bin:$PATH"
19-
# matrix:
20-
# - GCC="6 7" OSX_PACKAGES="gcc@7 gcc@6 cmake shellcheck" BUILD_TYPE="cmake"
2116

2217
matrix:
2318
fast_finish: true
2419
include:
2520
- &macOS
2621
os: osx
22+
osx_image: xcode10.2
2723
env:
2824
- BUILD_TYPE="InstallScript"
2925
GCC=9
30-
OSX_PACKAGES="gcc shellcheck cmake mpich"
31-
# cmake should be removed, but we should be installing binaries
32-
# because building from source takes forever
26+
CC=gcc-9
27+
CXX=g++-9
28+
addons:
29+
homebrew:
30+
packages:
31+
- gcc
32+
- mpich
33+
- shellcheck
34+
update: true
35+
-
36+
<<: *macOS
37+
env:
38+
- GCC=9
39+
FC=gcc-${GCC}
40+
addons:
41+
homebrew:
42+
packages:
43+
- cmake
44+
- gcc
45+
- openmpi
46+
- shellcheck
47+
update: true
3348
-
3449
<<: *macOS
3550
env:
3651
- GCC=9
37-
BUILD_TYPES="debug RelWithDebInfo Release"
38-
OSX_PACKAGES="gcc openmpi shellcheck cmake"
52+
FC=gcc-${GCC}
53+
CC=gcc-${GCC}
54+
addons:
55+
homebrew:
56+
brewfile: true
57+
update: true
3958
- &ubuntu
4059
os: linux
4160
sudo: false
42-
dist: trusty
61+
dist: xenial
4362
env:
4463
- GCC=8
4564
cache:
@@ -92,11 +111,9 @@ matrix:
92111

93112
allow_failures:
94113
- *linux_allowed_failure
95-
- osx
96114

97115
before_install:
98116
- source developer-scripts/travis/before_install.all.sh
99-
- developer-scripts/travis/before_install.${TRAVIS_OS_NAME}.sh
100117

101118
install:
102119
- pwd
@@ -113,56 +130,6 @@ after_script:
113130
- for version in ${GCC}; do bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC}) >> coverage.log 2>> coverage.err || true ; done
114131
- tail coverage.log || true
115132
- tail coverage.err || true
116-
- |
117-
if [[ "${TRAVIS_TAG}" ]]; then
118-
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
119-
echo "ERROR: You are trying to tag a new release but have a version missmatch in \`.VERSION\`"
120-
false # throw an error
121-
fi
122-
fi
123-
124-
# before_deploy:
125-
# - git archive -v --prefix "OpenCoarrays-${TRAVIS_TAG}/" -o "OpenCoarrays-${TRAVIS_TAG}.tar.gz" ${TRAVIS_TAG}
126-
# - |
127-
# echo '# To verify cryptographic checksums `shasum -c opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt` on Mac OS X,' > "opencoarrays-${TRAVIS_TAG}-SHA256.txt
128-
# echo '# `sha256sum -c opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt` on Linux.' >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
129-
# if [[ $(uname -s) == Darwin ]]; then
130-
# shasum -a 256 "OpenCoarrays-${TRAVIS_TAG}.tar.gz" >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
131-
# else
132-
# sha256sum "OpenCoarrays-${TRAVIS_TAG}.tar.gz" >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
133-
# fi
134-
# - |
135-
# openssl aes-256-cbc -K ${encrypted_ef4535c39461_key} -iv ${encrypted_ef4535c39461_iv} -in subkey-328B3A0E-secret.asc.enc -out ./subkey-328B3A0E-secret.asc -d
136-
# gpg --allow-secret-key-import --import ./subkey-328B3A0E-secret.asc && rm subkey-328B3A0E-secret.asc
137-
# rm subkey-328B3A0E-secret.* || true
138-
# unset encrypted_ef4535c39461_key || true
139-
# unset encrypted_ef4535c39461_iv || true
140-
# gpg --armor --detach-sign -u 328B3A0E --comment 'Mac users can use GPGTools - https://gpgtools.org' \
141-
# --comment "Download Izaak Beekman's GPG public key from your" \
142-
# --comment 'trusted key server or from' \
143-
# --comment 'https://izaakbeekman.com/izaak.pubkey.txt' \
144-
# --comment 'Next add it to your GPG keyring, e.g.,' \
145-
# --comment '`curl https://izaakbeekman.com/izaak.pubkey.txt | gpg --import`' \
146-
# --comment "Make sure you have verified that the release archive's" \
147-
# --comment 'SHA256 checksum matches the provided' \
148-
# --comment "opencoarrays-${TRAVIS_TAG}-SHA256.txt and ensure that this file" \
149-
# --comment "and it's signature are in the same directory. Then" \
150-
# --comment 'verify with:' \
151-
# --comment '`gpg --verify opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt.asc`' \
152-
# "opencoarrays-${TRAVIS_TAG}-SHA256.txt"
153-
154-
# deploy:
155-
# provider: releases
156-
# api_key:
157-
# secure: lBj4VgKhU74xfzPc0CDIji6cFrN/xEQIHLHjMcnDPWEF5JQe79aunMS5qiYu5ttve6khGI1WMFEe7clUO3TXiDUPyRMS4M8B2q3fuvUIsIbYgWcKq7ut+x6+dEQDj4DE3yWpPb8IDugWFp4vno1eQ2Rid1yr6Vn+rjnbE2i6z5SkXPnIv1ziQ9G+TF4ChUA8IOd1T78gJmML86P0rbt6nW8eVuJbza2y1ggHAY//q/b6rrbOFw5PqiOBqZ/BRrKJ5d2U2mvsoZtNn4OYyXw4eKEvNDIydwaIZROXfPRmN9zJ5G7+01QA5jlXpq17KfPBr7MXkn7nrQ5q9Z2ji4hRHk/AFzM/etfl1k4WCshYs13NlORpnU0vZtCMmmmsXWxj2kpsOHLWZQKdUAPs3olMPIG6aVnO5Abk1vrVSNy/ZeknbBTKCGScET1qRSaj6d43ynBwGkqHgaJdLBAwGe0Dpap6SsLGsAg56ZqHTngGlXB1KsbJKMkUsSC5RAgEuh9m55nsMaRlTYTrv+YADAQts7lV8yMCciMeJlrd3EYryyn4ZY1O82eOofhZZ5vQUktbXHtg6YnzguFwQyn+9yY/CQfi/vu2Aoq79NJEO/9UJ82ogn6gOoIebzb0xgIONjw4M68luR2U1CXtibzSYKWLGTeOj43khqZdbOpp6xncIv0=
158-
# file:
159-
# - "OpenCoarrays-${TRAVIS_TAG}.tar.gz"
160-
# - "opencoarrays-${TRAVIS_TAG}-SHA256.txt"
161-
# - "opencoarrays-${TRAVIS_TAG}-SHA256.txt.asc"
162-
# skip_cleanup: true
163-
# on:
164-
# tags: true
165-
# repo: sourceryinstitute/opencoarrays
166133

167134
notifications:
168135
webhooks:

developer-scripts/travis/install.osx.sh

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,7 @@ echo "Performing Travis-CI installation phase on macOS..."
2424
# Update and install via Homebrew on macOS
2525
brew update > /dev/null
2626

27-
brew install gcc || true
28-
brew link --overwrite gcc || true
29-
30-
for pkg in ${OSX_PACKAGES}; do
31-
brew ls --versions "${pkg}" >/dev/null || brew install "${pkg}" || brew link --overwrite "${pkg}"
32-
brew outdated "${pkg}" || brew upgrade "${pkg}"
33-
done
34-
35-
# Uninstall mpich and openmpi so that we can install our own version
36-
#brew uninstall --force --ignore-dependencies openmpi || true
37-
#brew uninstall --force --ignore-dependencies mpich || true
38-
39-
# Building CMake from source is very slow. We should be using binaries instead
40-
# if [[ "${BUILD_TYPE:-}" == InstallScript ]]; then # uninstall some stuff if present
41-
# brew uninstall --force --ignore-dependencies cmake || true
42-
# fi
27+
brew outdated
4328

4429
{
4530
mpif90 --version && mpif90 -show
@@ -51,4 +36,12 @@ done
5136
type -a cmake || echo "CMake not installed"
5237
cmake --version || true
5338

39+
echo "CC: ${CC}"
40+
echo "\$CC --version:"
41+
$CC --version || true
42+
43+
echo "FC: ${FC}"
44+
echo "\$FC --version:"
45+
$FC --version || true
46+
5447
echo "Done."

developer-scripts/travis/test-script.cmake.sh

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,9 @@ for version in ${GCC}; do
2525
mkdir "cmake-build-gcc${GCC}"
2626
export BLD_DIR="cmake-build-gcc${GCC}"
2727
export FC=gfortran-${version}
28-
export CC=gcc-${version}
29-
if [[ ${OSTYPE} == [Dd]arwin* ]]; then
30-
# We should use clang on macOS because that's what homebrew and everyone else does
31-
brew unlink openmpi || true
32-
brew unlink mpich || true
33-
for mpi in "mpich" "open-mpi"; do
34-
brew unlink "${mpi}" || true
35-
brew ls --versions "${mpi}" >/dev/null || brew install "${mpi}"
36-
brew outdated "${mpi}" || brew upgrade "${mpi}"
37-
brew unlink "${mpi}" || true
38-
done
39-
brew link --overwrite open-mpi
40-
otool -L "$(brew --prefix open-mpi)/lib/libmpi.dylib"
41-
otool -L "$(brew --prefix libevent)/lib/libevent.dylib"
42-
OMPI_CC="$(brew --prefix gcc)/bin/gcc-${version}"
43-
export OMPI_CC
44-
fi
28+
4529
${FC} --version
46-
${CC} --version
30+
${CC} --version || true
4731
mpif90 --version && mpif90 -show
4832
mpicc --version && mpicc -show
4933

@@ -56,9 +40,6 @@ for version in ${GCC}; do
5640
cmake -Wdev \
5741
-DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" \
5842
-DCMAKE_BUILD_TYPE:STRING="${BUILD_TYPE}" \
59-
-DMPI_CXX_SKIP_MPICXX:BOOL=ON \
60-
-DMPI_ASSUME_NO_BUILTIN_MPI:BOOL=ON \
61-
-DMPI_SKIP_GUESSING:BOOL=ON\
6243
..
6344
make -j 4
6445
CTEST_FLAGS=(--output-on-failure --schedule-random --repeat-until-fail "${NREPEAT:-5}" --timeout "${TEST_TIMEOUT:-200}")
@@ -68,8 +49,6 @@ for version in ${GCC}; do
6849
ctest "${CTEST_FLAGS[@]}"
6950
fi
7051
make install
71-
make hash_installed
72-
make install
7352
make uninstall
7453
)
7554
done

0 commit comments

Comments
 (0)