Skip to content

Commit

Permalink
travis: support OS X builds
Browse files Browse the repository at this point in the history
Add support for travis-ci OS X builds:
  - Add linux- prefix to existing build/prepare scripts
  - Create new OS X flavored build/prepare scripts
  - Update .travis.yml for OS X

At this time only one build job included in the matrix for OS X.

Signed-off-by: Lance Richardson <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
hlrichardson authored and blp committed Mar 23, 2016
1 parent 837351e commit 40a75bb
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 4 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ compiler:
- gcc
- clang

os:
- linux

addons:
apt:
packages:
Expand All @@ -13,7 +16,7 @@ addons:
- libjemalloc1
- libjemalloc-dev

before_install: ./.travis/prepare.sh
before_install: ./.travis/${TRAVIS_OS_NAME}-prepare.sh

before_script: export PATH=$PATH:$HOME/bin

Expand All @@ -34,7 +37,13 @@ env:
- KERNEL=3.10.96
- TESTSUITE=1 LIBS=-ljemalloc

script: ./.travis/build.sh $OPTS
matrix:
include:
- os: osx
compiler: clang
env: OPTS="--disable-ssl"

script: ./.travis/${TRAVIS_OS_NAME}-build.sh $OPTS

notifications:
email:
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions .travis/osx-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -o errexit

CFLAGS="-Werror -Wno-error=format $CFLAGS"
EXTRA_OPTS=""

function configure_ovs()
{
./boot.sh && ./configure $*
}

configure_ovs $EXTRA_OPTS $*

if [ "$CC" = "clang" ]; then
make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
else
make CFLAGS="$CFLAGS $BUILD_ENV"
fi
if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
if ! make distcheck RECHECK=yes; then
# testsuite.log is necessary for debugging.
cat */_build/tests/testsuite.log
exit 1
fi
fi

exit 0
3 changes: 3 additions & 0 deletions .travis/osx-prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -ev
pip install --user six
6 changes: 4 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ EXTRA_DIST = \
$(docs) \
NOTICE \
.travis.yml \
.travis/build.sh \
.travis/prepare.sh \
.travis/linux-build.sh \
.travis/linux-prepare.sh \
.travis/osx-build.sh \
.travis/osx-prepare.sh \
appveyor.yml \
boot.sh \
build-aux/cccl \
Expand Down

0 comments on commit 40a75bb

Please sign in to comment.