~ knotless Search/
↑↓ move↵ open⇧↵ all results

zat.dev/stream

jetstream v2 in zig · mirror of https://tangled.org/zat.dev/stream

0
0
79 lines · 2.4 KB Raw History
# A push runs this only when it touches something the binary, the image or the
# gate is built from. Site, docs and receipt commits do not: on 2026-11-13 nine
# site-only pushes each compiled RocksDB three times here and started a
# bare-metal gate, which saturated the CI host. The site ships with `just
# site` and is checked by site.yml.
when:
  - event: ["push", "pull_request"]
    branch: ["main", "zig-0.17"]
    paths:
      - "build.zig"
      - "build.zig.zon"
      - "Dockerfile"
      - ".dockerignore"
      - "justfile"
      - "src/**"
      - "tools/**"
      - "scripts/**"
      - "examples/**"
      - "tests/**/*.py"
      - "tests/fixtures/**"
      - "tests/upstream_oracle/**"
      - "tests/*.csv"
      - "tests/*.Dockerfile"
      - "deploy/ops/**"
      - "deploy/security/**"
      - "deploy/grafana/**"
      - "deploy/prometheus/**"
      - "strata/service/**"
      - ".tangled/workflows/ci.yml"
  - event: ["manual"]

engine: nixery

dependencies:
  nixpkgs:
    - curl
    - gnutar
    - xz
    - coreutils

steps:
  - name: install zig 0.17
    command: |
      set -eu
      curl -fSL https://ziglang.org/download/0.17.1/zig-x86_64-linux-0.17.1.tar.xz -o /tangled/workspace/zig.tar.xz
      echo "3581863e3cbcfd0fce0efc682ce7e9e93da96668a977791d356a26d2a7e9b17a  /tangled/workspace/zig.tar.xz" | sha256sum --check
      tar -xJf /tangled/workspace/zig.tar.xz -C /tangled/workspace
      mv /tangled/workspace/zig-x86_64-linux-0.17.1 /tangled/workspace/.zig

  - name: check formatting
    command: |
      /tangled/workspace/.zig/zig fmt --check build.zig build.zig.zon src tools/loadgen/build.zig tools/loadgen/build.zig.zon tools/loadgen/src

  - name: fetch packages
    command: |
      set -eu
      for attempt in 1 2 3 4 5 6 7 8; do
        if /tangled/workspace/.zig/zig build --fetch; then exit 0; fi
        if [ "$attempt" -lt 8 ]; then sleep 15; fi
      done
      exit 1

  - name: unit tests (debug)
    command: |
      /tangled/workspace/.zig/zig build test --summary all

  - name: unit tests (releasesafe)
    command: |
      /tangled/workspace/.zig/zig build test -Doptimize=ReleaseSafe --summary all

  - name: production build
    command: |
      /tangled/workspace/.zig/zig build -Doptimize=ReleaseSafe -Dcpu=baseline -Dtarget=x86_64-linux-gnu

  - name: load generator
    command: |
      cd tools/loadgen
      /tangled/workspace/.zig/zig build -Doptimize=ReleaseSafe -Dcpu=baseline -Dtarget=x86_64-linux-gnu