Consolidate redundant Rust compilation jobs to cut PR cycle time from 2+ hours to ~30 minutes by reducing parallel cold compilations and upgrading runners. CI Run (ci-run.yml): - Merge lint + workspace-check + package-check → quality-gate (25min, 8vcpu) - Merge test + build → test-and-build (30min, 8vcpu) - Unify cache keys: prefix-key=zeroclaw-ci-v1, shared-key=runner.os-rust - Update ci-required gate, lint-feedback deps to reference new job names Security Audit (sec-audit.yml): - Merge audit + deny + security-regressions → rust-security (25min, 8vcpu) - Merge sbom + unsafe-debt → compliance (lightweight runner) - Add fast-path: non-Rust PRs skip Rust compilation entirely Frequency optimization (off PR path): - sec-codeql.yml: push-to-main + weekly only (was PR + push) - ci-reproducible-build.yml: push-to-main + weekly only (was PR + push) - ci-change-audit.yml: push-to-main only (was PR + push) Runner upgrades: - All Rust compilation jobs: 2vcpu → blacksmith-8vcpu-ubuntu-2404 - ci-supply-chain-provenance, test-fuzz: upgraded to 8vcpu - test-e2e: upgraded to 8vcpu, fixed env indentation bug Feature matrix (feature-matrix.yml): - Non-default lanes (whatsapp-web, browser-native, nightly-all-features) skip on compile profile, run on nightly only - resolve-profile + summary jobs use ubuntu-latest (no Rust compilation) Docs/scripts: - lint_feedback.js: update job name references for quality-gate - required-check-mapping.md: document new consolidated job names - ci-map.md: update trigger map, triage guide, maintenance rules - self-hosted-runner-remediation.md: update job name reference Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
72 lines
2.5 KiB
YAML
72 lines
2.5 KiB
YAML
name: Test E2E
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
paths:
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- "src/**"
|
|
- "crates/**"
|
|
- "tests/**"
|
|
- "scripts/**"
|
|
- "scripts/ci/ensure_cc.sh"
|
|
- ".github/workflows/test-e2e.yml"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: test-e2e-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref_name || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
GIT_CONFIG_COUNT: "1"
|
|
GIT_CONFIG_KEY_0: core.hooksPath
|
|
GIT_CONFIG_VALUE_0: /dev/null
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
integration-tests:
|
|
name: Integration / E2E Tests
|
|
runs-on: blacksmith-8vcpu-ubuntu-2404
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
with:
|
|
toolchain: 1.92.0
|
|
- name: Ensure cargo component
|
|
shell: bash
|
|
env:
|
|
ENSURE_CARGO_COMPONENT_STRICT: "true"
|
|
run: bash ./scripts/ci/ensure_cargo_component.sh 1.92.0
|
|
- name: Ensure C toolchain for Rust builds
|
|
run: ./scripts/ci/ensure_cc.sh
|
|
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v3
|
|
with:
|
|
prefix-key: zeroclaw-ci-v1
|
|
shared-key: ${{ runner.os }}-rust
|
|
cache-targets: true
|
|
cache-bin: false
|
|
- name: Runner preflight (compiler + disk)
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
echo "Runner: ${RUNNER_NAME:-unknown} (${RUNNER_OS:-unknown}/${RUNNER_ARCH:-unknown})"
|
|
if ! command -v cc >/dev/null 2>&1; then
|
|
echo "::error::Missing 'cc' compiler on runner. Install build-essential (Debian/Ubuntu) or equivalent."
|
|
exit 1
|
|
fi
|
|
cc --version | head -n1
|
|
free_kb="$(df -Pk . | awk 'NR==2 {print $4}')"
|
|
min_kb=$((10 * 1024 * 1024))
|
|
if [ "${free_kb}" -lt "${min_kb}" ]; then
|
|
echo "::error::Insufficient disk space on runner (<10 GiB free)."
|
|
df -h .
|
|
exit 1
|
|
fi
|
|
- name: Run integration / E2E tests
|
|
run: cargo test --test agent_e2e --locked --verbose
|