Repository navigation
93 lines (89 loc) · 3.44 KB
/
Copy pathci.yml
File metadata and controls
93 lines (89 loc) · 3.44 KB
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
88
89
90
91
92
93
name: ci
on:
push:
pull_request:
jobs:
test-x86_64:
name: test (x86_64)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Reproducible CPU VM regression
run: python3 scripts/ci/vm_regression.py --profile cpu --output artifacts/vm-regression
- name: Retain regression evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: cpu-vm-regression-x86_64
path: artifacts/vm-regression/
if-no-files-found: error
retention-days: 14
- name: Reject accelerator linkage and erasure coding
run: |
python3 - <<'PY'
import pathlib, re, sys
bad = re.compile(
r"^(cuda|doca|nixl|rdma|spdk|libnixl)([-_a-z0-9]*)?\s*=",
re.I,
)
failed = False
for path in pathlib.Path("crates").glob("*/Cargo.toml"):
in_deps = False
for lineno, line in enumerate(path.read_text().splitlines(), 1):
stripped = line.split("#", 1)[0].strip()
if stripped.startswith("[") and stripped.endswith("]"):
in_deps = "dependencies" in stripped
continue
if in_deps and bad.match(stripped):
print(f"{path}:{lineno}: accelerator dependency is not allowed")
failed = True
if failed:
sys.exit(1)
PY
if grep -RInE 'reed_solomon|erasure_coding|parity_shard' crates --include '*.rs'; then
echo "erasure coding must not be added"
exit 1
fi
- name: Keep the cold tier off the hot path
run: |
if grep -n 'gpucache-cold' crates/storage/Cargo.toml crates/transport/Cargo.toml crates/protocol/Cargo.toml crates/core-types/Cargo.toml; then
echo "RustFS cold tier must not be a hot-path dependency"
exit 1
fi
if grep -n 'gpucache-dpu' crates/storage/Cargo.toml crates/transport/Cargo.toml crates/protocol/Cargo.toml crates/core-types/Cargo.toml crates/cold/Cargo.toml; then
echo "DPU crate must stay off the hot path and off the cold crate"
exit 1
fi
test-aarch64:
name: test (aarch64 runner)
runs-on: ubuntu-24.04-arm
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Test
run: |
echo "aarch64 cargo test is a CPU build. It is not a BlueField or DOCA run."
cargo test --workspace --all-targets --locked
test-aarch64-qemu:
name: test (aarch64 qemu-user)
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Cross toolchain
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user-static libc6-dev-arm64-cross
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-unknown-linux-gnu
- name: Test under qemu-aarch64
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER: qemu-aarch64-static -L /usr/aarch64-linux-gnu
run: cargo test --workspace --all-targets --locked --target aarch64-unknown-linux-gnu