Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
1ae866e
ci: prepare 10-way matrix concurrency for Bazel and V8
caokai674 Nov 8, 2026
b3d3420
ci: run independent Windows tests earlier and parallelize cross-platf…
caokai674 Nov 8, 2026
8195608
ci: rotate bounded Linux Bazel action caches per commit with legacy f…
caokai674 Nov 8, 2026
b29af43
ci: keep cache restore-key comments outside YAML scalar
caokai674 Nov 8, 2026
5f10d15
ci: drop Windows and bound Linux test concurrency
caokai674 Nov 10, 2026
7b81587
release: publish only Linux musl x86_64/arm64 packages
caokai674 Nov 10, 2026
e43eee2
ci: unify Linux Bazel repository/action caches across jobs and bound …
caokai674 Nov 10, 2026
1942893
ci: replace oversized native target caches with bounded sccache and s…
caokai674 Nov 10, 2026
6d8d23e
ci: gate upstream syncs on Linux workflow and release policy
caokai674 Nov 10, 2026
e76556b
ci: prune obsolete upstream publishers and add safe scheduled Actions…
caokai674 Nov 10, 2026
714e200
ci: restore Bazel wrapper executable bit and format maintenance scripts
caokai674 Nov 10, 2026
488e4d4
deps(ci): patch OpenSSL advisory and show actionable Ruff diffs
caokai674 Nov 10, 2026
89de22f
ci: apply exact Ruff fixes and regenerate Bazel module lock on Linux
caokai674 Nov 10, 2026
d39c3ac
build: regenerate Bazel lock after OpenSSL security update
github-actions[bot] Nov 10, 2026
259c792
ci: autoformat three workflows using pinned Prettier in GitHub Actions
caokai674 Nov 10, 2026
4c299cf
ci: display exact Prettier YAML diff for maintainer application
caokai674 Nov 10, 2026
0262b40
ci: run verified SQLx SQLite backport and lock refresh in hosted Linux
caokai674 Nov 10, 2026
0f905c0
security: backport SQLx SQLite dependency range and bundle SQLite 3.54.1
github-actions[bot] Nov 10, 2026
b5c2c8b
ci: apply verified Prettier fixes, enforce executable guard and remov…
caokai674 Nov 10, 2026
e6091f1
ci: fix Linux snapshot, sandbox, logging and constrained build checks
caokai674 Nov 11, 2026
99ec479
ci: keep blob size gate independent of Fence audit service
caokai674 Nov 11, 2026
41f6262
test: pin TUI snapshot fixture version and refresh CodeFx update UI e…
caokai674 Nov 11, 2026
5f0dd38
fix(ci): stabilize Linux tests and V8 apt; resolve OpenSSL advisories
caokai674 Nov 12, 2026
c7edebe
fix(core): classify streamed capacity errors and honor bounded retry …
caokai674 Nov 12, 2026
15497f4
fix(ci): apply rustfmt to retry matcher
caokai674 Nov 14, 2026
c85ae44
ci: use Linux fast gate and Codefx smoke checks
caokai674 Nov 14, 2026
08942fa
ci: make installer gate Linux-only reusable
caokai674 Nov 14, 2026
6af49b1
ci: restore official Linux checks and CodeFx gate
caokai674 Nov 14, 2026
7b0d061
ci: keep hosted Linux gates resilient
caokai674 Nov 14, 2026
757ef4f
ci: keep fast Linux gate worktree-clean
caokai674 Nov 14, 2026
ea8017b
ci: discard cargo shear lockfile rewrites
caokai674 Nov 14, 2026
09a112a
ci: restore lockfile after cargo-deny
caokai674 Nov 14, 2026
4018854
ci: keep cargo-deny git cache on runner volume
caokai674 Nov 14, 2026
fa631af
ci: remove flaky Fence hook and relocate cargo-deny cache
caokai674 Nov 14, 2026
cc3e6c1
ci: avoid V8 submodule checkout in cargo-deny
caokai674 Nov 14, 2026
f0457c3
ci: align advisory exceptions with current RustSec database
caokai674 Nov 14, 2026
30f3c23
ci: allow cold Linux SDK builds to finish
caokai674 Nov 14, 2026
a8ca23c
ci: allow cold Linux argument lint builds to finish
caokai674 Nov 14, 2026
c501955
ci: keep fast gate independent of lockfile mutation
caokai674 Nov 14, 2026
eb03946
ci: use authorized Linux fast and Codefx gates
caokai674 Nov 14, 2026
60f6180
ci: restore required Linux upstream gates and cargo shear
caokai674 Nov 14, 2026
b153380
ci: finalize authorized Linux-only merge gate
caokai674 Nov 14, 2026
9ac5872
ci: run cargo shear against the checked out workspace
caokai674 Nov 14, 2026
71918a6
ci: remove cargo-shear dependency from Linux fast gate
caokai674 Nov 14, 2026
0c6a7cf
ci: allow cold Linux argument lint builds to finish
caokai674 Nov 14, 2026
ba9c87b
ci: restore V8 smoke lockfile before clean check
caokai674 Nov 14, 2026
192e55e
ci: allow cold Linux argument lint builds to finish
caokai674 Nov 14, 2026
3a30921
ci: skip fork-only Bazel lint without BuildBuddy
caokai674 Nov 14, 2026
afab9e6
ci: restore versioned official Linux checks and current-source Codefx…
caokai674 Nov 14, 2026
b2a9720
ci: restore official release target selector and provide CI formattin…
caokai674 Nov 14, 2026
70e3bdb
style(ci): apply formatter output generated by GitHub Actions
caokai674 Nov 14, 2026
df27273
ci: restore official Linux V8 smoke coverage and guard its baseline
caokai674 Nov 14, 2026
52bc17e
ci: provide pinned native voice SDK for official GNU Cargo checks
caokai674 Nov 14, 2026
e6634a9
ci: relocate cached voice pkg-config inputs explicitly
caokai674 Nov 14, 2026
96b8b7d
ci: stage the matching native voice plugins for GNU test execution
caokai674 Nov 14, 2026
a21d564
fix(ci): stage writable voice inputs and handle zero-sized V8 heap li…
caokai674 Nov 14, 2026
21bb2c4
fix(deps): apply CI-generated OpenSSL lockfile correction
caokai674 Nov 14, 2026
5df5b1f
fix(ci): prepare verified V8 artifacts for Linux nextest archives
caokai674 Nov 14, 2026
d2f7a56
CI: clean Zig cache before source package gate
caokai674 Nov 14, 2026
7bcd3fa
CI: ignore Zig build cache in worktree
caokai674 Nov 14, 2026
f24c0fb
ci: replace duplicate cold builds with bounded Linux coverage
caokai674 Nov 15, 2026
1903135
ci: apply runner formatting and preserve runtime test helpers
caokai674 Nov 15, 2026
ce2cec9
fix(ci): restore native TLS and isolated runtime test fixtures
caokai674 Nov 15, 2026
fcf76fc
fix(tests): align bounded fixtures with Codefx retry and daemon behavior
caokai674 Nov 15, 2026
bd44ebf
fix(plugins): require account feature opt-in and disable automatic sy…
caokai674 Nov 15, 2026
0be810d
ci: format account sync regressions and isolate HTTP transport diagno…
caokai674 Nov 15, 2026
4988f8c
test: refresh updater snapshots and expose bounded shell startup diag…
caokai674 Nov 15, 2026
85e63a3
test(http): isolate native TLS fixtures from inherited CA overrides
caokai674 Nov 15, 2026
35823dd
fix(ci): isolate model fixtures and align cost polling clocks
caokai674 Nov 15, 2026
2a7eb28
fix(plugins): preserve installed local plugins after remote catalog o…
caokai674 Nov 15, 2026
1e595e0
ci: add focused feature and local plugin regression coverage
caokai674 Nov 15, 2026
a988fa4
fix(ci): align opt-in fixtures and pinned native runtimes
caokai674 Nov 15, 2026
db36bf8
test: apply CI formatting and retain CLI timeout diagnostics
caokai674 Nov 15, 2026
c1304ed
ci: verify native V8 variants explicitly and isolate runtime regressions
caokai674 Nov 15, 2026
9c444ec
fix(shell): suppress remote Bash startup during snapshot replay
caokai674 Nov 15, 2026
5c4e82a
fix: honor OpenAI retry budgets and preserve SDK abort cleanup
caokai674 Nov 15, 2026
364e2f5
test: fix app-server fixture compilation and enable focused protocol …
caokai674 Nov 15, 2026
a70c614
fix: validate transport budgets and reject unavailable programs befor…
caokai674 Nov 15, 2026
098d749
test: preserve restricted reads while granting nested patch helpers
caokai674 Nov 15, 2026
26323f3
style: apply CI-generated regression test formatting
caokai674 Nov 15, 2026
f41d1df
test: complete plugin cache fixtures and focused MCP runtime setup
caokai674 Nov 15, 2026
564d909
style: apply CI-generated plugin fixture formatting
caokai674 Nov 15, 2026
0844193
fix(exec): retain config overrides across resume subcommand boundaries
caokai674 Nov 15, 2026
718a4aa
fix(ci): generate Linux V8 bindings from the native ABI policy
caokai674 Nov 15, 2026
44009f5
test: remove unused automatic-sync fixture waiter
caokai674 Nov 15, 2026
fe6a397
ci: verify adapter policy regressions with formatting suggestions
caokai674 Nov 15, 2026
7a9a9ef
ci: generate Bazel formatting suggestions for V8 binding targets
caokai674 Nov 15, 2026
5d52b1f
style: apply CI-generated CLI and budget regression formatting
caokai674 Nov 15, 2026
ee65017
ci: verify generated V8 constants independent of Rust formatting
caokai674 Nov 15, 2026
009beb9
ci: isolate shared rollout budget regression diagnostics
caokai674 Nov 15, 2026
6c53713
test: match worker completion notices by structured message type
caokai674 Nov 15, 2026
79e055c
style: apply CI-generated V8 target and budget fixture formatting
caokai674 Nov 15, 2026
8ada997
fix(core): report program validation errors without a compaction prefix
caokai674 Nov 15, 2026
023df9a
ci: verify published V8 archive ABI on both native musl runners
caokai674 Nov 15, 2026
4168bfd
style: apply CI-generated turn validation formatting
caokai674 Nov 15, 2026
fcd7bf2
fix: remove redundant error conversion and preflight workspace Clippy…
caokai674 Nov 15, 2026
1caa364
test: align login recommendation and Skills fixtures with local-only …
caokai674 Nov 15, 2026
563f257
test: bound cost telemetry startup and shutdown diagnostics
caokai674 Nov 15, 2026
835ae55
style: apply CI-generated Skills and cost telemetry fixture formatting
caokai674 Nov 15, 2026
b69f14d
fix(plugins): stop automatic recommendation reads during session and …
caokai674 Nov 15, 2026
738bb02
Revert "fix(plugins): stop automatic recommendation reads during sess…
caokai674 Nov 15, 2026
7531051
test: distinguish optional catalog reads from automatic plugin instal…
caokai674 Nov 15, 2026
47d7dd0
test: scope endpoint tool assertions to explicit remote features
caokai674 Nov 15, 2026
80a3e76
style: apply CI-generated login catalog regression formatting
caokai674 Nov 15, 2026
7866e0a
ci: require the official Bazel graph and workspace argument lint befo…
caokai674 Nov 15, 2026
325fe32
test: isolate parent and child response captures and cache-policy com…
caokai674 Nov 15, 2026
f52c198
ci: preflight the pinned official graph and apply CI-generated format…
caokai674 Nov 15, 2026
10e7f16
ci: carry verified sandbox payloads across full nextest archive runners
caokai674 Nov 15, 2026
567bb41
ci: apply generated policy formatting and report required Bazel coverage
caokai674 Nov 15, 2026
b5c3dd6
test: use the existing HTTP client for response routing regression
caokai674 Nov 15, 2026
24c600a
ci: restrict Codefx releases and coverage to Linux amd64
caokai674 Nov 15, 2026
8832efb
ci: preserve projected full workflow formatting
caokai674 Nov 15, 2026
69fd8a4
style: apply CI-generated Python formatting
caokai674 Nov 15, 2026
8edbcce
ci: align full workflow projection with YAML formatting
caokai674 Nov 15, 2026
fa19b03
docs: apply CI README table formatting
caokai674 Nov 15, 2026
f317b74
test: annotate plugin argument literals for lint
caokai674 Nov 15, 2026
fdf9dff
ci: expose archived bubblewrap to nextest tests
caokai674 Nov 15, 2026
14d2f84
ci: run the full amd64 suite in its local environment
caokai674 Nov 15, 2026
af91e55
style: apply CI Rust formatting to argument comments
caokai674 Nov 15, 2026
73eb3a6
test: keep CI projection fixture minimal
caokai674 Nov 15, 2026
12e75c1
style: match CI Rustfmt call wrapping
caokai674 Nov 15, 2026
74d2b9f
test: isolate project root marker discovery
caokai674 Nov 15, 2026
32b2a41
fix(ci): preserve Bazel resource policy across setup action
caokai674 Nov 17, 2026
01a26d0
fix(ci): validate current workflow syntax and pin resource probe Bazel
caokai674 Nov 17, 2026
fe87d98
fix(ci): exercise pinned Bazel and support multicall sleep in install…
caokai674 Nov 17, 2026
d458cdf
fix(test): keep a real helper process alive across Ubuntu runner vari…
caokai674 Nov 17, 2026
3221061
fix(ci): use available runner CPUs within the Bazel memory budget
caokai674 Nov 17, 2026
ce584da
fix(ci): grant V8 artifact read permission through the postmerge caller
caokai674 Nov 17, 2026
ab22efd
fix(ci): bound Bazel test concurrency and report failures promptly
caokai674 Nov 17, 2026
45b1db3
fix(ci): apply cold-build budgets to Bazel lint entrypoints
caokai674 Nov 17, 2026
05996ce
fix(ci): run local Bazel tests after native compilation
caokai674 Nov 17, 2026
871b8ee
style(ci): apply CI-generated baseline projection formatting
caokai674 Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions .github/CI_POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Codefx Linux CI coverage policy

