Skip to content

fix(packaging): link manylinux2014 wheels with cargo zigbuild (#105) #121

fix(packaging): link manylinux2014 wheels with cargo zigbuild (#105)

fix(packaging): link manylinux2014 wheels with cargo zigbuild (#105) #121

Workflow file for this run

# Nightly wheels from main — rolling GitHub Release tag `nightly`.
#
# Install (after a successful run):
# curl -fsSL https://raw.githubusercontent.com/DeepLink-org/Persisting/main/scripts/install-nightly.sh | bash
# Or browse assets: https://github.com/DeepLink-org/Persisting/releases/tag/nightly
name: Nightly Build
on:
schedule:
# 03:00 UTC daily
- cron: "0 3 * * *"
workflow_dispatch:
push:
branches: [main, master]
permissions:
contents: read
concurrency:
group: nightly-${{ github.ref }}
cancel-in-progress: true
jobs:
meta:
if: github.repository == 'DeepLink-org/Persisting'
runs-on: ubuntu-latest
outputs:
local_version: ${{ steps.ver.outputs.local_version }}
steps:
- id: ver
shell: bash
run: |
short_sha="${GITHUB_SHA:0:7}"
echo "local_version=g${GITHUB_RUN_NUMBER}.${short_sha}" >> "$GITHUB_OUTPUT"
linux:
if: github.repository == 'DeepLink-org/Persisting'
needs: meta
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64]
steps:
- uses: actions/checkout@v4
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
python-version: "3.12"
install-protoc: "false"
install-dioxus: "true"
- uses: Swatinem/rust-cache@v2
- name: Build pChronicle Web assets
run: python3 scripts/packaging/stage_wheel_binaries.py --web-only
- name: Apply nightly local version (PEP 440)
run: |
python scripts/ci/set_nightly_local_version.py "${{ needs.meta.outputs.local_version }}"
cargo metadata --format-version 1 >/dev/null
- name: Build wheels
uses: pypa/cibuildwheel@v4.1.0
with:
output-dir: dist
- name: Verify wheel component set
run: |
wheel="$(find dist -maxdepth 1 -name '*.whl' -print -quit)"
test -n "$wheel"
python scripts/packaging/verify_wheel.py "$wheel" --install-smoke
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: nightly-wheels-linux-${{ matrix.target }}
path: dist/*.whl
retention-days: 14
macos:
if: github.repository == 'DeepLink-org/Persisting'
needs: meta
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
python-version: "3.12"
install-protoc: "false"
install-dioxus: "true"
- uses: Swatinem/rust-cache@v2
- name: Build pChronicle Web assets
run: python3 scripts/packaging/stage_wheel_binaries.py --web-only
- name: Apply nightly local version (PEP 440)
run: |
python scripts/ci/set_nightly_local_version.py "${{ needs.meta.outputs.local_version }}"
cargo metadata --format-version 1 >/dev/null
- name: Build wheels
uses: pypa/cibuildwheel@v4.1.0
with:
output-dir: dist
- name: Verify wheel component set
run: |
wheel="$(find dist -maxdepth 1 -name '*.whl' -print -quit)"
test -n "$wheel"
python scripts/packaging/verify_wheel.py "$wheel" --install-smoke
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: nightly-wheels-macos-aarch64
path: dist/*.whl
retention-days: 14
benchmark:
name: pChronicle nightly benchmark
if: github.repository == 'DeepLink-org/Persisting'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup Build Environment
uses: ./.github/actions/setup-build-env
with:
install-protoc: "false"
- name: Install hyperfine
uses: taiki-e/install-action@v2
with:
tool: hyperfine@1.20.0
- uses: Swatinem/rust-cache@v2
with:
shared-key: pchronicle-benchmark
- name: Run and render benchmark
run: |
python3 benchmark/pchronicle/bench.py run \
--suite nightly \
--target-dir "${GITHUB_WORKSPACE}/target/pchronicle-benchmark-ci" \
--output "${RUNNER_TEMP}/pchronicle-benchmark"
cat "${RUNNER_TEMP}/pchronicle-benchmark/report.md" >> "$GITHUB_STEP_SUMMARY"
- name: Upload benchmark report
if: always()
uses: actions/upload-artifact@v4
with:
name: nightly-pchronicle-benchmark
path: ${{ runner.temp }}/pchronicle-benchmark
retention-days: 30
if-no-files-found: error
publish:
name: Publish nightly release
if: github.repository == 'DeepLink-org/Persisting'
needs: [meta, linux, macos]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download wheels
uses: actions/download-artifact@v4
with:
pattern: nightly-wheels-*
merge-multiple: true
path: dist
- name: Publish rolling nightly release
uses: ncipollo/release-action@v1
with:
tag: nightly
name: Nightly (main)
commit: ${{ github.sha }}
allowUpdates: true
makeLatest: false
prerelease: true
removeArtifacts: true
artifactErrorsFailBuild: true
artifacts: dist/*.whl
body: |
Rolling nightly build from [`${{ github.sha }}`](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}) on **${{ github.ref_name }}**.
**Python wheel** (auto-detect platform / Python):
```bash
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/install-nightly.sh | bash
```
The wheel includes the matched `pchronicle`, `pvisor`, and `ppilot` CLI component set. Built with local version `+${{ needs.meta.outputs.local_version }}` (base version from `pyproject.toml`).
publish-benchmark-readme:
name: Publish benchmark summary to README
if: github.repository == 'DeepLink-org/Persisting' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
needs: [benchmark, publish]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Download benchmark report
uses: actions/download-artifact@v4
with:
name: nightly-pchronicle-benchmark
path: ${{ runner.temp }}/pchronicle-benchmark
- name: Update generated benchmark block
env:
REPORT_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
python3 benchmark/pchronicle/bench.py jsonpath-set \
--document benchmark/pchronicle/nightly.json \
--path '$["latest"]' \
--value-file "${RUNNER_TEMP}/pchronicle-benchmark/raw-report.json" \
--replace
python3 benchmark/pchronicle/bench.py update-readme \
--report benchmark/pchronicle/nightly.json \
--report-jsonpath '$["latest"]' \
--readme README.md \
--report-url "$REPORT_URL"
- name: Commit nightly benchmark summary
run: |
if git diff --quiet -- README.md benchmark/pchronicle/nightly.json; then
exit 0
fi
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add README.md benchmark/pchronicle/nightly.json
git commit -m "docs: update pChronicle nightly benchmark [skip ci]"
git push origin "HEAD:${{ github.ref_name }}"