-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
156 lines (151 loc) · 4.96 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
language: cpp
env:
global:
# Needed by AWS
- PATH=$HOME/.local/bin:$PATH
- QST_VERSION=$(if [[ "$TRAVIS_TAG" ]]; then echo -n ${TRAVIS_TAG:1} ; else echo -n ${TRAVIS_COMMIT::8} ; fi)
- QT_VERSION=v5.9.5-1
stages:
- name: build
- name: bundle and deploy
# Load eventual build artifacts
before_install:
- pip install --user awscli
- mkdir -p ~/$TRAVIS_BUILD_NUMBER
- aws s3 sync s3://qst-build-artifacts/$TRAVIS_BUILD_NUMBER ~/$TRAVIS_BUILD_NUMBER
after_success:
- aws s3 sync ~/$TRAVIS_BUILD_NUMBER s3://qst-build-artifacts/$TRAVIS_BUILD_NUMBER
jobs:
include:
# Qst application for Linux
- stage: build
sudo: required
services:
- docker
addons:
apt:
packages:
- docker-ce
env:
- TARGET=qst
- PLATFORM=linux-x86_64
- QBS_PROFILE=qt5
- QBS_OPTIONS="project.runAutotest:true project.version:$QST_VERSION"
script:
- docker run -v ${PWD}:/build rweickelt/qt:${QT_VERSION}-${PLATFORM} install
--file /build/qst-project.qbs
--build-directory /build/build-$QBS_PROFILE
--install-root /build/qst
release
profile:$QBS_PROFILE
$QBS_OPTIONS
- tar -cjf ~/$TRAVIS_BUILD_NUMBER/$TARGET-$PLATFORM.tar.bz2 qst
- find qst/
# Qst application for Windows
- stage: build
sudo: required
services:
- docker
addons:
apt:
packages:
- docker-ce
env:
- TARGET=qst
- PLATFORM=mingw-w64
- QBS_PROFILE=qt5
- QBS_OPTIONS="project.version:$QST_VERSION"
script:
- docker run -v ${PWD}:/build rweickelt/qt:${QT_VERSION}-${PLATFORM} install
--file /build/qst-project.qbs
--build-directory /build/build-$QBS_PROFILE
--install-root /build/qst
release
profile:$QBS_PROFILE
$QBS_OPTIONS
- tar -cjf ~/$TRAVIS_BUILD_NUMBER/$TARGET-$PLATFORM.tar.bz2 qst
- find qst/
# Launchpad probe for CC13x0
- stage: build
sudo: required
services:
- docker
addons:
apt:
packages:
- docker-ce
env:
- TARGET=launchpad-probe
- PLATFORM=cc13x0
- PROFILE=simplelink_cc13x0
- QBS_OPTIONS="project.version:$QST_VERSION"
script:
- docker build -f docker/Dockerfile -t rweickelt/qst-build .
- docker run -v ${PWD}:/build "rweickelt/qst-build" install
--file /build/qst-project.qbs
--build-directory /build/build-$PROFILE
--install-root /build/qst
release
profile:$PROFILE
$QBS_OPTIONS
- tar -cjf ~/$TRAVIS_BUILD_NUMBER/$TARGET-$PLATFORM.tar.bz2 qst
- find qst/
# Deploy linux bundle
- stage: bundle and deploy
sudo: false
env:
- TARGET="linux-x86_64 bundle"
- FILE=qst-linux-x86_64-$QST_VERSION.tar.bz2
script:
- tar -xjf ~/$TRAVIS_BUILD_NUMBER/qst-linux-x86_64.tar.bz2
- tar -xjf ~/$TRAVIS_BUILD_NUMBER/launchpad-probe-cc13x0.tar.bz2
- tar -jcf $TRAVIS_BUILD_DIR/$FILE qst
deploy:
- provider: script
skip_cleanup: true
script: curl -T $TRAVIS_BUILD_DIR/$FILE --ftp-create-dirs --ftp-ssl --user $FTP_USER:$FTP_PASSWORD ftp://$FTP_HOST/$QST_VERSION/
on:
tags: true
- provider: script
skip_cleanup: true
script: curl -F'file=@$TRAVIS_BUILD_DIR/$FILE' https://0x0.st
on:
condition: $TRAVIS_TAG = ""
all_branches: true
# Deploy windows bundle
- stage: bundle and deploy
sudo: false
env:
- TARGET="windows-x86_64 bundle"
- FILE=qst-windows-x86_64-$QST_VERSION.zip
script:
- tar -xjf ~/$TRAVIS_BUILD_NUMBER/qst-mingw-w64.tar.bz2
- tar -xjf ~/$TRAVIS_BUILD_NUMBER/launchpad-probe-cc13x0.tar.bz2
- zip -r $TRAVIS_BUILD_DIR/$FILE qst
deploy:
- provider: script
skip_cleanup: true
script: curl -T $TRAVIS_BUILD_DIR/$FILE --ftp-create-dirs --ftp-ssl --user $FTP_USER:$FTP_PASSWORD ftp://$FTP_HOST/$QST_VERSION/
on:
tags: true
- provider: script
skip_cleanup: true
script: curl -F'file=@$TRAVIS_BUILD_DIR/$FILE' https://0x0.st
on:
condition: $TRAVIS_TAG = ""
all_branches: true
# Deploy sources on release
- stage: bundle and deploy
if: tag IS present
sudo: false
env:
- TARGET="sources"
- FILE=qst-src-$QST_VERSION.tar.bz2
script:
- git archive $TRAVIS_BRANCH | bzip2 > $TRAVIS_BUILD_DIR/$FILE
deploy:
- provider: script
skip_cleanup: true
script: curl -T $TRAVIS_BUILD_DIR/$FILE --ftp-create-dirs --ftp-ssl --user $FTP_USER:$FTP_PASSWORD ftp://$FTP_HOST/$QST_VERSION/
on:
tags: true