Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 52 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,15 @@ jobs:
run: |
base="${BASE_REF:+origin/$BASE_REF}"
base="${base:-HEAD^}"
# The packages were renamed to what crates.io publishes them as,
# and a baseline from before that has no zudb to compare with.
if ! git show "$base:crates/zu/Cargo.toml" | grep -qx 'name = "zudb"'; then
echo "the baseline has no package named zudb, so there is nothing to compare against"
exit 0
fi
perl -0pi -e 's/ pub fn epoch\(&self\) -> u64 \{/ pub fn epoch_renamed(&self) -> u64 {/' crates/zu/src/session.rs
set +e
cargo semver-checks check-release -p zu --baseline-rev "$base" --release-type patch
cargo semver-checks check-release -p zudb --baseline-rev "$base" --release-type patch
rc=$?
set -e
git checkout -- crates/zu/src/session.rs
Expand All @@ -214,14 +220,20 @@ jobs:
run: |
base="${BASE_REF:+origin/$BASE_REF}"
base="${base:-HEAD^}"
# The packages were renamed to what crates.io publishes them as,
# and a baseline from before that has no zudb to compare with.
if ! git show "$base:crates/zu/Cargo.toml" | grep -qx 'name = "zudb"'; then
echo "the baseline has no package named zudb, so there is nothing to compare against"
exit 0
fi
was=$(git show "$base:Cargo.toml" | sed -n 's/^version = "\(.*\)"/\1/p' | head -1)
now=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)
if [ "$was" != "$now" ]; then
echo "version moved from $was to $now, so a break here is one that was declared"
cargo semver-checks check-release -p zu -p zu-corpus --baseline-rev "$base" --release-type patch || true
cargo semver-checks check-release -p zudb -p zudb-corpus --baseline-rev "$base" --release-type patch || true
exit 0
fi
cargo semver-checks check-release -p zu -p zu-corpus --baseline-rev "$base" --release-type patch
cargo semver-checks check-release -p zudb -p zudb-corpus --baseline-rev "$base" --release-type patch
# The tool builds the baseline in a checkout of its own under
# target, and takes it away again while it works. The cache action
# walks target when the job ends, and a directory that went while
Expand All @@ -232,6 +244,20 @@ jobs:
if: always()
run: rm -rf target/semver-checks

# Every crate the release uploads, packaged and built from its own
# tarball the way crates.io will build it. A path reaching outside a
# crate, a file the package leaves behind, or a dependency without a
# version all build fine in the workspace and fail only here, and
# finding that out on the day of a release is finding it out after
# the first crates are already up.
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/rust
- uses: Swatinem/rust-cache@v2
- run: cargo publish --workspace --locked --dry-run

deny:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -290,15 +316,15 @@ jobs:
# the differential suite compares the two executors with the whole
# engine on that side of the choice.
- if: matrix.os == 'ubuntu-latest'
run: ZU_POINT_READS=1 cargo test -p zu --test differential
run: ZU_POINT_READS=1 cargo test -p zudb --test differential

membudget:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/rust
- uses: Swatinem/rust-cache@v2
- run: cargo build --release -p zu-cli
- run: cargo build --release -p zudb-cli
# The G6 budget is 32 MiB total for an embedded reader. The build
# and the write path run unconstrained; every read path then runs
# under a 32 MiB address-space cap, so a decoder or open path that
Expand Down Expand Up @@ -336,12 +362,12 @@ jobs:
# this runs the roundtrip distribution sweep, which crosses every
# encoder and decoder path at miri-sized inputs, rather than the
# whole unit suite with its hundred-thousand-value columns.
- run: cargo +nightly miri test -p zu-encoding --test roundtrip
- run: cargo +nightly miri test -p zudb-encoding --test roundtrip
# The vector layer carries the unsafe: arena allocation, the
# MaybeUninit compare staging, and StrView. The lib tests plus one
# differential compare run cross all of it at miri-sized inputs.
- run: cargo +nightly miri test -p zu-vector --lib
- run: cargo +nightly miri test -p zu-vector --test reference compare_i64_const
- run: cargo +nightly miri test -p zudb-vector --lib
- run: cargo +nightly miri test -p zudb-vector --test reference compare_i64_const

