Repository navigation
152 lines (148 loc) · 6.29 KB
/
Copy pathbuild.yml
File metadata and controls
152 lines (148 loc) · 6.29 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Build
on:
push:
branches:
- main
pull_request:
paths:
- crates/**
- Cargo.toml
- Cargo.lock
- .github/workflows/build.yml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C debuginfo=0 -C target-cpu=x86-64-v3"
RUST_BACKTRACE: "1"
CARGO_INCREMENTAL: "0"
jobs:
linux-build:
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
# Pin debuginfo=0 here too (the workflow level is also 0 since 2026-10-12) for this job (parity with the
# `test` + `test-with-coverage` jobs in rust-test.yml, TD-CI-TEST-JOB-DEBUGINFO0
# / TD-CI-COVERAGE-MOLD-1). This job links the SAME full lance+datafusion
# test-binary set at the SAME disk/RSS cliff and was the one job still
# missing the mitigation — it flaked twice with a hard `rust-lld` SIGBUS
# (signal 7 = object file truncated when the link partition fills mid-link,
# crashing in llvm::parallelFor). debuginfo carries no value in CI (no
# debugger is attached); dropping it cut per-binary link footprint ~73%
# in the sibling jobs. Note: a job-level RUSTFLAGS gives this job its own
# Swatinem cache key — the first run after this change repopulates it.
RUSTFLAGS: "-C debuginfo=0 -C target-cpu=x86-64-v3"
defaults:
run:
working-directory: lance-graph
steps:
- uses: actions/checkout@v4
with:
path: lance-graph
- name: Checkout AdaWorldAPI/ndarray (sibling dependency)
uses: actions/checkout@v4
with:
repository: AdaWorldAPI/ndarray
path: ndarray
- uses: actions/checkout@v4
with:
repository: AdaWorldAPI/OGAR
path: OGAR
# Toolchain comes from `rust-toolchain.toml` (channel + components), NOT
# from a version restated here. `rustup show` installs and activates
# whatever that file pins — so a bump is ONE edit in ONE file, which is
# exactly what that file's own comment asks for ("a bump edits `channel`
# and leaves the prose behind"). Previously this installed `stable` and
# set it as default; inside the repo the toolchain file won anyway, so
# these jobs already ran on the pin while the workflow said otherwise.
- name: Setup rust toolchain (pinned by rust-toolchain.toml)
run: rustup show
- name: Setup mold linker
# Parity with rust-test.yml: the heavy lance+datafusion build + test
# binaries hit the GNU-ld/rust-lld RSS+disk cliff at the link step
# (intermittent SIGBUS). mold links them fast + low-memory.
uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "lance-graph-deps"
workspaces: |
lance-graph/crates/lance-graph
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler
- name: Build lance-graph
run: cargo build --manifest-path crates/lance-graph/Cargo.toml
- name: Build tests
run: cargo test --manifest-path crates/lance-graph/Cargo.toml --no-run
- name: Run tests
run: cargo test --manifest-path crates/lance-graph/Cargo.toml
- name: Check benchmarks
run: cargo check --manifest-path crates/lance-graph/Cargo.toml --benches
# Production runs x86-64-v4, but GitHub's runners are mostly v3, so the v4
# arm cannot be executed here. This job compiles and links it without
# running anything.
#
# `--target` is load-bearing: without it RUSTFLAGS also reaches build
# scripts and proc-macros, which DO run on this host, so a v3 runner could
# die with SIGILL in the middle of the build. With an explicit target,
# RUSTFLAGS applies only to target artifacts (measured: the build script
# compiles with no target-cpu, the crate with x86-64-v4).
#
# Two tiers: x86-64-v4 (the floor production runs on) and sapphirerapids
# (Dockerfile.avx512, the canonical deploy; Railway hosts are Sapphire
# Rapids, Emerald Rapids or newer). Both compile, neither runs.
linux-build-v4:
name: linux-build-v4 (${{ matrix.cpu }})
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
cpu: [x86-64-v4, sapphirerapids]
env:
RUSTFLAGS: "-C debuginfo=0 -C target-cpu=${{ matrix.cpu }}"
# Runner disk makes debug 0 mandatory. With `--target`, RUSTFLAGS no
# longer reaches build scripts and proc-macros, so their debug level
# comes from the profile; these pin it to 0 for every artifact.
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_PROFILE_TEST_DEBUG: "0"
CARGO_INCREMENTAL: "0"
defaults:
run:
working-directory: lance-graph
steps:
- uses: actions/checkout@v4
with:
path: lance-graph
- name: Checkout AdaWorldAPI/ndarray (sibling dependency)
uses: actions/checkout@v4
with:
repository: AdaWorldAPI/ndarray
path: ndarray
- uses: actions/checkout@v4
with:
repository: AdaWorldAPI/OGAR
path: OGAR
- name: Setup rust toolchain (pinned by rust-toolchain.toml)
run: rustup show
- name: Setup mold linker
uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "lance-graph-deps-${{ matrix.cpu }}"
workspaces: |
lance-graph/crates/lance-graph
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler
- name: Check the target really is AVX-512
run: |
rustc --print cfg -C target-cpu=${{ matrix.cpu }} | grep -qx 'target_feature="avx512f"'
echo "Built for ${{ matrix.cpu }} (not run). Runner CPU: $(grep -m1 'model name' /proc/cpuinfo | cut -d: -f2)" >> "$GITHUB_STEP_SUMMARY"
- name: Build tests for ${{ matrix.cpu }} (no run)
run: cargo test --manifest-path crates/lance-graph/Cargo.toml --target x86_64-unknown-linux-gnu --no-run
- name: Check benchmarks for ${{ matrix.cpu }}
run: cargo check --manifest-path crates/lance-graph/Cargo.toml --target x86_64-unknown-linux-gnu --benches