summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2018-03-27 04:09:56 -0400
committerAnthony Green <green@moxielogic.com>2018-03-27 04:09:56 -0400
commit24eb1f88d788399dde5fbb4804767e6b6cbf1bc8 (patch)
tree2fddc3d200ab0a26d0137045e7fb4dfac9b0915b
parentffc3ff162a15ed0ed0e946815c950c69ee0c8343 (diff)
downloadlibffi-24eb1f88d788399dde5fbb4804767e6b6cbf1bc8.tar.gz
Refactor travis build instructions. Add iOS build
-rwxr-xr-x.travis/build.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/.travis/build.sh b/.travis/build.sh
new file mode 100755
index 0000000..8de2e64
--- /dev/null
+++ b/.travis/build.sh
@@ -0,0 +1,34 @@
+#!/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 -showsdks
+ xcodebuild -project libffi.xcodeproj -target "libffi-iOS" -configuration Release -sdk iphoneos10.3
+ find ./
+}
+
+./autogen.sh
+case "$HOST" in
+ arm-apple-darwin*)
+ build_ios
+ ;;
+ *)
+ build_linux
+ ;;
+esac