Codefx supports Linux amd64 (x86_64) only. Every build, test, formatter and generator
runs in GitHub Actions. Local work is limited to source edits and static review.

## Candidate and upstream provenance

`.github/upstream-ci.json` pins `openai/codex` `rust-v0.166.0` at
`6ff1e1ca3b30fc8b914720681fcf5fe62e95f856`. The policy job compares retained
upstream workflows and helpers against that immutable checkout. It rejects
unlisted changes to commands, selectors, conditions and action pins.

PR validation checks out GitHub's synthetic merge revision. Current-source
packages record the checked-out commit, target, version and archive SHA256.
SDK CI downloads an artifact from the same workflow run and verifies all four
fields against its checkout before extracting or executing it. Published release
packages never substitute for the candidate.

## Required coverage

`blocking-ci.yml` aggregates these checks into `CI required`:

- Baseline and coverage policy, including mutation/fault regression tests.
- Fast Rust formatting, dependency usage, benchmark smoke and lint-tool tests.
- The official Linux Bazel test graph, Clippy and release configuration checks.
- Workspace argument-comment lint whenever Rust or CI inputs change.
- GNU Cargo Clippy over the workspace, including test targets.
- GNU Cargo nextest over every workspace package. Core, TUI and app-server use
dedicated build groups; other packages are assigned deterministically to three
groups before compilation. No nextest test-name filter narrows this coverage.
- TypeScript SDK build, lint and integration tests; Python SDK lint/tests and
an independently installed Python SDK smoke test.
- Dependency/security policy, repository/architecture checks, spelling and size.
- Installer transaction, rollback and failure tests.
- Current-source amd64 musl release-configuration builds, native ELF/ABI
checks including execution of the V8 ABI probe on the native runner, package
validation, actual installation and reinstallation.

