Skip to content

Commit d8302c9

Browse files
committed
ci: add pr-fast and nightly validation workflows
1 parent d796da8 commit d8302c9

5 files changed

Lines changed: 206 additions & 0 deletions

File tree

.github/workflows/canary.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ jobs:
4444
- name: Checkout
4545
uses: actions/checkout@v4
4646

47+
- name: Cache vendored deps
48+
uses: actions/cache@v4
49+
with:
50+
path: |
51+
.vendor/flow-vendor
52+
lib/vendor
53+
lib/vendor-manifest
54+
key: ${{ runner.os }}-${{ runner.arch }}-vendor-${{ hashFiles('vendor.lock.toml') }}
55+
4756
- name: Hydrate vendored deps
4857
run: scripts/vendor/vendor-repo.sh hydrate
4958

@@ -108,6 +117,15 @@ jobs:
108117
- name: Checkout
109118
uses: actions/checkout@v4
110119

120+
- name: Cache vendored deps
121+
uses: actions/cache@v4
122+
with:
123+
path: |
124+
.vendor/flow-vendor
125+
lib/vendor
126+
lib/vendor-manifest
127+
key: ${{ runner.os }}-${{ runner.arch }}-vendor-${{ hashFiles('vendor.lock.toml') }}
128+
111129
- name: Hydrate vendored deps
112130
run: scripts/vendor/vendor-repo.sh hydrate
113131

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Nightly Validation
2+
3+
on:
4+
schedule:
5+
- cron: "27 3 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
timeout-minutes: 50
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- target: x86_64-apple-darwin
22+
os: macos-latest
23+
- target: aarch64-apple-darwin
24+
os: macos-latest
25+
- target: x86_64-unknown-linux-gnu
26+
os: ubuntu-latest
27+
- target: aarch64-unknown-linux-gnu
28+
os: ubuntu-latest
29+
30+
runs-on: ${{ matrix.os }}
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Cache vendored deps
36+
uses: actions/cache@v4
37+
with:
38+
path: |
39+
.vendor/flow-vendor
40+
lib/vendor
41+
lib/vendor-manifest
42+
key: ${{ runner.os }}-${{ runner.arch }}-vendor-${{ hashFiles('vendor.lock.toml') }}
43+
44+
- name: Hydrate vendored deps
45+
run: scripts/vendor/vendor-repo.sh hydrate
46+
47+
- name: Install Rust
48+
uses: dtolnay/rust-toolchain@stable
49+
with:
50+
targets: ${{ matrix.target }}
51+
52+
- name: Cache Rust build
53+
uses: Swatinem/rust-cache@v2
54+
with:
55+
workspaces: ". -> target"
56+
cache-on-failure: true
57+
58+
- name: Install cross-compilation tools (Linux ARM)
59+
if: matrix.target == 'aarch64-unknown-linux-gnu'
60+
run: |
61+
sudo apt-get update
62+
sudo apt-get install -y gcc-aarch64-linux-gnu
63+
64+
- name: Build
65+
run: |
66+
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
67+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
68+
fi
69+
cargo build --release --target ${{ matrix.target }} --bin f
70+
71+
build-linux-host-simd:
72+
timeout-minutes: 50
73+
runs-on: [self-hosted, linux, x64, ci-1focus]
74+
env:
75+
RUSTFLAGS: -C target-cpu=native
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v4
79+
80+
- name: Cache vendored deps
81+
uses: actions/cache@v4
82+
with:
83+
path: |
84+
.vendor/flow-vendor
85+
lib/vendor
86+
lib/vendor-manifest
87+
key: ${{ runner.os }}-${{ runner.arch }}-vendor-${{ hashFiles('vendor.lock.toml') }}
88+
89+
- name: Hydrate vendored deps
90+
run: scripts/vendor/vendor-repo.sh hydrate
91+
92+
- name: Install Rust
93+
uses: dtolnay/rust-toolchain@stable
94+
with:
95+
targets: x86_64-unknown-linux-gnu
96+
97+
- name: Cache Rust build
98+
uses: Swatinem/rust-cache@v2
99+
with:
100+
workspaces: ". -> target"
101+
cache-on-failure: true
102+
103+
- name: Build (Linux host SIMD)
104+
run: cargo build --release --target x86_64-unknown-linux-gnu --features linux-host-simd-json --bin f

