-
Notifications
You must be signed in to change notification settings - Fork 674
/
.cirrus.yml
87 lines (82 loc) · 2.9 KB
/
.cirrus.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
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.lock || echo ""
env:
# Build by default; don't just check
BUILD: build
CLIPPYFLAGS: -D warnings -A unknown-lints
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
TOOL: cargo
MSRV: 1.69.0
ZFLAGS:
# Tests that don't require executing the build binaries
build: &BUILD
build_script:
- . $HOME/.cargo/env || true
- $TOOL -Vv
- rustc -Vv
- $TOOL $BUILD $ZFLAGS --target $TARGET --all-targets --all-features
- $TOOL doc $ZFLAGS --no-deps --target $TARGET --all-features
- $TOOL clippy $ZFLAGS --target $TARGET --all-targets --all-features -- $CLIPPYFLAGS
- if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi
- if [ -z "$NOHACK" ]; then curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin; fi
- if [ -z "$NOHACK" ]; then $TOOL hack $ZFLAGS check --target $TARGET --each-feature; fi
# Tests that do require executing the binaries
test: &TEST
<< : *BUILD
test_script:
- . $HOME/.cargo/env || true
- $TOOL test --target $TARGET
# Test FreeBSD in a full VM. Test the i686 target too, in the
# same VM. The binary will be built in 32-bit mode, but will execute on a
# 64-bit kernel and in a 64-bit environment. Our tests don't execute any of
# the system's binaries, so the environment shouldn't matter.
task:
env:
TARGET: x86_64-unknown-freebsd
matrix:
- name: FreeBSD 14 amd64 & i686
freebsd_instance:
image: freebsd-14-1-release-amd64-ufs
cpu: 1
# Enable tests that would fail on FreeBSD 12
RUSTFLAGS: --cfg fbsd14 -D warnings
RUSTDOCFLAGS: --cfg fbsd14
setup_script:
- kldload mqueuefs
- fetch https://sh.rustup.rs -o rustup.sh
- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
- . $HOME/.cargo/env
- rustup target add i686-unknown-freebsd
- rustup component add clippy
<< : *TEST
i386_test_script:
- . $HOME/.cargo/env
- cargo build --target i686-unknown-freebsd --all-features
- cargo doc --no-deps --target i686-unknown-freebsd --all-features
- cargo test --target i686-unknown-freebsd
i386_feature_script:
- . $HOME/.cargo/env
- if [ -z "$NOHACK" ]; then cargo hack check --each-feature --target i686-unknown-freebsd; fi
before_cache_script: rm -rf $CARGO_HOME/registry/index
# Tasks for Linux aarch64 native builds
task:
matrix:
- name: Linux aarch64 gnu
arm_container:
image: rust:1.69.0
cpu: 1
env:
TARGET: aarch64-unknown-linux-gnu
- name: Linux aarch64 musl
arm_container:
image: rust:1.69.0
cpu: 1
env:
TARGET: aarch64-unknown-linux-musl
setup_script:
- rustup target add $TARGET
- rustup component add clippy
<< : *TEST
before_cache_script: rm -rf $CARGO_HOME/registry/index