5 if [ -z ${QEMU_CPU+x} ]; then
8 export SET_QEMU_CPU="-e QEMU_CPU=${QEMU_CPU}"
11 # Default to podman where available, docker otherwise.
12 # Override by setting the DOCKER environment variable.
13 if test -z "$DOCKER"; then
14 which podman > /dev/null 2>&1
22 function build_cfarm()
24 curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT} | tee build.log
25 echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
26 echo $(tail build.log | grep '^==LOGFILE==')
27 echo $(tail build.log | grep '^==LOGFILE==' | cut -b13-)
28 echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
29 curl -u ${CFARM_AUTH} "$(tail build.log | grep '^==LOGFILE==' | cut -b13-)" > libffi.log
31 ./rlgl l https://rl.gl
33 ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git libffi.log
37 function build_linux()
40 ./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS}
43 make check RUNTESTFLAGS="-a $RUNTESTFLAGS"
45 ./rlgl l https://rl.gl
47 ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
51 function build_foreign_linux()
53 ${DOCKER} run --rm -t -i -v `pwd`:/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh
55 ./rlgl l https://rl.gl
57 ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
61 function build_cross_linux()
63 ${DOCKER} run --rm -t -i -v `pwd`:/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -e CXX="${HOST}-g++-8 ${GCC_OPTIONS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" moxielogic/cross-ci-build-container:latest bash -c /opt/.travis/build-in-container.sh
65 ./rlgl l https://rl.gl
67 ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
74 # export PYTHON_BIN=/usr/local/bin/python
75 ./generate-darwin-source-and-headers.py --only-ios
77 xcodebuild -project libffi.xcodeproj -target "libffi-iOS" -configuration Release -sdk iphoneos11.4
81 function build_macosx()
84 # export PYTHON_BIN=/usr/local/bin/python
85 ./generate-darwin-source-and-headers.py --only-osx
87 xcodebuild -project libffi.xcodeproj -target "libffi-Mac" -configuration Release -sdk macosx10.13
102 build_foreign_linux arm moxielogic/arm32v7-ci-build-container:latest
104 aarch64-linux-gnu| powerpc64le-unknown-linux-gnu | mips64el-linux-gnu | sparc64-linux-gnu)
109 GCC_OPTIONS=-mcpu=547x build_cross_linux
111 alpha-linux-gnu | sh4-linux-gnu | s390x-linux-gnu )