/
.cirrus.yml
64 lines (61 loc) · 1.87 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
freebsd_instance:
image: freebsd-13-2-release-amd64
setup: &SETUP
env:
HOME: /tmp # cargo cache needs it
# Temporary workaround for https://github.com/rust-lang/rustup/issues/2774
RUSTUP_IO_THREADS: 1
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
# Record some info about the test environment
sysinfo_script:
- mount
- df -h
- sysctl hw.model hw.ncpu hw.physmem
- freebsd-version
setup_script:
- fetch https://sh.rustup.rs -o rustup.sh
- sh rustup.sh -y
- $HOME/.cargo/bin/rustup toolchain install $VERSION
# aio on ufs is considered unsafe
- sysctl vfs.aio.enable_unsafe=1
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock || echo ""
task:
name: FreeBSD 13.2 MSRV
env:
VERSION: 1.66.0
<< : *SETUP
test_script:
- . $HOME/.cargo/env
- cargo +$VERSION test
- cargo +$VERSION doc --no-deps
# Also run tests with sudo, because some need it for mdconfig
- sudo -E cargo test --tests
before_cache_script: rm -rf $HOME/.cargo/registry/index
task:
name: FreeBSD 13.2 nightly
env:
# Workaround Rust bug https://github.com/rust-lang/rust/issues/104815
VERSION: nightly-2022-11-19-x86_64-unknown-freebsd
<< : *SETUP
test_script:
- . $HOME/.cargo/env
- cargo +$VERSION test --all-targets
# Also run tests with sudo, because some need it for mdconfig
- sudo -E cargo test --tests
clippy_script:
- . $HOME/.cargo/env
- cargo +$VERSION clippy --all-features --all-targets -- -D warnings
audit_script:
- . $HOME/.cargo/env
- pkg install -y cargo-audit
- cargo audit
# Test our minimal version spec
minver_test_script:
- . $HOME/.cargo/env
- cargo +$VERSION update -Zminimal-versions
- cargo +$VERSION check --all-targets
- cargo +$VERSION doc --no-deps
before_cache_script: rm -rf $HOME/.cargo/registry/index