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
cache:
key: "$CI_JOB_NAME"
untracked: true
paths:
- cargo/
- target/
stages:
- build
.build_template:
image: "rust:latest"
stage: build
before_script:
- export PATH="/root/.cargo/bin:$PATH"
- rustup target add $TARGET || true # Ignore failures when the target and toolchain are the same
- cargo update
script:
- cargo build --examples --target=$TARGET
- cargo build --tests --target=$TARGET
- cargo test --target=$TARGET
x86_64-unknown-linux-gnu:
<<: *build
variables:
TARGET: x86_64-unknown-linux-gnu
# WIP for these, don't work yet
# x86_64-unknown-freebsd:
# <<: *build
# variables:
# TARGET: x86_64-unknown-freebsd
# x86_64-pc-windows-gnu:
# <<: *build
# variables:
# TARGET: x86_64-pc-windows-gnu