-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
97 lines (82 loc) · 5.55 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
sudo: required
language: cpp
os:
- linux
- osx
env:
- BUILD_PLATFORM=native
- BUILD_PLATFORM=cross-win
matrix:
exclude:
- { os: osx, env: BUILD_PLATFORM=cross-win }
dist: trusty
services:
- docker
before_install:
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != native ]] || sudo apt-get -qy update'
- '[ "$TRAVIS_OS_NAME" != osx ] || brew update'
install:
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != cross-win ]] || docker pull sago007/mxe_basic'
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != native ]] || sudo apt-get -qy install
build-essential pkg-config devscripts dh-make qt5-qmake qt5-default qtbase5-dev qtdeclarative5-dev
libqt5svg5-dev libusb-1.0-0-dev'
- '[ "$TRAVIS_OS_NAME" != osx ] || brew upgrade libusb'
- '[ "$TRAVIS_OS_NAME" != osx ] || brew install qt55'
- '[ "$TRAVIS_OS_NAME" != osx ] || brew link --force qt55'
before_script:
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != native ]] || export QMAKESPEC=linux-g++'
- '[ "$TRAVIS_OS_NAME" != osx ] || export QMAKESPEC=macx-clang'
- mkdir -p "$TRAVIS_BUILD_DIR-build"
- pushd "$TRAVIS_BUILD_DIR-build"
- '[ "$BUILD_PLATFORM" != native ] || qmake -v'
- '[ "$BUILD_PLATFORM" != native ] || qmake -Wall CONFIG+=release "$TRAVIS_BUILD_DIR"'
- popd
script:
- '[ "$BUILD_PLATFORM" != native ] || make -C "$TRAVIS_BUILD_DIR-build" -j2 all'
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != native ]] || git archive --format=tar.gz HEAD > ../ems-qart_0.9.4.orig.tar.gz'
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != native ]] || debuild -us -uc'
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != cross-win ]] ||
docker run --name="mxe-docker" sago007/mxe_basic /bin/sh -c
"apt-get -qy update;
apt-get -qy install mxe-i686-w64-mingw32.static-qtbase
mxe-i686-w64-mingw32.static-qtdeclarative
mxe-i686-w64-mingw32.static-qtquickcontrols
mxe-i686-w64-mingw32.static-qtsvg mxe-i686-w64-mingw32.static-libusb1;
cd /root/; git clone https://github.com/rbino/ems-qart.git; cd ems-qart;
mkdir build; cd build; i686-w64-mingw32.static-qmake-qt5 CONFIG+=release ..;
make -j2; cd release; mkdir ems-qart_win; mv ems-qart.exe ems-qart_win;
wget http://zadig.akeo.ie/downloads/zadig_2.2.exe -O ems-qart_win/zadig_2.2.exe;
cp ../../doc/README-Win.txt ems-qart_win/README.txt;
zip -r ems-qart_win.zip ems-qart_win"'
after_success:
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != native ]] || mv "$TRAVIS_BUILD_DIR"/../ems-qart_0.9.4-1_amd64.deb "$TRAVIS_BUILD_DIR-build"'
- '[[ "$TRAVIS_OS_NAME" != linux || "$BUILD_PLATFORM" != cross-win ]] || docker cp mxe-docker:/root/ems-qart/build/release/ems-qart_win.zip "$TRAVIS_BUILD_DIR-build"'
- '[ "$TRAVIS_OS_NAME" != osx ] || macdeployqt $TRAVIS_BUILD_DIR-build/ems-qart.app -qmldir=/usr/local/Cellar/qt55/5.5.1/qml -verbose=2 -dmg'
deploy:
- provider: releases
skip_cleanup: true
api_key:
secure: CLNkQ87+s0VewE+PeteCbiiUvWRKjVlF+enXbbm/lB16Jv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hpSXtXiRxcp2DoeQo3weDq1VDhvaOX4A+7HDJCt/X8NG5EuKmhM5EiIFdo2uXXRQbihqcveHKT9L6ez0m/lk/UBw+25dtRoISnzHXaQfb0cxc1zPc8Sphhf5uGBBfaAmGFCloxr0kRKFf5cZUZ/rtNfB7liUQcI1w5g++pomrpa4UjPLzlG+oVUm0HV47FtVDXTxHO1hR/ReVbWRRhkb8RAHuTpMlqYNCJPU3n0sYdVRX/AXfBV1IYRLIZVzt02QHn17J3fOaZCg045KcmKb3ERXWWE5qM5+2g9gQ/SInqv9thy7rJNQLhKE/zg2B1Klzu3ByKBZ+d9tGmg+k1XYOC9VRJKqXnDvgy4XA/3f6wbBk8Q97rGk8=
file: "$TRAVIS_BUILD_DIR-build/ems-qart_0.9.4-1_amd64.deb"
on:
repo: rbino/ems-qart
tags: true
condition: '"$TRAVIS_OS_NAME" == linux && "$BUILD_PLATFORM" == native'
- provider: releases
skip_cleanup: true
api_key:
secure: CLNkQ87+s0VewE+PeteCbiiUvWRKjVlF+enXbbm/lB16JvpFtgAzDZtRhakKR+0Zsrw4whRxfnG51jhFfoYEn+RbwN9Rj+hZ4Z5qQGxALwp+2Hm83dFNYjjBSdhh02SbqGvkooImS+PZ7oDJBsnYHRSzKGPjzyph7vco3M4V/CxADXhVRzQ/F4F1vEgh0IOuCeLlCZhN5mpMoQmtPHsCkaWQYQ+z0+h+0rCB3QJmoXC+4SSBcmkWoBDPRvg61mhFSLblGD7UsOd4lH7xJHAr2J88EXPb6btfVHiPRvn4SLYT7gcZ7ICkyhhpSXtXiRxcp2DoeQo3weDq1VDhvaOX4A+7HDJCt/X8NG5EuKmhM5EiIFdo2uXXRQbihqcveHKT9L6ez0m/lk/UBw+25dtRoISnzHXaQfb0cxc1zPc8Sphhf5uGBBfaAmGFCloxr0kRKFf5cZUZ/rtNfB7liUQcI1w5g++pomrpa4UjPLzlG+oVUm0HV47FtVDXTxHO1hR/ReVbWRRhkb8RAHuTpMlqYNCJPU3n0sYdVRX/AXfBV1IYRLIZVzt02QHn17J3fOaZCg045KcmKb3ERXWWE5qM5+2g9gQ/SInqv9thy7rJNQLhKE/zg2B1Klzu3ByKBZ+d9tGmg+k1XYOC9VRJKqXnDvgy4XA/3f6wbBk8Q97rGk8=
file: "$TRAVIS_BUILD_DIR-build/ems-qart_win.zip"
on:
repo: rbino/ems-qart
tags: true
condition: '"$TRAVIS_OS_NAME" == linux && "$BUILD_PLATFORM" == cross-win'