check-asm:
runs-on: ubuntu-latest
Expand All @@ -351,7 +377,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
# The perf/11 tier 1 gate: every hot kernel that relies on
# auto-vectorization must actually vectorize on this toolchain.
- run: cargo bench -p zu-vector --no-run
- run: cargo bench -p zudb-vector --no-run
- run: bench/check_asm.sh

cardinality:
Expand All @@ -364,7 +390,7 @@ jobs:
# the LDBC bench it needs no dataset and runs here. Holds the
# q-error percentiles to bench/budgets.toml and fails on the
# first ceiling the data walks through.
- run: ZU_GATE=1 cargo bench -p zu --bench cardinality
- run: ZU_GATE=1 cargo bench -p zudb --bench cardinality

refusal:
runs-on: ubuntu-latest
Expand All @@ -377,7 +403,7 @@ jobs:
# gate above, so it needs no dataset. The number it enforces is a
# ratio between two paths timed in the same run on the same
# machine, which is why it can gate on a shared runner at all.
- run: ZU_GATE=1 cargo bench -p zu --bench refuse
- run: ZU_GATE=1 cargo bench -p zudb --bench refuse

tail:
runs-on: ubuntu-latest
Expand All @@ -391,7 +417,7 @@ jobs:
# eight million edges each, in a few seconds. Like the two gates
# above it enforces a ratio between numbers timed in one run on
# one machine, so a shared runner cannot move it.
- run: ZU_GATE=1 cargo bench -p zu --bench tail
- run: ZU_GATE=1 cargo bench -p zudb --bench tail

paths:
runs-on: ubuntu-latest
Expand All @@ -405,7 +431,7 @@ jobs:
# them, so it builds in no time and still fails loudly if the
# count goes back to being a walk. A ratio between two numbers
# timed together, so a shared runner cannot move it.
- run: ZU_GATE=1 cargo bench -p zu --bench paths
- run: ZU_GATE=1 cargo bench -p zudb --bench paths

fold:
runs-on: ubuntu-latest
Expand All @@ -420,7 +446,7 @@ jobs:
# the list asks for a kilobyte a row, and neither number moves
# with the machine or the load. The clock is a loose second gate,
# since the walk in front of the fold is most of what it times.
- run: ZU_GATE=1 cargo bench -p zu --bench fold
- run: ZU_GATE=1 cargo bench -p zudb --bench fold

relprops:
runs-on: ubuntu-latest
Expand All @@ -434,7 +460,7 @@ jobs:
# second. Like the gates above it enforces a ratio between numbers
# timed in one run on one machine, so a shared runner cannot move
# it.
- run: ZU_GATE=1 cargo bench -p zu --bench relprops
- run: ZU_GATE=1 cargo bench -p zudb --bench relprops

write:
runs-on: ubuntu-latest
Expand All @@ -454,7 +480,7 @@ jobs:
# number is read against this host's own speed on a proxy loop, so
# there is nothing to tell the bench about the box it is on. It
# prints the calibration and the ceiling it enforced.
- run: ZU_GATE=1 cargo bench -p zu --bench write
- run: ZU_GATE=1 cargo bench -p zudb --bench write

commit:
runs-on: ubuntu-latest
Expand All @@ -469,7 +495,7 @@ jobs:
# catch is commits going back to a sync each, which reads as a
# throughput that stops rising with the width and a latency that
# starts rising with it.
- run: ZU_GATE=1 cargo bench -p zu --bench commit
- run: ZU_GATE=1 cargo bench -p zudb --bench commit

connect:
runs-on: ubuntu-latest
Expand All @@ -483,7 +509,7 @@ jobs:
# a ratio between two paths timed in one run on one machine, so a
# shared runner cannot move it, and it is what stops the SDK from
# growing a copy or a re-read on the hot path unnoticed.
- run: ZU_GATE=1 cargo bench -p zu --bench connect
- run: ZU_GATE=1 cargo bench -p zudb --bench connect

append:
runs-on: ubuntu-latest
Expand All @@ -497,7 +523,7 @@ jobs:
# run on one machine, and it is the appender's reason to exist
# stated as a number, so a flush that stopped being a batch fails
# here rather than being noticed by a user loading a million rows.
- run: ZU_GATE=1 cargo bench -p zu --bench append
- run: ZU_GATE=1 cargo bench -p zudb --bench append

