This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
forked from libimobiledevice/usbmuxd
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
77 lines (68 loc) · 3.24 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
dist: trusty
sudo: false
matrix:
include:
- os: osx
env: TARGET=x86_64-apple-darwin RID=osx-x64 RUN_TESTS=yes CROSS=no CREATE_DEB=no
- os: linux
env: TARGET=x86_64-linux-gnu RID=linux-x64 RUN_TESTS=yes CROSS=no ARCH=amd64 CREATE_DEB=yes CREATE_ALPINE=no
language: c
env:
global:
- LIBPLIST_VERSION=2.0.1-157
- LIBUSBMUXD_VERSION=1.1.0-81
- LIBIMOBILEDEVICE_VERSION=1.2.1-138
- USBMUXD_VERSION_PREFIX=1.1.0
addons:
apt:
packages:
- devscripts
- debhelper
- dh-autoreconf
- dput
- osc
- fakeroot
- libusb-1.0-0-dev
- libusb-1.0-0
before_install:
- test -n $CC && unset CC
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then pip2 install --user azure-cli; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then pip install --user requests urllib3 pyOpenSSL --force --upgrade; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then pip install --user azure-cli; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install libusb || true; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./build/install-patchelf.sh; fi
before_script:
- wget https://qmcdn.blob.core.windows.net/imobiledevice/libplist-$RID-$LIBPLIST_VERSION.tar.gz
- wget https://qmcdn.blob.core.windows.net/imobiledevice/libusbmuxd-$RID-$LIBUSBMUXD_VERSION.tar.gz
- wget https://qmcdn.blob.core.windows.net/imobiledevice/libimobiledevice-$RID-$LIBIMOBILEDEVICE_VERSION.tar.gz
- mkdir $HOME/ext
- tar -xvzf libplist-$RID-$LIBPLIST_VERSION.tar.gz -C $HOME/ext
- tar -xvzf libusbmuxd-$RID-$LIBUSBMUXD_VERSION.tar.gz -C $HOME/ext
- tar -xvzf libimobiledevice-$RID-$LIBIMOBILEDEVICE_VERSION.tar.gz -C $HOME/ext
- find $HOME/ext
- LC_CTYPE=C LANG=C find $HOME/ext/lib/pkgconfig/ -name '*.pc' -print0 | xargs -0 sed -i -e 's@/travis/out@/travis/ext@g'
- LC_CTYPE=C LANG=C find $HOME/ext/lib/ -name '*.la' -print0 | xargs -0 sed -i -e 's@/travis/out@/travis/ext@g'
script:
- export CFLAGS=-I$HOME/ext/include
- export PKG_CONFIG_PATH=$HOME/ext/lib/pkgconfig:$PKG_CONFIG_PATH
- export LDFLAGS=-L$HOME/ext/lib
- ./autogen.sh --prefix=$HOME/out --with-udevrulesdir=$HOME/out/lib/udev --host=$TARGET
- make
#- if [ "$CREATE_ALPINE" = "yes" ]; then docker build alpine --tag usbmuxd-alpine-build; fi
after_success:
- make install
- export INSTALLDIR=$HOME/out
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./build/run-patchelf.sh; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./build/patchdylib.sh; fi
- tar -zcvf usbmuxd-$RID.tar.gz -C $HOME/out .
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then az=$HOME/Library/Python/2.7/bin/az; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then az=$HOME/.local/bin/az; fi
- $az storage blob upload --file usbmuxd-$RID.tar.gz --container-name imobiledevice --name usbmuxd-$RID-1.1.0-$TRAVIS_BUILD_NUMBER.tar.gz
- if [[ "$CREATE_DEB" == "yes" ]]; then ./make-deb.sh bionic; fi
- if [[ "$CREATE_DEB" == "yes" ]]; then ./make-deb.sh trusty; fi
- if [[ "$CREATE_DEB" == "yes" ]]; then ./make-deb.sh xenial; fi
- if [[ "$CREATE_DEB" == "yes" ]]; then ./make-rpm.sh; fi
# - if [ "$CREATE_ALPINE" = "yes" ]; then docker run -v ${PWD}/:/build/ usbmuxd-alpine-build; fi
# - if [ "$CREATE_ALPINE" = "yes" ]; then $az storage blob upload -f usbmuxd.alpine.tar.gz -c imobiledevice -n usbmuxd-alpine-1.1.0-$TRAVIS_BUILD_NUMBER.alpine.tar.gz; fi