Refactor travis build instructions. Add iOS build

This commit is contained in:
Anthony Green
2018-03-27 04:09:56 -04:00
parent ffc3ff162a
commit 24eb1f88d7

34
.travis/build.sh Executable file
View File

@@ -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