2017-06-30 13:16:59 +02:00
|
|
|
language: c
|
|
|
|
compiler:
|
|
|
|
- gcc
|
|
|
|
#Disable Clang for now until we support ARM cross-toolchain - clang
|
|
|
|
|
|
|
|
dist: trusty
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- gcc-4.8-arm-linux-gnueabihf
|
|
|
|
- g++-arm-linux-gnueabihf
|
|
|
|
- gcc-4.8-aarch64-linux-gnu
|
|
|
|
- g++-aarch64-linux-gnu
|
|
|
|
- libbluetooth-dev
|
|
|
|
- rpm
|
|
|
|
|
|
|
|
script:
|
|
|
|
# Build default Gattlib - Debug
|
|
|
|
- mkdir build-debug && pushd build-debug
|
|
|
|
- cmake -DCMAKE_BUILD_TYPE=Debug .. && make
|
|
|
|
- popd
|
|
|
|
|
|
|
|
# Build and Package default Gattlib - Release
|
|
|
|
- mkdir build-release && pushd build-release
|
|
|
|
- cmake -DCMAKE_BUILD_TYPE=Release .. && make && cpack ..
|
|
|
|
- popd
|
|
|
|
|
|
|
|
# Build Gattlib with DBus support - Debug
|
|
|
|
- mkdir build-dbus-debug && pushd build-dbus-debug
|
|
|
|
- cmake -DGATTLIB_FORCE_DBUS=TRUE -DCMAKE_BUILD_TYPE=Debug .. && make
|
|
|
|
- popd
|
|
|
|
|
|
|
|
# Build and Package Gattlib with DBus support - Release
|
|
|
|
- mkdir build-dbus-release && pushd build-dbus-release
|
|
|
|
- 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
|
2018-01-03 12:05:08 +01:00
|
|
|
- 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 .
|
2017-06-30 13:16:59 +02:00
|
|
|
- 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 .
|
2018-01-03 12:05:08 +01:00
|
|
|
- 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 .
|
2017-06-30 13:16:59 +02:00
|
|
|
- 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 .
|
2018-01-03 15:10:48 +01:00
|
|
|
- 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 .
|
2017-06-30 13:16:59 +02:00
|
|
|
- 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 .
|
2018-01-03 12:05:08 +01:00
|
|
|
- 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 .
|
2017-06-30 13:16:59 +02:00
|
|
|
- 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
|
|
|
|
|
|
|
|
# Set environment variables
|
|
|
|
- export SYSROOT=$PWD/debian-stretch-arm
|
|
|
|
- export CROSS_COMPILE=arm-linux-gnueabihf-
|
|
|
|
|
|
|
|
# Build and Package Gattlib with DBus support - Release - ARM32
|
|
|
|
- mkdir build-dbus-release-arm32 && pushd build-dbus-release-arm32
|
|
|
|
- cmake -DGATTLIB_FORCE_DBUS=TRUE -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 && cpack ..
|
|
|
|
- popd
|
|
|
|
|
|
|
|
#
|
|
|
|
# Setup build for ARM 64-bit
|
|
|
|
#
|
|
|
|
|
|
|
|
# Download Debian packages
|
|
|
|
- mkdir debian-stretch-arm64 && pushd debian-stretch-arm64
|
2018-01-03 12:05:08 +01:00
|
|
|
- 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 .
|
2017-06-30 13:16:59 +02:00
|
|
|
- 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 .
|
2018-01-03 12:05:08 +01:00
|
|
|
- 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 .
|
2017-06-30 13:16:59 +02:00
|
|
|
- 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 .
|
2018-01-03 15:10:48 +01:00
|
|
|
- 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 .
|
2017-06-30 13:16:59 +02:00
|
|
|
- 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 .
|
2018-01-03 12:05:08 +01:00
|
|
|
- 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 .
|
2017-06-30 13:16:59 +02:00
|
|
|
- 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
|
|
|
|
|
|
|
|
# Set environment variables
|
|
|
|
- export SYSROOT=$PWD/debian-stretch-arm64
|
|
|
|
- export CROSS_COMPILE=aarch64-linux-gnu-
|
|
|
|
|
|
|
|
# Build and Package Gattlib with DBus support - Release - ARM64
|
|
|
|
- mkdir build-dbus-release-arm64 && pushd build-dbus-release-arm64
|
|
|
|
- cmake -DGATTLIB_FORCE_DBUS=TRUE -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 && cpack ..
|
|
|
|
- popd
|
|
|
|
|
|
|
|
before_deploy:
|
|
|
|
# Create directory to store the artifacts we want to deploy
|
|
|
|
- mkdir artifacts
|
|
|
|
|
|
|
|
# Copy packages to artifacts
|
2018-01-03 12:25:49 +01:00
|
|
|
- cp build-release/gattlib_*_x86_64.deb artifacts/
|
|
|
|
- cp build-release/gattlib_*_x86_64.rpm artifacts/
|
|
|
|
- cp build-release/gattlib_*_x86_64.zip artifacts/
|
2017-06-30 13:16:59 +02:00
|
|
|
# Copy DBUS packages to artifacts
|
2018-01-03 13:19:13 +01:00
|
|
|
- for f in build-dbus-release/gattlib_*; do cp "$f" "`echo $f | sed 's/build-dbus-release\/gattlib_/artifacts\/gattlib_dbus_/'`"; done
|
2017-07-02 15:52:05 +02:00
|
|
|
# Copy DBUS ARM packages to artifacts
|
2018-01-03 12:25:49 +01:00
|
|
|
- cp build-dbus-release-arm32/gattlib_*_armhf.deb artifacts/
|
|
|
|
- cp build-dbus-release-arm32/gattlib_*_armhf.zip artifacts/
|
2017-07-02 15:52:05 +02:00
|
|
|
# Copy DBUS ARM64 packages to artifacts
|
2018-01-03 12:25:49 +01:00
|
|
|
- cp build-dbus-release-arm64/gattlib_*_arm64.deb artifacts/
|
|
|
|
- cp build-dbus-release-arm64/gattlib_*_arm64.zip artifacts/
|
2017-06-30 13:16:59 +02:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api-key: ${GITHUB_OAUTH_TOKEN}
|
|
|
|
file_glob: true
|
|
|
|
file: artifacts/*
|
|
|
|
skip_cleanup: true
|
2018-01-03 13:19:13 +01:00
|
|
|
overwrite: true
|
2017-06-30 13:16:59 +02:00
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
|