Skip to content

Commit 5192dbe

Browse files
authored
Merge pull request #429 from mwarusz/osx_local_clang
testing local clang with osx on Travis
2 parents ec5c801 + 721dc8f commit 5192dbe

File tree

9 files changed

+35
-8
lines changed

9 files changed

+35
-8
lines changed

.travis.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
- TEST_SUITE=nair_jablonowski_2008
1515
- TEST_SUITE=UWLCM
1616
- TEST_SUITE=pbl
17+
- TEST_SUITE=osx_local_clang
1718

1819
matrix:
1920
exclude:
@@ -25,6 +26,12 @@ matrix:
2526

2627
- compiler: clang
2728
env: TEST_SUITE=UWLCM # UWLCM is not tested on clang yet
29+
30+
# local clang tests on osx
31+
- os: linux
32+
env: TEST_SUITE=osx_local_clang
33+
- compiler: gcc
34+
env: TEST_SUITE=osx_local_clang
2835
addons:
2936
apt:
3037
packages:
@@ -48,8 +55,11 @@ before_install:
4855
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update; fi
4956

5057
# Workaround for upgrading gcc, see https://github.com/travis-ci/travis-ci/issues/8826
51-
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew cask uninstall oclint; fi
58+
# Seems like this is now done by Travis, but leaving it (commented out) for now
59+
#- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew cask uninstall oclint; fi
5260

61+
# needed to get rvm, see below
62+
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -; fi
5363
# https://github.com/travis-ci/travis-ci/issues/10165
5464
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then rvm get stable; fi
5565

@@ -79,6 +89,8 @@ install:
7989
# redefine CXX to the actual version used
8090
- if [[ $TRAVIS_OS_NAME == 'linux' && $COMPILER == 'clang++' ]]; then export CXX=clang++-4.0; fi
8191
- if [[ $TRAVIS_OS_NAME == 'linux' && $COMPILER == 'g++' ]]; then export CXX=g++-6; fi
92+
# downloads and setups local clang on osx
93+
- if [[ $TEST_SUITE == 'osx_local_clang' ]]; then . ./.travis_scripts/setup_local_clang.sh; fi
8294

8395
# boost
8496
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo $apt_get_install libboost1.55-all-dev; fi
@@ -142,3 +154,6 @@ script:
142154

143155
# running pbl tests in Release mode
144156
- if [[ $TEST_SUITE == 'pbl' ]]; then . ./.travis_scripts/pbl.sh; fi
157+
158+
# testing local clang on osx
159+
- if [[ $TEST_SUITE == 'osx_local_clang' ]]; then . ./.travis_scripts/unit.sh; fi # with '.' to pass env vars

.travis_scripts/UWLCM.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
set -ex
2+
set -e
33

44
# install libmpata++
55
cd libmpdata++/build

.travis_scripts/elliptic_drop.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
set -ex
2+
set -e
33
# installing
44
cd libmpdata++/build
55
sudo make install

.travis_scripts/nair_jablonowski_2008.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
set -ex
2+
set -e
33
cd tests/nair_jablonowski_2008
44
mkdir build
55
cd build

.travis_scripts/paper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
set -ex
2+
set -e
33
cd tests/paper_2015_GMD
44
mkdir build
55
cd build

.travis_scripts/pbl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
set -ex
2+
set -e
33
cd tests/sandbox
44
mkdir build
55
cd build

.travis_scripts/sandbox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
set -ex
2+
set -e
33
cd tests/sandbox
44
mkdir build
55
cd build
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env sh
2+
set -e
3+
mkdir local_clang
4+
cd local_clang
5+
export CLANG_VER=clang+llvm-6.0.0-x86_64-apple-darwin
6+
wget http://releases.llvm.org/6.0.0/$CLANG_VER.tar.xz
7+
tar -xf $CLANG_VER.tar.xz
8+
export LLVM_PATH=`pwd`/$CLANG_VER
9+
export CXX=$LLVM_PATH/bin/clang++
10+
export LDFLAGS=$LDFLAGS" -L "$LLVM_PATH/lib" -Wl,-rpath,"$LLVM_PATH/lib
11+
export CPPFLAGS=$CPPFLAGS" -I"$LLVM_PATH/include" -I"$LLVM_PATH/include/c++/v1/
12+
cd ..

.travis_scripts/unit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
set -ex
2+
set -e
33
cd tests/unit
44
mkdir build
55
cd build

0 commit comments

Comments
 (0)