diff options
author | Anthony Green <green@moxielogic.com> | 2018-03-24 09:33:12 -0400 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2018-03-24 09:33:12 -0400 |
commit | e5de3bb28df43ddb203a6e6edafe80fd95449b78 (patch) | |
tree | c1eaa68c6e4c0c2b93916397abc39467f702913d | |
parent | 0081378017c33a4b9b6fbf20efabdd9959d6a48d (diff) | |
download | libffi-e5de3bb28df43ddb203a6e6edafe80fd95449b78.tar.gz |
Use travis build script
-rw-r--r-- | .travis.yml | 10 | ||||
-rw-r--r-- | .travis/build.sh | 31 |
2 files changed, 34 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index 35ad867..decc287 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,8 @@ matrix: env: HOST=i386-pc-linux-gnu MEVAL='export CC="$CC -m32" && CXX="$CXX -m32"' - os: linux env: HOST=moxie-elf MEVAL='export PATH=/opt/moxielogic/bin:$PATH && CC=moxie-elf-gcc && CXX=moxie-elf-g++' LDFLAGS=-Tsim.ld RUNTESTFLAGS="--target_board moxie-sim" DEJAGNU="$TRAVIS_BUILD_DIR/.travis/site.exp" + - os: osx + env: HOST=arm-apple-darwin before_install: - if test x"$MEVAL" != x; then eval ${MEVAL}; fi @@ -27,10 +29,4 @@ install: script: - if ! test x"$MEVAL" = x; then eval ${MEVAL}; fi - - ./autogen.sh - - ls -l m4 - - ./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS} - - make - - make dist - - make check RUNTESTFLAGS="-a $RUNTESTFLAGS" - - cat */testsuite/libffi.log + - ./.travis/build.sh diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100644 index 0000000..908991c --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# exit this script if any commmand fails +set -e + +function build_linux() +{ + ./autogen.sh + ./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS} + make + make dist + make check RUNTESTFLAGS="-a $RUNTESTFLAGS" + cat */testsuite/libffi.log +} + +function build_ios() +{ + which python +# export PYTHON_BIN=/usr/local/bin/python + ./generate-darwin-source-and-headers.py + xcodebuild -project libffi.xcodeproj -target "libffi iOS" -configuration Release -sdk iphoneos6.1 OTHER_CFLAGS="-no-integrated-as" +} + +case "$HOST" in + arm-apple-darwin*) + build_ios + ;; + *) + build_linux + ;; +esac |