-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
.cirrus.yml
78 lines (76 loc) · 3.24 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
only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main')
auto_cancellation: $CIRRUS_PR != ''
env:
CARGO_INCREMENTAL: '0'
CARGO_NET_RETRY: '10'
CARGO_TERM_COLOR: always
RUST_BACKTRACE: '1'
RUST_TEST_THREADS: '1'
RUSTDOCFLAGS: -D warnings
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: '10'
PORTABLE_ATOMIC_DENY_WARNINGS: '1'
aarch64_linux_test_task:
name: test ($TARGET)
env:
TARGET: aarch64-unknown-linux-gnu
arm_container:
image: rust
setup_script:
- set -CeEuxo pipefail
- |
retry() {
for i in {1..10}; do
if "$@"; then
return 0
else
sleep "${i}"
fi
done
"$@"
}
- lscpu
- retry rustup toolchain add nightly --no-self-update && rustup default nightly
# - retry apt-get -o Acquire::Retries=10 -qq update && retry apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends moreutils
- retry curl --proto '=https' --tlsv1.2 -fsSL "https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${TARGET}.tar.gz" | tar xzf - -C "${CARGO_HOME}/bin"
test_script:
- set -CeEuxo pipefail
- ./tools/test.sh -vv
# We test doctest only once with the default build conditions because doctest is slow. Both api-test
# and src/tests have extended copies of doctest, so this will not reduce test coverage.
# outline-atomics is enabled by default on linux-gnu and linux-musl with dynamic linking.
- RUSTFLAGS="${RUSTFLAGS} --cfg portable_atomic_no_outline_atomics" RUSTDOCFLAGS="${RUSTDOCFLAGS} --cfg portable_atomic_no_outline_atomics" ./tools/test.sh -vv --tests
# +lse
# Neoverse N1 is Armv8.2 and doesn't support FEAT_LSE2.
# FEAT_LSE2 is tested on AArch64 macOS VM.
- RUSTFLAGS="${RUSTFLAGS} -C target-feature=+lse" RUSTDOCFLAGS="${RUSTDOCFLAGS} -C target-feature=+lse" ./tools/test.sh -vv --tests
aarch64_linux_valgrind_task:
name: valgrind ($TARGET)
env:
TARGET: aarch64-unknown-linux-gnu
arm_container:
image: rust
setup_script:
- set -CeEuxo pipefail
- |
retry() {
for i in {1..10}; do
if "$@"; then
return 0
else
sleep "${i}"
fi
done
"$@"
}
- retry rustup toolchain add nightly --no-self-update && rustup default nightly
- retry apt-get -o Acquire::Retries=10 -qq update && retry apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends valgrind # moreutils
- retry curl --proto '=https' --tlsv1.2 -fsSL "https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${TARGET}.tar.gz" | tar xzf - -C "${CARGO_HOME}/bin"
test_script:
- set -CeEuxo pipefail
- ./tools/test.sh valgrind -vv
# outline-atomics is enabled by default on linux-gnu and linux-musl with dynamic linking.
- RUSTFLAGS="${RUSTFLAGS} --cfg portable_atomic_no_outline_atomics" RUSTDOCFLAGS="${RUSTDOCFLAGS} --cfg portable_atomic_no_outline_atomics" ./tools/test.sh valgrind -vv
# +lse
# As of Valgrind 3.19, Valgrind supports atomic instructions of Armv8.0 and Armv8.1 (FEAT_LSE).
- RUSTFLAGS="${RUSTFLAGS} -C target-feature=+lse" RUSTDOCFLAGS="${RUSTDOCFLAGS} -C target-feature=+lse" ./tools/test.sh valgrind -vv