Every required dependency must succeed. Failure, cancellation, an unexpected
skip or a disconnected producer fails the aggregate. SDK waits for source-package
verification and reuses those executables instead of compiling V8 a second time.

## Extended compatibility

`codefx-extended-ci.yml` also exposes the required Bazel checks as standalone
compatibility checks on main and manual runs. `postmerge-ci.yml` retains full
Linux Cargo and V8 verification;
`rust-ci-full.yml` also supports manual runs and `full-ci` branches. The expensive
workspace argument-comment lint remains in full Cargo CI.

Full verification must pass on the source being released, together with the
amd64 native package check. A successful fast gate does not establish full-suite or
release readiness. Upstream syncs must run full Linux verification before release.
Branch protection must explicitly require `CI required`; the job name alone does
not configure GitHub protection. This PR does not change repository settings.

## Explicit infrastructure adaptations

The policy checker permits only these reviewed transformations:

- Remove unsupported Windows, macOS and ARM64 runners and retired upstream publishers.
- Replace private Linux runners with hosted Ubuntu and allow cold-build budgets.
- Grant only `contents: read` and `actions: read` to the postmerge V8 workflow
call. Its child requires artifact read access; the caller must explicitly
allow it on repositories whose default token permissions omit Actions access.
A manual postmerge entrypoint validates the complete nested call and aggregate
before merging, alongside the existing main push trigger.
- Replace the SDK's Bazel CLI build with a verified same-run source package,
preserving SDK commands and running Jest serially on the small runner.
- Remove the duplicate Bazel test entry labelled musl: its matrix value only
selected cache names, and both entries built native GNU. Genuine musl coverage
is supplied by explicit Cargo targets and inspected native packages.
- Disable the local Bazel disk action cache to avoid duplicating cold build
outputs. Repository download caches remain available; BuildBuddy is optional.
`setup-bazel` replaces the home bazelrc, so its `bazelrc` input must import
the separate runner policy. A real Bazel probe checks the effective CPU/memory
caps and absence of action-cache writes after setup, with an explicitly enabled
cache as a positive control. Bazel 9.2 uses `--disk_cache=` to disable this cache.
Local actions use the runner's available CPUs and a 4096 MiB memory budget;
Cargo retains its two-job limit. Remote execution concurrency is unchanged.
- Limit local Bazel test execution to one test binary and two Rust test threads.
Libtest otherwise multiplies the build scheduler's concurrency and can exhaust
short authentication/catalog deadlines during native compilation. Preserve
every test and the product's deadlines; repeat the full provider suite under
competing CPU load in the targeted regression workflow. Stop the Bazel run on
its first failed test so a test failure is visible before the remaining native
build finishes. Passing runs still execute the complete selected test graph.
On runners without BuildBuddy, use exclusive test scheduling so execution
starts after the native build graph finishes. A one-binary limit alone still
allows compilation to compete with short protocol deadlines. Remote execution
keeps its existing scheduling. The targeted regression also repeats the full
exec-server capability-discovery suite with competing CPU work.
- Allow six hours for the complete Bazel graph and workspace argument-comment
lint, including source-built V8 when BuildBuddy credentials are unavailable.
Keep all test, Clippy and release-only
commands. Sample free disk throughout the build and report the minimum and
per-directory consumption before artifact/cache uploads, including on failure.
- Set the CI test profile to no debug information and no incremental state.
Bound sccache to 2 GiB, share download-only Cargo caches across profiles and
pin installed tool versions using the install action's supported `tool` input.
- Build the Linux sandbox payload before test archival, compile its digest into
consumers, and transfer the payload and digest with runtime test helpers.
Test runners verify the digest before staging the executable beside the CLI.
Resolve compatibility release inputs on both archive and test runners.
- Put Zig's local cache outside the checkout and report disk consumption.
- Supply the checksum-verified Codex V8 archive and pinned GNU voice SDK/runtime.
Keep voice version probes, voice tests and V8 consumers enabled.
- Generate Linux V8 bindings in CI from the pinned headers and sandbox release
defines. The published Unix archive uses a 64-byte inline TypedArray threshold;
its size-zero published binding is incompatible. Preserve archive checksum
verification and test the generated binding against the actual native library.
- Select V8 canary features explicitly with `--no-default-features`, enabling
`sandbox` only for that native variant. The normal workspace probe defaults to
the sandbox pair used by production; both canary variants retain all tests.
- Use the canonical DotSlash action URL and the cargo-deny container cache path.
- Omit the unavailable OpenAI Fence audit hook while retaining blob-size checks.

