diff --git a/.travis.yml b/.travis.yml index b703ea33c..49e56200a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ notifications: email: false before_install: - sudo apt-get install -y libsqlite3-dev cppcheck valgrind gcc-4.8 gettext + sudo apt-get install -y libsqlite3-dev cppcheck valgrind gcc-4.8 gettext libc6-dev-armhf-cross libc6-dev-arm64-cross gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf qemu-user-static binfmt-support env: - ARCH=64 SOURCE_CHECK_ONLY=true COPTFLAGS="-O3" @@ -33,6 +33,8 @@ env: - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=10 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=11 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=12 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false + - VALGRIND=0 ARCH=arm32v7 DEVELOPER=1 TARGET_HOST=arm-linux-gnueabihf + - VALGRIND=0 ARCH=arm64v8 DEVELOPER=1 TARGET_HOST=aarch64-linux-gnu cache: directories: - dependencies diff --git a/.travis/build.sh b/.travis/build.sh index f8b07aea1..df27516d2 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -43,8 +43,51 @@ cat > pytest.ini << EOF addopts=-p no:logging --color=no --force-flaky EOF +if [ "$TARGET_HOST" == "arm-linux-gnueabihf" ] || [ "$TARGET_HOST" == "arm-linux-gnueabihf" ] +then + export QEMU_LD_PREFIX=/usr/"$TARGET_HOST"/ + export MAKE_HOST="$TARGET_HOST" + export AR="$TARGET_HOST"-ar + export AS="$TARGET_HOST"-as + export CC="$TARGET_HOST"-gcc + export CXX="$TARGET_HOST"-g++ + export LD="$TARGET_HOST"-ld + export STRIP="$TARGET_HOST"-strip -if [ "$SOURCE_CHECK_ONLY" == "false" ]; then + wget -q https://zlib.net/zlib-1.2.11.tar.gz \ + && tar xvf zlib-1.2.11.tar.gz \ + && cd zlib-1.2.11 \ + && ./configure --prefix="$QEMU_LD_PREFIX" \ + && make \ + && sudo make install + cd .. && rm zlib-1.2.11.tar.gz && rm -rf zlib-1.2.11 + + wget -q https://www.sqlite.org/2018/sqlite-src-3260000.zip \ + && unzip sqlite-src-3260000.zip \ + && cd sqlite-src-3260000 \ + && ./configure --disable-tcl --enable-static --disable-readline --disable-threadsafe --disable-load-extension --host="$TARGET_HOST" --prefix="$QEMU_LD_PREFIX" \ + && make \ + && sudo make install + cd .. && rm sqlite-src-3260000.zip && rm -rf sqlite-src-3260000 + + wget -q https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz \ + && tar xvf gmp-6.1.2.tar.xz \ + && cd gmp-6.1.2 \ + && ./configure --disable-assembly --prefix="$QEMU_LD_PREFIX" --host="$TARGET_HOST" \ + && make \ + && sudo make install + cd .. && rm gmp-6.1.2.tar.xz && rm -rf gmp-6.1.2 + + ./configure --enable-static + + echo -en 'travis_fold:start:script.2\\r' + make -j3 > /dev/null + echo -en 'travis_fold:end:script.2\\r' + + echo -en 'travis_fold:start:script.3\\r' + make -j$PYTEST_PAR check-units + echo -en 'travis_fold:end:script.3\\r' +elif [ "$SOURCE_CHECK_ONLY" == "false" ]; then echo -en 'travis_fold:start:script.2\\r' make -j3 > /dev/null echo -en 'travis_fold:end:script.2\\r'