Skip to content

deps: source zquic from zigstack (release v0.1.2) #133

deps: source zquic from zigstack (release v0.1.2)

deps: source zquic from zigstack (release v0.1.2) #133

Workflow file for this run

# Parity with https://github.com/ethp2p/ethp2p/blob/main/.github/workflows/ci.yml (job names and intent).
# - markdown-lint: rumdl on ethp2p `specs/` at ETHP2P_SPECS_REF (second checkout; no specs/ in this repo).
# - lint: go vet/staticcheck → zig fmt, default build, zig ast-check (syntax only; not staticcheck).
# - unit-tests: go test -race ./broadcast/... → zig build test-broadcast (Debug + TSan ≈ -race).
# - simnet-rs: filtered sim RS + reconnection → zig build test-sim-rs (no Zig reconnection test yet).
# - simnet-gossipsub: filtered Gossipsub → zig build test-sim-gossipsub.
# - large-network-rs: main only, large RS/scalability → zig build test-stress-ci (full root + ZIG_ETHP2P_STRESS + TSan).
#
# Zig toolchain: keep ZIG_VERSION in sync with `minimum_zig_version` in build.zig.zon.
name: CI
on:
push:
branches: [main, feature]
pull_request:
branches: [main, feature]
env:
ZIG_VERSION: 0.16.0
# Normative prose under ethp2p `specs/`; keep in sync with `UPSTREAM.md` "Pinned revision".
ETHP2P_SPECS_REF: 741d8d9cf682ff93b7d8eb56e0377ba8eea83a7e
jobs:
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ethp2p/ethp2p
ref: ${{ env.ETHP2P_SPECS_REF }}
path: ethp2p
- name: Lint ethp2p specs (rumdl)
uses: rvben/rumdl@v0
with:
path: ethp2p/specs/
report-type: annotations
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: minimum_zig_version matches CI ZIG_VERSION
run: |
set -euo pipefail
want="${ZIG_VERSION}"
got="$(sed -n 's/^[[:space:]]*\.minimum_zig_version = "\([^"]*\)".*/\1/p' build.zig.zon | head -1)"
if test -z "$got"; then
echo "error: could not parse minimum_zig_version from build.zig.zon" >&2
exit 1
fi
if test "$got" != "$want"; then
echo "error: build.zig.zon minimum_zig_version=${got} but CI ZIG_VERSION=${want}" >&2
exit 1
fi
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: zig fmt --check
run: zig fmt --check .
- name: zig build (default target)
run: zig build
- name: zig ast-check (syntax only)
run: |
set -euo pipefail
zig ast-check build.zig
zig ast-check --zon build.zig.zon
find src -name '*.zig' -print0 | while IFS= read -r -d '' f; do zig ast-check "$f"; done
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Run unit tests (broadcast stack parity)
run: zig build test-broadcast --summary all
simnet-rs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Run RS simnet tests
run: zig build test-sim-rs --summary all
simnet-gossipsub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Run Gossipsub simnet tests
run: zig build test-sim-gossipsub --summary all
quic-transport:
runs-on: ubuntu-latest
# Default job cap is 6h; without this, a hung `quic.poll` / test subprocess can burn the full budget.
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
# `timeout` (coreutils) fails the step with 124 if the build or test binary never finishes.
- name: QUIC transport tests (zquic)
run: timeout 40m zig build test-quic --summary all
large-network-rs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Run large network RS tests (stress + TSan)
run: zig build test-stress-ci --summary all