jetstream client
atproto jetstream client
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475#!/usr/bin/env bashset -euo pipefailcd "$(dirname "$0")/.."profile=${1:-ci}if [[ $# -gt 1 || ( "$profile" != ci && "$profile" != release ) ]]; then echo 'usage: checks/run [ci|release]' >&2 exit 2fizig=${ZIG:-zig}results="checks/results/$profile"mkdir -p "$results" zig-out/binjq -n \ --arg commit "$(git rev-parse HEAD)" \ --arg status "$(git status --porcelain)" \ --arg profile "$profile" \ --arg zig "$("$zig" version)" \ --arg go "$(go version)" \ --arg platform "$(uname -sm)" \ --arg date "$(date -u +%FT%TZ)" \ --arg upstream "$(cd checks && go list -m github.com/bluesky-social/jetstream)" \ --argjson cpus "$(nproc)" \ '{commit: $commit, dirty: ($status != ""), profile: $profile, zig: $zig, go: $go, platform: $platform, logical_cpus: $cpus, upstream: $upstream, started_at: $date, optimize: "ReleaseSafe"}' \ | tee "$results/metadata.json"failed=0run() { local name=$1 shift echo "CHECK $name" if "$@" > "$results/$name.log" 2>&1; then cat "$results/$name.log" echo "PASS $name" else cat "$results/$name.log" echo "FAIL $name" >&2 failed=1 fi}measure() { local name=$1 shift echo "CHECK $name" if zig-out/bin/conformance "$@" > "$results/$name.json" 2> "$results/$name.log"; then cat "$results/$name.log" "$results/$name.json" echo "PASS $name" else cat "$results/$name.log" "$results/$name.json" echo "FAIL $name" >&2 failed=1 fi}run format "$zig" fmt --check build.zig build.zig.zon src examples checks/client.zigrun whitespace git diff --checkrun go-checks bash -c 'cd checks && test -z "$(gofmt -l .)" && go vet ./...'run debug "$zig" build test --summary allrun release-safe "$zig" build test -Doptimize=ReleaseSafe --summary allrun examples "$zig" build -Doptimize=ReleaseSafe"$zig" build check-client -Doptimize=ReleaseSafe(cd checks && go build -mod=readonly -o ../zig-out/bin/conformance .)measure conformanceif [[ "$profile" == ci ]]; then measure live load ci measure catchup catchup cielse measure live load measure catchup catchupfimeasure regressions regressionsexit "$failed"