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

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0
79 lines · 4.5 KB Raw History
# knotless CI: release is the ONE workflow that compiles anything, and it carries the gate. Its steps: the checks (deploy/check.sh --fast: gofmt, apigen,
# codegen drift, go vet on the host and every cross-OS target, architecture rules, the policy engine specification tests, and a clean tree after; nothing
# is built), the release binaries (linux/amd64, linux/arm64) built ONCE, the amd64 one pushed to ttl.sh for the staging runs (this run's artifact oci/binary.ref),
# the static test host, the wasm test modules and the static meshd of this commit's tests/ and rust/ trees (published to the bucket on main, kept as this
# run's artifact dist/ elsewhere; skipped when already published for the tree), 0009's page from the commits pinned in tests/compositions/staging/page-tools.json
# (scripts/ci-page.sh: page/<sha256 of the pin>/ in the bucket, dist/ elsewhere, skipped when published), the node downloads by sha256 and the pinned guest image, staged in the
# bucket: downloads/<sha256>/, guest-images/<target>/<pin>/ (content-addressed) and, on main, staging/<sha>/ (the binaries and their manifest).
# test, then promote run after this workflow and take its binary (main: main/<sha>/; a branch's test: by digest from ttl.sh) and its test host. Its last steps, on main,
# publish: copy staging/<sha>/ inside the bucket to main/<sha>/ and main/latest/ and check what was published from the public URLs. No tag is built (plan 0040
# step 15): releases/<version>/ is promote's copy of main/<sha>/ when it moves channel stable (scripts/promote.sh). No other workflow builds a release binary, a
# test host or a module, and nothing rebuilds anything to compare (owner rules: one build; no reproducible-build verification in CI). The bucket key is a sealed
# secret given only to pushes to main (`knotless secret set ... --ref`): elsewhere (a branch, a pull) the staging steps are skipped. The caches of the build
# (scripts/asset-cache-upload.sh, scripts/ci-build-cache.sh: restored before every build, uploaded after one on main) cut what a clean VM rebuilds. 12 vCPU /
# 16 GB (binding kcp-build). CI runs on main only (owner rule: no branch CI, no merge-queue CI): every main commit is built and published; a branch runs it
# only when asked (`knotless run rerun <url> --ref refs/heads/<branch> --workflow release`). A newer push to main does not cancel a release that holds its
# turn (`superseded: finish`: the newest waits for it; the runner applies it to main and v* tags only).
# paths: test.yml's and promote.yml's list (deploy/check.sh): a push that changes none of them (docs, plans) builds nothing,
# tests nothing and releases nothing
on:
  push:
    refs: [refs/heads/main]
    paths: [internal/**, cmd/**, api/**, tests/**, rust/**, deploy/**, scripts/**, lexicons/**, hack/**, did-key-associator/**, typescript-helpers/**, go.mod, go.sum, Makefile, .knotless/**]
  asked:
    refs: [refs/heads/*]
runners: [aliceoa.bsky.social]
executor: kcp-build
superseded: finish
artifacts: [oci, dist]
secrets: [SPACES_ACCESS_KEY_ID, SPACES_SECRET_ACCESS_KEY]
env:
  SPACES_BUCKET: socialweb-computer-kcp
  SPACES_REGION: sfo3
  TARGET: firecracker-x86_64
  OUT: /root/ci-out
steps:
  # every step is scripts/ci-release.sh <step> (plan 0042); the same script runs by hand (plan 0044)
  - name: toolchain
    timeout: 10
    run: bash scripts/ci-release.sh toolchain
  - name: checks
    timeout: 30
    run: bash scripts/ci-release.sh checks
  - name: binaries
    timeout: 45
    run: bash scripts/ci-release.sh binaries
  - name: staging binary
    timeout: 20
    run: bash scripts/ci-release.sh staging-binary
  - name: test host
    timeout: 30
    run: bash scripts/ci-release.sh test-host
  - name: page
    timeout: 20
    run: bash scripts/ci-release.sh page
  - name: guest image
    timeout: 90
    run: bash scripts/ci-release.sh guest-image
  - name: asset cache
    on: {refs: [refs/heads/main]}
    timeout: 15
    run: bash scripts/ci-release.sh asset-cache
  - name: build cache
    on: {refs: [refs/heads/main]}
    timeout: 15
    run: bash scripts/ci-release.sh build-cache
  - name: stage
    on: {refs: [refs/heads/main]}
    timeout: 15
    run: bash scripts/ci-release.sh stage
  - name: publish
    on: {refs: [refs/heads/main]}
    # a newer push cancels a publish before it starts, never once it has (main/latest half written)
    finish: true
    timeout: 15
    run: bash scripts/ci-release.sh publish
  - name: the published binaries and guest image
    on: {refs: [refs/heads/main]}
    timeout: 15
    run: bash scripts/ci-release.sh verify