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
22 changes: 8 additions & 14 deletions .github/actions/setup-build-env/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Setup Build Environment"
description: "Python, Rust, uv, just, and optional legacy protoc for Persisting CI"
description: "Python, optional Rust, and pinned build tools for Persisting CI"
inputs:
python-version:
description: "Python version"
Expand All @@ -9,10 +9,14 @@ inputs:
description: "Rust toolchain"
required: false
default: "stable"
install-rust:
description: "Install Rust for jobs that compile or check Rust code"
required: false
default: "true"
components:
description: "Rust components (comma-separated)"
required: false
default: "rustfmt, clippy, rust-src"
default: "rustfmt, clippy"
install-dioxus:
description: "Install the pinned Dioxus CLI and wasm target"
required: false
Expand All @@ -21,10 +25,6 @@ inputs:
description: "Install cargo-nextest"
required: false
default: "true"
install-zig:
description: "Install Zig for the macOS-to-Linux guest init cross-build"
required: false
default: "false"

runs:
using: "composite"
Expand All @@ -35,6 +35,7 @@ runs:
python-version: ${{ inputs.python-version }}

- name: Install Rust toolchain
if: inputs.install-rust == 'true'
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ inputs.rust-toolchain }}
Expand All @@ -51,18 +52,11 @@ runs:
tool: just@1.57.0

- name: Install cargo-nextest
if: inputs.install-nextest == 'true'
if: inputs.install-rust == 'true' && inputs.install-nextest == 'true'
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest@0.9.137

- name: Install Linux guest init cross-compiler
if: runner.os == 'macOS' && inputs.install-zig == 'true'
shell: bash
run: |
brew install zig
zig version

- name: Add Dioxus Web target
if: inputs.install-dioxus == 'true'
shell: bash
Expand Down
66 changes: 27 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
install-nextest: "false"
install-zig: "false"
components: "rustfmt"

- name: Rust formatting
Expand All @@ -44,7 +43,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
install-nextest: "false"
install-zig: "false"
components: "clippy"

- uses: Swatinem/rust-cache@v2
Expand All @@ -64,7 +62,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
install-nextest: "false"
install-zig: "false"
components: "clippy"

- uses: Swatinem/rust-cache@v2
Expand All @@ -87,7 +84,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
install-nextest: "false"
install-zig: "false"
components: "clippy"

- uses: Swatinem/rust-cache@v2
Expand All @@ -107,8 +103,8 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-rust: "false"
install-nextest: "false"
install-zig: "false"
components: ""

- name: Ruff
Expand All @@ -130,14 +126,12 @@ jobs:
persisting-overlaynet
event_control: true
smoke_pchronicle: false
install_zig: false
- platform: Linux
os: ubuntu-latest
shard: gateway
packages: persisting-gateway
event_control: false
smoke_pchronicle: false
install_zig: false
- platform: Linux
os: ubuntu-latest
shard: pchronicle
Expand All @@ -146,7 +140,6 @@ jobs:
persisting-pchronicle-cli
event_control: false
smoke_pchronicle: true
install_zig: false
- platform: macOS
os: macos-latest
shard: capture
Expand All @@ -157,7 +150,6 @@ jobs:
persisting-overlaynet
event_control: false
smoke_pchronicle: false
install_zig: false
- platform: macOS
os: macos-latest
shard: pchronicle
Expand All @@ -166,14 +158,12 @@ jobs:
persisting-pchronicle-cli
event_control: false
smoke_pchronicle: true
install_zig: false
steps:
- uses: actions/checkout@v4

- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-zig: "${{ matrix.install_zig }}"
components: ""

- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -201,7 +191,6 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-zig: "false"
components: ""

- uses: Swatinem/rust-cache@v2
Expand All @@ -223,7 +212,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
install-dioxus: "true"
install-zig: "false"
components: ""

- uses: Swatinem/rust-cache@v2
Expand All @@ -238,32 +226,46 @@ jobs:
name: pChronicle S3 Contract / MinIO
runs-on: ubuntu-latest
timeout-minutes: 30
env:
MINIO_VERSION: RELEASE.2025-07-23T15-54-02Z
MC_VERSION: RELEASE.2025-08-13T08-35-41Z
MINIO_GO_VERSION: "1.24.2"
steps:
- uses: actions/checkout@v4

- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-zig: "false"
components: ""

- uses: Swatinem/rust-cache@v2
with:
shared-key: ci-pchronicle-s3

- name: Cache pinned MinIO tools
id: minio-tools
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/minio-bin
key: minio-v1-${{ runner.os }}-${{ runner.arch }}-go${{ env.MINIO_GO_VERSION }}-${{ env.MINIO_VERSION }}-${{ env.MC_VERSION }}

