Hash :
825b2a35
Author :
Date :
2019-10-16T16:05:46
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#!/bin/bash
function build_linux()
{
./autogen.sh
./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS}
make
make dist
make check RUNTESTFLAGS="-a $RUNTESTFLAGS"
EXITCODE=$?
gzip -c -9 */testsuite/libffi.log > libffi.log.gz
echo ================================================================
echo The logs are too long for travis to handle, so we compress and
echo uuencode them. Download, decode and uncompress if you need to
echo read them. For example, if you select and save this text
echo as libffi.uu, run: 'cat libffi.uu | uudecode | gzip -d | less'.
echo ================================================================
uuencode libffi.log.gz -
echo ================================================================
echo ================================================================
exit $EXITCODE
}
function build_foreign_linux()
{
docker run --rm -t -i -v `pwd`:/opt --rm -ti -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh
exit $?
}
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 iphoneos11.4
exit $?
}
./autogen.sh
case "$HOST" in
arm-apple-darwin*)
build_ios
;;
arm32v7-linux-gnu)
build_foreign_linux arm moxielogic/arm32v7-ci-build-container:latest
;;
aarch64-linux-gnu)
build_foreign_linux aarch64 moxielogic/aarch64-ci-build-container:latest
;;
ppc64le-linux-gnu)
build_foreign_linux ppc64le moxielogic/ppc64le-ci-build-container:latest
;;
s390x-linux-gnu)
build_foreign_linux s390x s390x/ubuntu
;;
*)
build_linux
;;
esac