capi-result:
runs-on: ubuntu-latest
Expand All @@ -524,7 +550,7 @@ jobs:
# process, so it is a ratio and a shared runner does not move it,
# and it fails on exactly one defect: a copy coming back to the
# path whose whole point is that there is not one.
- run: ZU_GATE=1 cargo bench -p zu-arrow --bench export
- run: ZU_GATE=1 cargo bench -p zudb-arrow --bench export

cli:
runs-on: ubuntu-latest
Expand All @@ -538,7 +564,7 @@ jobs:
# deliberately loose, since startup regresses in kind and not by
# percent; the assertion that no help form costs twice the floor
# runs on every machine and is the sensitive half.
- run: ZU_GATE=1 cargo bench -p zu-cli --bench cli
- run: ZU_GATE=1 cargo bench -p zudb-cli --bench cli

corpus:
runs-on: ubuntu-latest
Expand All @@ -558,12 +584,12 @@ jobs:
# because the cases are the contract and the engine catches up to
# them. It is not allowed on a branch heading for a release, so
# the gate lives here rather than in the runner's defaults.
- run: cargo run -p zu-cli --release -- corpus conformance/cases --strict
- run: cargo run -p zudb-cli --release -- corpus conformance/cases --strict
# The reader is read by nine repositories on every CI run of each
# of them, so its cost per case is asserted to stay linear as the
# corpus grows. The bench fails rather than reporting when it
# does not.
- run: cargo bench -p zu-corpus --bench corpus
- run: cargo bench -p zudb-corpus --bench corpus
# The artifact eight other repositories consume, built here on
# every pull request rather than for the first time on the day of
# a release. `--check` writes nothing: what is being gated is that
Expand Down Expand Up @@ -623,7 +649,7 @@ jobs:
status=0
"$RUNNER_TEMP/runner" --dir "$RUNNER_TEMP/corpus" --strict \
conformance/cases/*.yaml > "$RUNNER_TEMP/c.txt" || status=$?
cargo run -q -p zu-cli --release -- corpus conformance/cases \
cargo run -q -p zudb-cli --release -- corpus conformance/cases \
> "$RUNNER_TEMP/rust.txt" || true
diff -u "$RUNNER_TEMP/rust.txt" "$RUNNER_TEMP/c.txt"
cat "$RUNNER_TEMP/c.txt"
Expand All @@ -633,7 +659,7 @@ jobs:
# diff and not the status.
"$RUNNER_TEMP/runner" --dir "$RUNNER_TEMP/corpus" \
conformance/c/wrong/wrong.yaml > "$RUNNER_TEMP/c-wrong.txt" || true
cargo run -q -p zu-cli --release -- corpus conformance/c/wrong \
cargo run -q -p zudb-cli --release -- corpus conformance/c/wrong \
> "$RUNNER_TEMP/rust-wrong.txt" || true
diff -u "$RUNNER_TEMP/rust-wrong.txt" "$RUNNER_TEMP/c-wrong.txt"
exit $status
Expand All @@ -647,7 +673,7 @@ jobs:
- name: The C smoke test under the sanitizers
run: |
printf '1 2\n1 3\n2 3\n3 1\n' > "$RUNNER_TEMP/edges.txt"
cargo run -q -p zu-cli --release -- \
cargo run -q -p zudb-cli --release -- \
copy "$RUNNER_TEMP/edges.txt" "$RUNNER_TEMP/smoke.zu1"
cc -std=c99 -O1 -g -Wall -Wextra -Werror -pedantic \
-fsanitize=address,undefined -fno-sanitize-recover=all \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
with:
repository: tamnd/gql-compat
path: gql-compat
- run: cargo build --release -p zu-cli
- run: cargo build --release -p zudb-cli
- name: Build the harness
run: go build -o "$RUNNER_TEMP/gql-compat" ./cmd/gql-compat
working-directory: gql-compat
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
with:
repository: tamnd/gql-compat
path: gql-compat
- run: cargo build --release -p zu-cli
- run: cargo build --release -p zudb-cli
- name: Build the harness
run: go build -o "$RUNNER_TEMP/gql-compat" ./cmd/gql-compat
working-directory: gql-compat
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
with:
repository: tamnd/gql-compat
path: gql-compat
- run: cargo build --release -p zu-cli
- run: cargo build --release -p zudb-cli
- name: Build the harness
run: go build -o "$RUNNER_TEMP/gql-compat" ./cmd/gql-compat
working-directory: gql-compat
Expand Down
Loading
Loading