- uses: actions/setup-go@v5
if: steps.minio-tools.outputs.cache-hit != 'true'
with:
go-version: "1.24.2"
go-version: ${{ env.MINIO_GO_VERSION }}
cache: false

# Upstream no longer distributes the public container images or binaries.
- name: Build pinned MinIO tools from source
if: steps.minio-tools.outputs.cache-hit != 'true'
env:
GOBIN: ${{ runner.temp }}/minio-bin
run: |
go install github.com/minio/minio@RELEASE.2025-07-23T15-54-02Z
go install github.com/minio/mc@RELEASE.2025-08-13T08-35-41Z
echo "$GOBIN" >> "$GITHUB_PATH"
go install "github.com/minio/minio@$MINIO_VERSION"
go install "github.com/minio/mc@$MC_VERSION"

- name: Add MinIO tools to PATH
run: echo "$RUNNER_TEMP/minio-bin" >> "$GITHUB_PATH"

- name: Start pinned MinIO server
env:
Expand Down Expand Up @@ -301,7 +303,7 @@ jobs:

- name: Show MinIO logs after failure
if: failure()
run: cat "$RUNNER_TEMP/minio.log"
run: test ! -f "$RUNNER_TEMP/minio.log" || cat "$RUNNER_TEMP/minio.log"

- name: Stop MinIO
if: always()
Expand All @@ -319,8 +321,8 @@ jobs:
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-rust: "false"
install-nextest: "false"
install-zig: "false"
components: ""

- name: Sync Python deps
Expand All @@ -330,42 +332,28 @@ jobs:
run: just test-py

examples:
name: Examples / ${{ matrix.shard }}
name: Examples / pchronicle
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- shard: pchronicle
command: just examples-pchronicle
steps:
- uses: actions/checkout@v4

- name: Setup Python for examples
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-nextest: "false"
install-zig: "false"
components: ""

- uses: Swatinem/rust-cache@v2
with:
shared-key: ci-examples-${{ matrix.shard }}
shared-key: ci-examples-pchronicle

- name: Install jq
run: sudo apt-get update -qq && sudo apt-get install -y -qq jq

- name: Run ${{ matrix.shard }} examples
- name: Run pChronicle examples
env:
WORK_ROOT: ${{ runner.temp }}/${{ matrix.shard }}-examples
PYTHON_BIN: ${{ steps.setup-python.outputs.python-path }}
run: ${{ matrix.command }}
WORK_ROOT: ${{ runner.temp }}/pchronicle-examples
run: just examples-pchronicle

ci:
name: CI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
contents: read

concurrency:
group: pages
group: docs-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:

- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-nextest: "false"
components: ""

- name: Install hyperfine
uses: taiki-e/install-action@v2
Expand All @@ -73,6 +76,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
shared-key: pchronicle-benchmark
workspaces: . -> target/pchronicle-benchmark-ci

- name: Run and render benchmark
run: |
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/pchronicle-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
install-nextest: "false"
install-zig: "false"

- name: Install hyperfine
uses: taiki-e/install-action@v2
Expand All @@ -40,6 +39,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
shared-key: pchronicle-benchmark
workspaces: . -> target/pchronicle-benchmark-ci

- name: Resolve main baseline
id: baseline
Expand Down Expand Up @@ -71,11 +71,13 @@ jobs:
run: |
set -euo pipefail
baseline_repo="${{ steps.baseline.outputs.repo }}"
# Run revisions sequentially; reuse dependencies and copy each report
# before the next run replaces the Criterion output in the shared target.
mkdir -p "${RUNNER_TEMP}/pchronicle-benchmark/main"
python3 "$baseline_repo/benchmark/pchronicle/bench.py" run \
--repo "$baseline_repo" \
--suite smoke \
--target-dir "${GITHUB_WORKSPACE}/target/pchronicle-benchmark-ci-main" \
--target-dir "${GITHUB_WORKSPACE}/target/pchronicle-benchmark-ci" \
--output "${RUNNER_TEMP}/pchronicle-benchmark/main"

- name: Benchmark candidate
Expand All @@ -86,7 +88,7 @@ jobs:
python3 benchmark/pchronicle/bench.py run \
--repo . \
--suite smoke \
--target-dir "${GITHUB_WORKSPACE}/target/pchronicle-benchmark-ci-candidate" \
--target-dir "${GITHUB_WORKSPACE}/target/pchronicle-benchmark-ci" \
--output "${RUNNER_TEMP}/pchronicle-benchmark/candidate"

- name: Upload benchmark data
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ jobs:
with:
python-version: "3.12"
install-dioxus: "true"
install-nextest: "false"
components: ""

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
. -> target
pchronicle-web -> target

- name: Build pChronicle Web assets
run: just chronicle-web-build
Expand Down
Loading
Loading