105 lines
2.8 KiB
YAML
105 lines
2.8 KiB
YAML
name: Reusable Build Examples
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
CONCURRENCY:
|
|
required: true
|
|
type: string
|
|
WHEEL_ARTIFACT_NAME:
|
|
required: true
|
|
type: string
|
|
CHANNEL: # `nightly`/`main`/`pr`
|
|
required: true
|
|
type: string
|
|
|
|
concurrency:
|
|
group: ${{ inputs.CONCURRENCY }}-build-examples
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
RUSTFLAGS: --deny warnings
|
|
RUSTDOCFLAGS: --deny warnings
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash --noprofile --norc -euo pipefail {0}
|
|
|
|
permissions:
|
|
contents: "read"
|
|
id-token: "write"
|
|
|
|
jobs:
|
|
rs-build-examples:
|
|
name: Build Examples
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest-16-cores
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.ref) || '' }}
|
|
lfs: true
|
|
|
|
- name: Set up Rust
|
|
uses: ./.github/actions/setup-rust
|
|
with:
|
|
cache_key: "build-web"
|
|
save_cache: false
|
|
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
|
|
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
|
|
|
|
- uses: prefix-dev/setup-pixi@v0.10.0
|
|
with:
|
|
pixi-version: v0.71.3
|
|
|
|
- name: Download Rerun Wheel
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ${{ inputs.WHEEL_ARTIFACT_NAME }}
|
|
path: wheel
|
|
|
|
- name: Download Rerun Notebook Wheel
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: rerun_notebook_wheel
|
|
path: wheel
|
|
|
|
- name: Install built wheel
|
|
run: |
|
|
pixi run python scripts/ci/uv_install_wheel.py --package rerun-sdk --dir wheel
|
|
pixi run python scripts/ci/uv_install_wheel.py --package rerun-notebook --dir wheel --platform-independent
|
|
|
|
- name: Print wheel version
|
|
run: |
|
|
pixi run uv pip show rerun-sdk
|
|
pixi run uv pip show rerun-notebook
|
|
pixi run uvpy -m rerun --version
|
|
|
|
- name: Get sha
|
|
id: get-sha
|
|
run: |
|
|
full_commit="${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha }}"
|
|
echo "sha=$(echo $full_commit | cut -c1-7)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build examples
|
|
run: |
|
|
pixi run build-examples rrd --install \
|
|
--channel ${{ inputs.CHANNEL }} \
|
|
example_data
|
|
|
|
- name: Build notebooks
|
|
run: |
|
|
pixi run build-examples notebook \
|
|
--channel ${{ inputs.CHANNEL }}
|
|
|
|
- name: Build & run snippets
|
|
run: |
|
|
pixi run build-examples snippets \
|
|
example_data/snippets
|
|
|
|
- name: Upload assets
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: example_data
|
|
path: example_data
|