Musl native dependencies use bounded network retries, an alternate libcap source
and atomic checksum-verified promotion. A checksum mismatch fails immediately;
transport failure may try another source. These rules have CI fault coverage.

## Updating the baseline

Update the source version, manifest and policy checkout together. Retain upstream
commands except for the listed transformations. Update regression tests whenever
upstream changes job structure. Run fast, full and native package checks against
one final amd64 candidate and report exact commits and Actions links. Pending, skipped,
cancelled and unavailable checks are never reported as passes.
30 changes: 30 additions & 0 deletions .github/actions/codefx-linux-runner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Codefx Linux runner
description: Adapt hosted Linux runner resources without changing upstream checks.
runs:
using: composite
steps:
- name: Reclaim unused hosted runner tools
if: runner.environment == 'github-hosted'
shell: bash
run: |
set -euo pipefail
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
df -h "$GITHUB_WORKSPACE"
- name: Bound local build resources
shell: bash
run: |
set -euo pipefail
# setup-bazel replaces the home bazelrc. Keep the policy in a separate
# file, imported both here and by setup-bazel's bazelrc input.
# Bazel 9.2 disables the action cache with an empty disk_cache path.
cat > "$RUNNER_TEMP/codefx-linux.bazelrc" <<'EOF'
build --local_resources=cpu=HOST_CPUS
build --local_resources=memory=4096
common --disk_cache=
test --local_test_jobs=1
test --test_env=RUST_TEST_THREADS=2
EOF
printf '\nimport %s/codefx-linux.bazelrc\n' "$RUNNER_TEMP" >> "$HOME/.bazelrc"
echo 'CARGO_BUILD_JOBS=2' >> "$GITHUB_ENV"
echo 'CARGO_INCREMENTAL=0' >> "$GITHUB_ENV"
echo 'SCCACHE_CACHE_SIZE=2G' >> "$GITHUB_ENV"
73 changes: 73 additions & 0 deletions .github/actions/codefx-linux-v8-binding/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Codefx Linux V8 binding
description: Generate Cargo bindings from the native Unix V8 ABI policy.
inputs:
target:
description: Linux Rust target paired with the verified sandbox archive.
required: true
runs:
using: composite
steps:
- name: Restore binding generated from the pinned native headers
id: cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ${{ runner.temp }}/codefx-v8-binding
key: codefx-v8-binding-v1-${{ inputs.target }}-${{ hashFiles('third_party/v8/**', 'patches/**', 'MODULE.bazel', 'MODULE.bazel.lock', 'codex-rs/Cargo.lock', '.github/actions/codefx-linux-v8-binding/action.yml') }}
- name: Prepare binding generator
if: steps.cache.outputs.cache-hit != 'true'
uses: ./.github/actions/prepare-bazel-ci
with:
target: v8-binding-${{ inputs.target }}
cache-scope: codefx-v8-binding
- name: Generate the matching sandbox release binding
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
env:
TARGET: ${{ inputs.target }}
run: |
set -euo pipefail
case "$TARGET" in
x86_64-unknown-linux-gnu) platform=linux_amd64 ;;
aarch64-unknown-linux-gnu) platform=linux_arm64 ;;
x86_64-unknown-linux-musl) platform=linux_amd64_musl ;;
aarch64-unknown-linux-musl) platform=linux_arm64_musl ;;
*) echo "Unsupported Linux V8 binding target: $TARGET" >&2; exit 1 ;;
esac
label="//third_party/v8:rusty_v8_sandbox_binding_${TARGET//-/_}"
./.github/scripts/run-bazel-ci.sh --remote-download-toplevel -- \
build "--platforms=@llvm//platforms:$platform" -- "$label"
binding="$(./.github/scripts/run-bazel-ci.sh -- \
cquery "--platforms=@llvm//platforms:$platform" --output=files -- "$label" | grep -E '\.rs$')"
test -f "$binding"
mkdir -p "$RUNNER_TEMP/codefx-v8-binding"
cp "$binding" "$RUNNER_TEMP/codefx-v8-binding/binding.rs"
- name: Verify native threshold and select the generated binding
shell: bash
run: |
set -euo pipefail
binding="$RUNNER_TEMP/codefx-v8-binding/binding.rs"
# The published Unix archive uses the owned policy's 64-byte threshold.
# Its published size-zero binding must not reach get_contents FFI.
# Bazel bindgen output can be one line without rustfmt spacing.
python3 - "$binding" <<'PY'
import pathlib
import re
import sys
binding = pathlib.Path(sys.argv[1]).read_text()
values = re.findall(
r"\bpub\s+const\s+v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP\s*:\s*[^=;]+?=\s*(\d+)(?:usize|u32|u64)?\s*;",
binding,
)
if values != ["64"]:
raise SystemExit(f"Expected exactly one native 64-byte threshold; found {values}")
print("Generated Linux V8 binding uses the native 64-byte threshold")
PY
echo "RUSTY_V8_SRC_BINDING_PATH=$binding" >> "$GITHUB_ENV"
- name: Preserve generated binding for CI diagnosis
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: codefx-v8-binding-${{ inputs.target }}
path: ${{ runner.temp }}/codefx-v8-binding/binding.rs
if-no-files-found: ignore
retention-days: 3
74 changes: 74 additions & 0 deletions .github/actions/codefx-linux-voice-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Codefx Linux voice SDK
description: Supply the repository-pinned native SDK to the official GNU Cargo checks.
runs:
using: composite
steps:
- name: Install native audio prerequisites
shell: bash
run: |
set -euo pipefail
sudo apt-get update -o Acquire::Retries=3
sudo apt-get install -y --no-install-recommends libasound2-dev pkg-config
- name: Restore pinned native voice SDK
id: cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ${{ runner.temp }}/codefx-voice-sdk
key: codefx-voice-sdk-v3-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('third_party/voice/**', 'MODULE.bazel', 'MODULE.bazel.lock', '.github/actions/codefx-linux-voice-sdk/action.yml') }}
- name: Prepare native SDK build tools
if: steps.cache.outputs.cache-hit != 'true'
uses: ./.github/actions/prepare-bazel-ci
with:
target: voice-sdk-${{ runner.arch }}
cache-scope: codefx-voice-sdk
- name: Build and stage the pinned SDK
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
shell: bash
run: |
set -euo pipefail
# The official Bazel recipe verifies pinned source archives and exports
# relocatable development inputs from its inspected native runtime.
./.github/scripts/run-bazel-ci.sh --remote-download-toplevel -- \
build --platforms=//:local_linux -- \
//third_party/voice:native_sdk //third_party/voice:native_runtime
sdk="$(./.github/scripts/run-bazel-ci.sh -- \
cquery --platforms=//:local_linux --output=files -- \
//third_party/voice:native_sdk | grep -E '^(/|bazel-out/)')"
test -d "$sdk"
mkdir -p "$RUNNER_TEMP/codefx-voice-sdk"
cp -a "$sdk/." "$RUNNER_TEMP/codefx-voice-sdk/"
# Bazel outputs are read-only. The staged copy must accept the runtime
# directory and remain writable when restored from the Actions cache.
chmod -R u+w "$RUNNER_TEMP/codefx-voice-sdk"
runtime="$(./.github/scripts/run-bazel-ci.sh -- \
cquery --platforms=//:local_linux --output=files -- \
//third_party/voice:native_runtime | grep -E '^(/|bazel-out/)')"
test -d "$runtime"
mkdir -p "$RUNNER_TEMP/codefx-voice-sdk/runtime"
cp -a "$runtime/." "$RUNNER_TEMP/codefx-voice-sdk/runtime/"
chmod -R u+w "$RUNNER_TEMP/codefx-voice-sdk/runtime"
- name: Configure Cargo development inputs and runtime libraries
shell: bash
run: |
set -euo pipefail
sdk="$RUNNER_TEMP/codefx-voice-sdk"
test -f "$sdk/sdk.json"
wrapper="$RUNNER_TEMP/codefx-voice-pkg-config"
cat > "$wrapper" <<'EOF'
#!/bin/sh
exec /usr/bin/pkg-config --define-prefix "$@"
EOF
chmod +x "$wrapper"
# Keep the SDK ahead of host packages so GNU Cargo uses the same
# GLib/GStreamer versions as Bazel. ALSA remains a system ABI input.
echo "PKG_CONFIG_PATH=$sdk/lib/pkgconfig" >> "$GITHUB_ENV"
echo "PKG_CONFIG=$wrapper" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=$sdk/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
echo "GST_PLUGIN_SYSTEM_PATH_1_0=$sdk/runtime/lib/gstreamer-1.0" >> "$GITHUB_ENV"
echo "GST_PLUGIN_PATH_1_0=$sdk/runtime/lib/gstreamer-1.0" >> "$GITHUB_ENV"
echo "GST_REGISTRY=$RUNNER_TEMP/codefx-voice-registry.bin" >> "$GITHUB_ENV"
# Load the receipt-verified plugins directly in Cargo tests, just as the
# packaged helper does. A host GStreamer scanner can have a different ABI.
echo "CODEX_TEST_VOICE_RUNTIME=$sdk/runtime" >> "$GITHUB_ENV"
PKG_CONFIG_PATH="$sdk/lib/pkgconfig" "$wrapper" --atleast-version=1.28 gstreamer-audio-1.0
Loading
Loading