forked from labapart/gattlib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
142 lines (123 loc) · 8.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
- wget http://ftp.de.debian.org/debian/pool/main/b/bluez/libbluetooth3_5.43-2_armhf.deb && dpkg -x libbluetooth3_5.43-2_armhf.deb .
- wget http://ftp.de.debian.org/debian/pool/main/b/bluez/libbluetooth-dev_5.43-2_armhf.deb && dpkg -x libbluetooth-dev_5.43-2_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.30-2+deb9u3_armhf.deb && dpkg -x linux-libc-dev_4.9.30-2+deb9u3_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/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+b1_armhf.deb && dpkg -x libselinux1_2.6-3+b1_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
# 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
- wget http://ftp.de.debian.org/debian/pool/main/b/bluez/libbluetooth3_5.43-2_arm64.deb && dpkg -x libbluetooth3_5.43-2_arm64.deb .
- wget http://ftp.de.debian.org/debian/pool/main/b/bluez/libbluetooth-dev_5.43-2_arm64.deb && dpkg -x libbluetooth-dev_5.43-2_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.30-2+deb9u3_arm64.deb && dpkg -x linux-libc-dev_4.9.30-2+deb9u3_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/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+b1_arm64.deb && dpkg -x libselinux1_2.6-3+b1_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
# 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
- cp build-release/gattlib_${TRAVIS_TAG}_x86_64.deb artifacts/
- cp build-release/gattlib_${TRAVIS_TAG}_x86_64.rpm artifacts/
- cp build-release/gattlib_${TRAVIS_TAG}_x86_64.zip artifacts/
# Copy DBUS packages to artifacts
- cp build-dbus-release/gattlib_${TRAVIS_TAG}_x86_64.deb artifacts/gattlib_dbus_${TRAVIS_TAG}_x86_64.deb
- cp build-dbus-release/gattlib_${TRAVIS_TAG}_x86_64.rpm artifacts/gattlib_dbus_${TRAVIS_TAG}_x86_64.rpm
- cp build-dbus-release/gattlib_${TRAVIS_TAG}_x86_64.zip artifacts/gattlib_dbus_${TRAVIS_TAG}_x86_64.zip
# Copy DBUS ARM packages to artifacts
- cp build-dbus-release-arm32/gattlib_${TRAVIS_TAG}_armhf.deb artifacts/
- cp build-dbus-release-arm32/gattlib_${TRAVIS_TAG}_armhf.zip artifacts/
# Copy DBUS ARM64 packages to artifacts
- cp build-dbus-release-arm64/gattlib_${TRAVIS_TAG}_arm64.deb artifacts/
- cp build-dbus-release-arm64/gattlib_${TRAVIS_TAG}_arm64.zip artifacts/
deploy:
provider: releases
api-key: ${GITHUB_OAUTH_TOKEN}
file_glob: true
file: artifacts/*
skip_cleanup: true
on:
tags: true