language: c compiler: - gcc #Disable Clang for now until we support ARM cross-toolchain - clang dist: xenial addons: apt: packages: - gcc-aarch64-linux-gnu - g++-aarch64-linux-gnu - libbluetooth-dev - rpm - python3-pip - python3-setuptools - doxygen install: - | if [ ! -f $PWD/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf ]; then wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz tar xf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz fi - pip3 install --upgrade cross-sysroot - pip3 install Sphinx - pip3 install breathe 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 # # Setup build for ARM 32-bit # # Set environment variables - export SYSROOT=$PWD/debian-stable-arm - export CROSS_COMPILE=$PWD/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf- # Ensure folder is empty - rm -Rf $PWD/debian-stable-arm/* - cross-sysroot --distribution debian --distribution-version stable --architecture armhf --cross-gcc ${CROSS_COMPILE}gcc --build-root $PWD/debian-stable-arm requirements.dep # 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 # # Ensure folder is empty - rm -Rf $PWD/debian-stable-arm64/* - cross-sysroot --distribution debian --distribution-version stable --architecture arm64 --build-root $PWD/debian-stable-arm64 requirements.dep # Set environment variables - export SYSROOT=$PWD/debian-stable-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 after_success: - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then ./update-dev-tag.sh; fi before_deploy: # Create directory to store the artifacts we want to deploy - mkdir artifacts # Copy packages to artifacts - cp build-release/gattlib_*_x86_64.deb artifacts/ - cp build-release/gattlib_*_x86_64.rpm artifacts/ - cp build-release/gattlib_*_x86_64.zip artifacts/ # Copy DBUS packages to artifacts - for f in build-dbus-release/gattlib_*; do cp "$f" "`echo $f | sed 's/build-dbus-release\/gattlib_/artifacts\/gattlib_dbus_/'`"; done # Copy DBUS ARM packages to artifacts - cp build-dbus-release-arm32/gattlib_*_armhf.deb artifacts/ - cp build-dbus-release-arm32/gattlib_*_armhf.zip artifacts/ # Copy DBUS ARM64 packages to artifacts - cp build-dbus-release-arm64/gattlib_*_arm64.deb artifacts/ - cp build-dbus-release-arm64/gattlib_*_arm64.zip artifacts/ deploy: provider: releases api-key: ${GITHUB_OAUTH_TOKEN} file_glob: true file: artifacts/* skip_cleanup: true overwrite: true on: tags: true