-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
69 lines (60 loc) · 1.48 KB
/
.gitlab-ci.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
image: starlabio/ubuntu-native-build:1.0.7
cache:
paths:
- target/
stages:
- format
- build
- test
.format: &format-template
stage: format
script:
- echo "CRATE_DIR=$CRATE_DIR"
- cd $CRATE_DIR
- cargo fmt -- --write-mode=diff
format-libxenstore:
variables:
CRATE_DIR: libxenstore
<<: *format-template
format-rxenstored:
variables:
CRATE_DIR: rxenstored
<<: *format-template
build:x86:
stage: build
script:
- pushd libxenstore
- cargo build --verbose
- popd
- pushd rxenstored
- cargo build --verbose
build:aarch64:
stage: build
script:
- export CC=aarch64-linux-gnu-gcc
- export AR=aarch64-linux-gnu-ar
- export ARCH=arm64
- pushd libxenstore
- cargo build --verbose --target=aarch64-unknown-linux-gnu
- popd
- pushd rxenstored
- cargo build --verbose --target=aarch64-unknown-linux-gnu
build:armhf:
stage: build
script:
- export CC=arm-linux-gnueabihf-gcc
- export AR=arm-linux-gnueabihf-ar
- export ARCH=arm
- pushd libxenstore
- cargo build --verbose --target=arm-unknown-linux-gnueabihf
- popd
- pushd rxenstored
- cargo build --verbose --target=arm-unknown-linux-gnueabihf
test:x86:
stage: test
script:
- pushd libxenstore
- cargo test
- popd
- pushd rxenstored
- cargo test