.github/workflows/pr-fast.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: PR Fast Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- "docs/**"
9+
- "**/*.md"
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: pr-fast-${{ github.event.pull_request.number }}
16+
cancel-in-progress: true
17+
18+
env:
19+
CARGO_TERM_COLOR: always
20+
21+
jobs:
22+
check-linux:
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 30
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Cache vendored deps
30+
uses: actions/cache@v4
31+
with:
32+
path: |
33+
.vendor/flow-vendor
34+
lib/vendor
35+
lib/vendor-manifest
36+
key: ${{ runner.os }}-${{ runner.arch }}-vendor-${{ hashFiles('vendor.lock.toml') }}
37+
38+
- name: Hydrate vendored deps
39+
run: scripts/vendor/vendor-repo.sh hydrate
40+
41+
- name: Install Rust
42+
uses: dtolnay/rust-toolchain@stable
43+
44+
- name: Cache Rust build
45+
uses: Swatinem/rust-cache@v2
46+
with:
47+
workspaces: ". -> target"
48+
cache-on-failure: true
49+
50+
- name: Check flowd
51+
run: cargo check -p flowd
52+
53+
- name: Check flowd SIMD feature lane
54+
run: cargo check -p flowd --features linux-host-simd-json
55+
56+
- name: Check seq bridge
57+
run: cargo check -p seq_everruns_bridge

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ jobs:
3636
- name: Checkout
3737
uses: actions/checkout@v4
3838

39+
- name: Cache vendored deps
40+
uses: actions/cache@v4
41+
with:
42+
path: |
43+
.vendor/flow-vendor
44+
lib/vendor
45+
lib/vendor-manifest
46+
key: ${{ runner.os }}-${{ runner.arch }}-vendor-${{ hashFiles('vendor.lock.toml') }}
47+
3948
- name: Hydrate vendored deps
4049
run: scripts/vendor/vendor-repo.sh hydrate
4150

@@ -100,6 +109,15 @@ jobs:
100109
- name: Checkout
101110
uses: actions/checkout@v4
102111

112+
- name: Cache vendored deps
113+
uses: actions/cache@v4
114+
with:
115+
path: |
116+
.vendor/flow-vendor
117+
lib/vendor
118+
lib/vendor-manifest
119+
key: ${{ runner.os }}-${{ runner.arch }}-vendor-${{ hashFiles('vendor.lock.toml') }}
120+
103121
- name: Hydrate vendored deps
104122
run: scripts/vendor/vendor-repo.sh hydrate
105123

docs/ci-cd-runbook.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ This runbook documents how Flow CI/CD is wired today and how to debug it quickly
55
## Architecture
66

77
- Workflows:
8+
- `.github/workflows/pr-fast.yml`: fast PR gate (Linux) using vendored hydrate + `cargo check`.
89
- `.github/workflows/canary.yml`: runs on every push to `main`, publishes/updates the `canary` release/tag.
10+
- `.github/workflows/nightly-validation.yml`: scheduled full cross-target validation (plus host SIMD) without publishing.
911
- `.github/workflows/release.yml`: runs on tag pushes matching `v*`, publishes stable releases.
1012
- Trigger optimization:
1113
- Canary `push` skips docs-only changes (`docs/**`, `**/*.md`).
1214
- Use `workflow_dispatch` to force a Canary run when needed after docs-only changes.
1315
- Vendored deps bootstrap:
1416
- Both workflows run `scripts/vendor/vendor-repo.sh hydrate` immediately after checkout in each build job.
1517
- This materializes `lib/vendor/*` from the pinned commit in `vendor.lock.toml` before Cargo builds.
18+
- Build jobs cache vendor checkout/materialization (`.vendor/flow-vendor`, `lib/vendor`, `lib/vendor-manifest`) keyed by `vendor.lock.toml`.
1619
- Build jobs in both workflows:
1720
- Matrix build: macOS + Linux targets.
1821
- SIMD build: `build-linux-host-simd` (Linux x64 with `--features linux-host-simd-json`).
@@ -89,6 +92,12 @@ Canary flow:
8992
2. Watch `Canary` workflow.
9093
3. Confirm `canary` tag moved and release assets updated.
9194

95+
PR flow:
96+
97+
1. Open/refresh PR to `main`.
98+
2. Watch `PR Fast Check`.
99+
3. Merge only after fast check passes.
100+
92101
## Debug Playbook
93102

94103
### 1) Workflow failed or stuck

0 commit comments

Comments
 (0)