This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
forked from coreos/ignition
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
48 lines (42 loc) · 1.56 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
sudo: required
dist: trusty
language: go
go_import_path: github.com/coreos/ignition
go:
- 1.8
- 1.9
env:
matrix:
- TARGET=amd64
- TARGET=arm64 GIMME_ARCH=arm64 GIMME_CGO_ENABLED=1
addons:
apt:
packages:
# install cross compilers for cgo support.
- gcc-aarch64-linux-gnu
- libc6-dev-arm64-cross
- libblkid-dev
install:
# since libblkid-dev:arm64 cannot be installed, spoof it
- if [ "${TARGET}" == "arm64" ]; then
echo "void blkid_new_probe_from_filename(void) {}" >> stub.c;
echo "void blkid_do_probe(void) {}" >> stub.c;
echo "void blkid_probe_has_value(void) {}" >> stub.c;
echo "void blkid_probe_lookup_value(void) {}" >> stub.c;
echo "void blkid_free_probe(void) {}" >> stub.c;
aarch64-linux-gnu-gcc-4.8 -c -o stub.o stub.c;
aarch64-linux-gnu-gcc-ar-4.8 cq libblkid.a stub.o;
fi
script:
- if [ "${TARGET}" == "amd64" ]; then
GOARCH="${TARGET}" ./test;
elif [ "${TARGET}" == "arm64" ]; then
export CGO_LDFLAGS="-L ${PWD}";
GOARCH="${TARGET}" ./build && file "bin/${TARGET}/ignition" | egrep 'aarch64';
fi
- if [ "${TARGET}" == "amd64" ]; then
GOARCH="${TARGET}" ./build_blackbox_tests;
elif [ "${TARGET}" == "arm64" ]; then
export CGO_LDFLAGS="-L ${PWD}";
GOARCH="${TARGET}" ./build_blackbox_tests && file "tests.test" | egrep 'aarch64';
fi