.travis.yml: Use cross-sysroot to retrieve Linux Distribution packages for cross-compilation

pull/96/head
Olivier Martin 2019-05-18 10:47:43 +02:00 committed by Olivier Martin
parent 98ac9e5d2b
commit 60f3bc1c5a
2 changed files with 14 additions and 57 deletions

View File

@ -3,17 +3,22 @@ compiler:
- gcc
#Disable Clang for now until we support ARM cross-toolchain - clang
dist: trusty
dist: xenial
addons:
apt:
packages:
- gcc-4.8-arm-linux-gnueabihf
- gcc-arm-linux-gnueabihf
- g++-arm-linux-gnueabihf
- gcc-4.8-aarch64-linux-gnu
- gcc-aarch64-linux-gnu
- g++-aarch64-linux-gnu
- libbluetooth-dev
- rpm
- python3-pip
- python3-setuptools
install:
- pip3 install --upgrade cross-sysroot
script:
# Build default Gattlib - Debug
@ -36,40 +41,13 @@ script:
- cmake -DGATTLIB_FORCE_DBUS=TRUE -DCMAKE_BUILD_TYPE=Release .. && make && cpack ..
- popd
# Download tools
- wget https://raw.githubusercontent.com/labapart/labapart-tools/master/fixup-symlink.sh
- chmod +x fixup-symlink.sh
#
# Setup build for ARM 32-bit
#
# Download Debian packages
- mkdir debian-stretch-arm && pushd debian-stretch-arm
- wget http://ftp.de.debian.org/debian/pool/main/b/bluez/libbluetooth3_5.23-2+deb8u1_armhf.deb && dpkg -x libbluetooth3_5.23-2+deb8u1_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/b/bluez/libbluetooth-dev_5.43-2+deb9u1_armhf.deb && dpkg -x libbluetooth-dev_5.43-2+deb9u1_armhf.deb .
- wget http://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6_2.24-11+deb9u1_armhf.deb && dpkg -x libc6_2.24-11+deb9u1_armhf.deb .
- wget http://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6-dev_2.24-11+deb9u1_armhf.deb && dpkg -x libc6-dev_2.24-11+deb9u1_armhf.deb .
- wget http://security.debian.org/debian-security/pool/updates/main/l/linux/linux-libc-dev_4.9.65-3+deb9u1_armhf.deb && dpkg -x linux-libc-dev_4.9.65-3+deb9u1_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/glib2.0/libglib2.0-0_2.50.3-2_armhf.deb && dpkg -x libglib2.0-0_2.50.3-2_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/glib2.0/libglib2.0-dev_2.50.3-2_armhf.deb && dpkg -x libglib2.0-dev_2.50.3-2_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/gcc-6/libstdc++6_6.3.0-18_armhf.deb && dpkg -x libstdc++6_6.3.0-18_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/gcc-6/libstdc++-6-dev_6.3.0-18_armhf.deb && dpkg -x libstdc++-6-dev_6.3.0-18_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/p/pcre3/libpcre3_8.39-3_armhf.deb && dpkg -x libpcre3_8.39-3_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/p/pcre3/libpcre3-dev_8.39-3_armhf.deb && dpkg -x libpcre3-dev_8.39-3_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/libf/libffi/libffi6_3.2.1-6_armhf.deb && dpkg -x libffi6_3.2.1-6_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/glib2.0/libglib2.0-0_2.50.3-2_armhf.deb && dpkg -x libglib2.0-0_2.50.3-2_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib1g_1.2.8.dfsg-5_armhf.deb && dpkg -x zlib1g_1.2.8.dfsg-5_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/libs/libselinux/libselinux1_2.6-3+b3_armhf.deb && dpkg -x libselinux1_2.6-3+b3_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/u/util-linux/libmount1_2.29.2-1_armhf.deb && dpkg -x libmount1_2.29.2-1_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/u/util-linux/libblkid1_2.29.2-1_armhf.deb && dpkg -x libblkid1_2.29.2-1_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/u/util-linux/libuuid1_2.29.2-1_armhf.deb && dpkg -x libuuid1_2.29.2-1_armhf.deb .
# Fixup broken links
- TARGETDIR=. ../fixup-symlink.sh
- popd
- cross-sysroot --distribution debian --distribution-version stable --architecture armhf --build-root $PWD/debian-stable-arm requirements.dep
# Set environment variables
- export SYSROOT=$PWD/debian-stretch-arm
- export SYSROOT=$PWD/debian-stable-arm
- export CROSS_COMPILE=arm-linux-gnueabihf-
# Build and Package Gattlib with DBus support - Release - ARM32
@ -80,33 +58,10 @@ script:
#
# Setup build for ARM 64-bit
#
# Download Debian packages
- mkdir debian-stretch-arm64 && pushd debian-stretch-arm64
- wget http://ftp.de.debian.org/debian/pool/main/b/bluez/libbluetooth3_5.23-2+deb8u1_arm64.deb && dpkg -x libbluetooth3_5.23-2+deb8u1_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/b/bluez/libbluetooth-dev_5.43-2+deb9u1_arm64.deb && dpkg -x libbluetooth-dev_5.43-2+deb9u1_arm64.deb .
- wget http://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6_2.24-11+deb9u1_arm64.deb && dpkg -x libc6_2.24-11+deb9u1_arm64.deb .
- wget http://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6-dev_2.24-11+deb9u1_arm64.deb && dpkg -x libc6-dev_2.24-11+deb9u1_arm64.deb .
- wget http://security.debian.org/debian-security/pool/updates/main/l/linux/linux-libc-dev_4.9.65-3+deb9u1_arm64.deb && dpkg -x linux-libc-dev_4.9.65-3+deb9u1_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/glib2.0/libglib2.0-0_2.50.3-2_arm64.deb && dpkg -x libglib2.0-0_2.50.3-2_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/glib2.0/libglib2.0-dev_2.50.3-2_arm64.deb && dpkg -x libglib2.0-dev_2.50.3-2_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/gcc-6/libstdc++6_6.3.0-18_arm64.deb && dpkg -x libstdc++6_6.3.0-18_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/gcc-6/libstdc++-6-dev_6.3.0-18_arm64.deb && dpkg -x libstdc++-6-dev_6.3.0-18_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/p/pcre3/libpcre3_8.39-3_arm64.deb && dpkg -x libpcre3_8.39-3_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/p/pcre3/libpcre3-dev_8.39-3_arm64.deb && dpkg -x libpcre3-dev_8.39-3_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/libf/libffi/libffi6_3.2.1-6_arm64.deb && dpkg -x libffi6_3.2.1-6_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/g/glib2.0/libglib2.0-0_2.50.3-2_arm64.deb && dpkg -x libglib2.0-0_2.50.3-2_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib1g_1.2.8.dfsg-5_arm64.deb && dpkg -x zlib1g_1.2.8.dfsg-5_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/libs/libselinux/libselinux1_2.6-3+b3_arm64.deb && dpkg -x libselinux1_2.6-3+b3_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/u/util-linux/libmount1_2.29.2-1_arm64.deb && dpkg -x libmount1_2.29.2-1_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/u/util-linux/libblkid1_2.29.2-1_arm64.deb && dpkg -x libblkid1_2.29.2-1_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/u/util-linux/libuuid1_2.29.2-1_arm64.deb && dpkg -x libuuid1_2.29.2-1_arm64.deb .
# Fixup broken links
- TARGETDIR=. ../fixup-symlink.sh
- popd
- cross-sysroot --distribution debian --distribution-version stable --architecture arm64 --build-root $PWD/debian-stable-arm64 requirements.dep
# Set environment variables
- export SYSROOT=$PWD/debian-stretch-arm64
- export SYSROOT=$PWD/debian-stable-arm64
- export CROSS_COMPILE=aarch64-linux-gnu-
# Build and Package Gattlib with DBus support - Release - ARM64

2
requirements.dep Normal file
View File

@ -0,0 +1,2 @@
libbluetooth3
libbluetooth-dev