forked from machinekit/machinekit-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
212 lines (197 loc) · 6.58 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# This is a botch-job to make the Travis CI configuration play OK-ish
# with the new Machinekit-HAL build script flow. This script will be
# completely rewritten in due time.
# NOT UP TO DATE
# This Travis CI config calls scripts that use the following defaults,
# which can (and some should) be overridden in the Travis CI repo
# settings.
#
# Package build `build_docker` script:
# - IMAGE: dovetailautomata/mk-cross-builder
# Docker image to pull for build
# - MK_PACKAGE_VERBOSE: false
# Build verbosely with `make V=1`
# - JOBS: 2
# Make parallel jobs, `make -j2`
# - DEBIAN_SUITE: experimental
# Debian package suite
# - MAJOR_MINOR_VERSION: 0.1
# Override Machinekit package base version
# - PKGSOURCE: ${TRAVIS_REPO}
# Identifier added to package release suggesting package origin
# - TEST_ARGS: (empty)
# For CMD=test only; set as needed for debugging, e.g. `-v tests/hm2-idrom`
# - TEST_DEBUG: false
# For CMD=test only; set to `true` to send test debug output to stderr
#
# Package upload `build_upload_packagecloud` script:
# - PACKAGECLOUD_USER, PACKAGECLOUD_TOKEN, PACKAGECLOUD_REPO: no defaults
# Packagecloud.io user credentials and package repository
# - DEPLOY_BRANCH: master
# Git branch for which to deploy packages
sudo: required
dist: bionic
notifications:
email:
on_success: never
on_failure: never
webhooks:
urls:
- $GITTER_IM_URL
on_success: change
on_failure: always
on_start: never
# Cache: In $HOME/.ccache; inserts /usr/lib/ccache into $PATH
# https://docs.travis-ci.com/user/caching/#ccache-cache
language: c
cache: ccache
services:
- docker
matrix:
include:
- os: linux
arch: amd64
env: ARCHITECTURE=amd64 VERSION=20.04 DISTRIBUTION=ubuntu
- os: linux
arch: arm64
env: ARCHITECTURE=arm64 VERSION=20.04 DISTRIBUTION=ubuntu
- os: linux
arch: amd64
env: ARCHITECTURE=amd64 VERSION=10 DISTRIBUTION=debian
- os: linux
arch: arm64
env: ARCHITECTURE=arm64 VERSION=10 DISTRIBUTION=debian
- os: linux
arch: amd64
env: ARCHITECTURE=amd64 VERSION=18.04 DISTRIBUTION=ubuntu
- os: linux
arch: arm64
env: ARCHITECTURE=arm64 VERSION=18.04 DISTRIBUTION=ubuntu
- os: linux
arch: amd64
env: ARCHITECTURE=amd64 VERSION=9 DISTRIBUTION=debian
- os: linux
arch: arm64
env: ARCHITECTURE=arm64 VERSION=9 DISTRIBUTION=debian
- os: linux
arch: amd64
env: ARCHITECTURE=armhf VERSION=20.04 DISTRIBUTION=ubuntu
- os: linux
arch: amd64
env: ARCHITECTURE=arm64 VERSION=20.04 DISTRIBUTION=ubuntu
- os: linux
arch: amd64
env: ARCHITECTURE=i386 VERSION=10 DISTRIBUTION=debian
- os: linux
arch: amd64
env: ARCHITECTURE=armhf VERSION=10 DISTRIBUTION=debian
- os: linux
arch: amd64
env: ARCHITECTURE=arm64 VERSION=10 DISTRIBUTION=debian
- os: linux
arch: amd64
env: ARCHITECTURE=i386 VERSION=18.04 DISTRIBUTION=ubuntu
- os: linux
arch: amd64
env: ARCHITECTURE=armhf VERSION=18.04 DISTRIBUTION=ubuntu
- os: linux
arch: amd64
env: ARCHITECTURE=arm64 VERSION=18.04 DISTRIBUTION=ubuntu
- os: linux
arch: amd64
env: ARCHITECTURE=i386 VERSION=9 DISTRIBUTION=debian
- os: linux
arch: amd64
env: ARCHITECTURE=armhf VERSION=9 DISTRIBUTION=debian
- os: linux
arch: amd64
env: ARCHITECTURE=arm64 VERSION=9 DISTRIBUTION=debian
- os: linux
arch: arm64
env: ARCHITECTURE=armhf VERSION=20.04 DISTRIBUTION=ubuntu
- os: linux
arch: arm64
env: ARCHITECTURE=amd64 VERSION=20.04 DISTRIBUTION=ubuntu
- os: linux
arch: arm64
env: ARCHITECTURE=armhf VERSION=10 DISTRIBUTION=debian
- os: linux
arch: arm64
env: ARCHITECTURE=amd64 VERSION=10 DISTRIBUTION=debian
- os: linux
arch: arm64
env: ARCHITECTURE=i386 VERSION=10 DISTRIBUTION=debian
- os: linux
arch: arm64
env: ARCHITECTURE=armhf VERSION=18.04 DISTRIBUTION=ubuntu
- os: linux
arch: arm64
env: ARCHITECTURE=amd64 VERSION=18.04 DISTRIBUTION=ubuntu
- os: linux
arch: arm64
env: ARCHITECTURE=i386 VERSION=18.04 DISTRIBUTION=ubuntu
- os: linux
arch: arm64
env: ARCHITECTURE=armhf VERSION=9 DISTRIBUTION=debian
# Tests
# - Reduce total build time by starting longest jobs first
#- ARCHITECTURE=amd64 VERSION=10 CMD=test
#- ARCHITECTURE=amd64 VERSION=9 CMD=test
# Packages
# - Buster
#- ARCHITECTURE=amd64 VERSION=10 CMD=deb
#- ARCHITECTURE=arm64 VERSION=10 CMD=deb
#- ARCHITECTURE=i386 VERSION=10 CMD=deb
#- ARCHITECTURE=armhf VERSION=10 CMD=deb
# - Stretch
#- ARCHITECTURE=amd64 VERSION=9 CMD=deb
#- ARCHITECTURE=arm64 VERSION=9 CMD=deb
#- ARCHITECTURE=i386 VERSION=9 CMD=deb
#- ARCHITECTURE=armhf VERSION=9 CMD=deb
#addons:
# apt:
# packages:
# - lftp
# - sshpass
before_install:
# Show environment for debugging purposes
- env
# Dependency needed for Docker image build
- sudo apt-get -y install python3-pip && sudo -H pip3 install sh
# Build the Docker build image
- scripts/buildcontainerimage.py $DISTRIBUTION $VERSION $ARCHITECTURE
# Clear ccache stats
- ccache -z
# Install the packagecloud gem for pushing packages
#- gem install package_cloud
script:
- |
LOCAL_DIR="$(pwd)";
PARENT_DIR="$(dirname ${LOCAL_DIR})";
DOCKER_IMAGE="machinekit-hal-${DISTRIBUTION}-builder-v.${ARCHITECTURE}_${VERSION}:latest";
docker run --tty --rm -u "$(id -u):$(id -g)" \
-v "${PARENT_DIR}:/home/machinekit/build" \
-w "/home/machinekit/build/machinekit-hal" \
${DOCKER_IMAGE} debian/bootstrap &&
docker run --tty --rm -u "$(id -u):$(id -g)" \
-v "${PARENT_DIR}:/home/machinekit/build" \
-w "/home/machinekit/build/machinekit-hal" \
${DOCKER_IMAGE} debian/configure.py -c &&
docker run --tty --rm -u "$(id -u):$(id -g)" \
-v "${PARENT_DIR}:/home/machinekit/build" \
-w "/home/machinekit/build/machinekit-hal" \
${DOCKER_IMAGE} debian/buildpackages.py &&
if [[ "$ARCHITECTURE" == "$TRAVIS_CPU_ARCH" ]];
then
git -C ${LOCAL_DIR} clean -xdf &&
docker run --tty --rm -u "$(id -u):$(id -g)" \
-v "${PARENT_DIR}:/home/machinekit/build" \
-w "/home/machinekit/build/machinekit-hal" \
${DOCKER_IMAGE} debian/ripruntests.py;
fi
after_success:
# Upload packages to packagecloud.io
#- test -z "$PACKAGECLOUD_USER" || gem install package_cloud
#- test -z "$PACKAGECLOUD_USER" || scripts/build_packagecloud_upload
# Show ccache stats
- ccache -s