Nightly #351
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly | |
on: | |
workflow_dispatch: | |
schedule: | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
# 3am UTC, so 4am-5am CET and evening in east time, basically after everyone's day. | |
- cron: "15 3 * * *" | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: "write" | |
id-token: "write" | |
deployments: "write" | |
jobs: | |
checks: | |
name: Checks | |
uses: ./.github/workflows/reusable_checks.yml | |
with: | |
CONCURRENCY: nightly | |
CHANNEL: nightly | |
secrets: inherit | |
checks-cpp: | |
name: Checks | |
uses: ./.github/workflows/reusable_checks_cpp.yml | |
with: | |
CONCURRENCY: nightly | |
CHANNEL: nightly | |
secrets: inherit | |
checks-rust: | |
name: Checks | |
uses: ./.github/workflows/reusable_checks_rust.yml | |
with: | |
CONCURRENCY: nightly | |
CHANNEL: nightly | |
secrets: inherit | |
checks-python: | |
name: Checks | |
uses: ./.github/workflows/reusable_checks_python.yml | |
with: | |
CONCURRENCY: nightly | |
secrets: inherit | |
# Check that a CLEAN container with just `cargo` on it can build rerun: | |
clean-build: | |
name: cargo build on clean container | |
strategy: | |
matrix: | |
os: [ubuntu-latest-16-cores, macos-latest, windows-latest-8-cores] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.79.0 | |
- run: cargo build -p rerun | |
build-web: | |
name: "Build web viewer" | |
uses: ./.github/workflows/reusable_build_web.yml | |
with: | |
CONCURRENCY: nightly | |
CHANNEL: nightly | |
secrets: inherit | |
upload-web: | |
name: "Upload Web" | |
needs: [build-web] | |
uses: ./.github/workflows/reusable_upload_web.yml | |
with: | |
CONCURRENCY: nightly | |
NIGHTLY: true | |
secrets: inherit | |
# ----------------------------------------------------------------------------------- | |
# Build rerun_c library binaries: | |
build-rerun_c-and-upload-linux-arm64: | |
needs: [checks] | |
name: "Linux-Arm64: Build & Upload rerun_c" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml | |
with: | |
CONCURRENCY: nightly-linux-arm64 | |
PLATFORM: linux-arm64 | |
secrets: inherit | |
build-rerun_c-and-upload-linux-x64: | |
needs: [checks] | |
name: "Linux-x64: Build & Upload rerun_c" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml | |
with: | |
CONCURRENCY: nightly-linux-x64 | |
PLATFORM: linux-x64 | |
secrets: inherit | |
build-rerun_c-and-upload-macos-x64: | |
needs: [checks] | |
name: "Mac-Intel: Build & Upload rerun_c" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml | |
with: | |
CONCURRENCY: nightly-macos-x64 | |
PLATFORM: macos-x64 | |
secrets: inherit | |
build-rerun_c-and-upload-macos-arm64: | |
needs: [checks] | |
name: "Mac-Arm64: Build & Upload rerun_c" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml | |
with: | |
CONCURRENCY: nightly-macos-arm64 | |
PLATFORM: macos-arm64 | |
secrets: inherit | |
build-rerun_c-and-upload-windows-x64: | |
needs: [checks] | |
name: "Windows-x64: Build & Upload rerun_c" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml | |
with: | |
CONCURRENCY: nightly-windows-x64 | |
PLATFORM: windows-x64 | |
secrets: inherit | |
# ----------------------------------------------------------------------------------- | |
# Build rerun-cli (rerun binaries): | |
build-rerun-cli-and-upload-linux-arm64: | |
needs: [checks] | |
name: "Linux-arm64: Build & Upload rerun-cli" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml | |
with: | |
CONCURRENCY: nightly-linux-arm64 | |
PLATFORM: linux-arm64 | |
secrets: inherit | |
build-rerun-cli-and-upload-linux-x64: | |
needs: [checks] | |
name: "Linux-x64: Build & Upload rerun-cli" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml | |
with: | |
CONCURRENCY: nightly-linux-x64 | |
PLATFORM: linux-x64 | |
secrets: inherit | |
build-rerun-cli-and-upload-macos-x64: | |
needs: [checks] | |
name: "Mac-x64: Build & Upload rerun-cli" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml | |
with: | |
CONCURRENCY: nightly-macos-x64 | |
PLATFORM: macos-x64 | |
secrets: inherit | |
build-rerun-cli-and-upload-macos-arm64: | |
needs: [checks] | |
name: "Mac-arm64: Build & Upload rerun-cli" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml | |
with: | |
CONCURRENCY: nightly-macos-arm64 | |
PLATFORM: macos-arm64 | |
secrets: inherit | |
build-rerun-cli-and-upload-windows-x64: | |
needs: [checks] | |
name: "Windows-x64: Build & Upload rerun-cli" | |
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml | |
with: | |
CONCURRENCY: nightly-windows-x64 | |
PLATFORM: windows-x64 | |
secrets: inherit | |
# --------------------------------------------------------------------------- | |
# Build wheels: | |
build-wheel-linux-arm64: | |
needs: [checks, build-rerun-cli-and-upload-linux-arm64] | |
name: "Linux-arm64: Build & Upload Wheels" | |
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml | |
with: | |
CONCURRENCY: nightly-linux-arm64 | |
PLATFORM: linux-arm64 | |
WHEEL_ARTIFACT_NAME: linux-arm64-wheel | |
MODE: "pypi" | |
secrets: inherit | |
build-wheel-linux-x64: | |
needs: [checks, build-rerun-cli-and-upload-linux-x64] | |
name: "Linux-x64: Build & Upload Wheels" | |
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml | |
with: | |
CONCURRENCY: nightly-linux-x64 | |
PLATFORM: linux-x64 | |
WHEEL_ARTIFACT_NAME: linux-x64-wheel | |
MODE: "pypi" | |
secrets: inherit | |
build-wheel-macos-arm64: | |
needs: [checks, build-rerun-cli-and-upload-macos-arm64] | |
name: "Macos-arm64: Build & Upload Wheels" | |
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml | |
with: | |
CONCURRENCY: nightly-macos-arm64 | |
PLATFORM: macos-arm64 | |
WHEEL_ARTIFACT_NAME: macos-arm64-wheel | |
MODE: "pypi" | |
secrets: inherit | |
build-wheel-macos-x64: | |
needs: [checks, build-rerun-cli-and-upload-macos-x64] | |
name: "Macos-x64: Build & Upload Wheels" | |
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml | |
with: | |
CONCURRENCY: nightly-macos-x64 | |
PLATFORM: macos-x64 | |
WHEEL_ARTIFACT_NAME: "macos-x64-wheel" | |
MODE: "pypi" | |
secrets: inherit | |
build-wheel-windows-x64: | |
needs: [checks, build-rerun-cli-and-upload-windows-x64] | |
name: "Windows-x64: Build & Upload Wheels" | |
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml | |
with: | |
CONCURRENCY: nightly-windows-x64 | |
PLATFORM: windows-x64 | |
WHEEL_ARTIFACT_NAME: windows-x64-wheel | |
MODE: "pypi" | |
secrets: inherit | |
# --------------------------------------------------------------------------- | |
# Test wheels: | |
test-wheel-linux-arm64: | |
needs: [checks, build-wheel-linux-arm64] | |
name: "linux-arm64: Test Wheels" | |
uses: ./.github/workflows/reusable_test_wheels.yml | |
with: | |
CONCURRENCY: nightly-linux-arm64 | |
PLATFORM: linux-arm64 | |
WHEEL_ARTIFACT_NAME: linux-arm64-wheel | |
secrets: inherit | |
test-wheel-linux-x64: | |
needs: [checks, build-wheel-linux-x64] | |
name: "Linux-x64: Test Wheels" | |
uses: ./.github/workflows/reusable_test_wheels.yml | |
with: | |
CONCURRENCY: nightly-linux-x64 | |
PLATFORM: linux-x64 | |
WHEEL_ARTIFACT_NAME: linux-x64-wheel | |
secrets: inherit | |
test-wheel-macos-arm64: | |
needs: [checks, build-wheel-macos-arm64] | |
name: "macos-arm64: Test Wheels" | |
uses: ./.github/workflows/reusable_test_wheels.yml | |
with: | |
CONCURRENCY: nightly-macos-arm64 | |
PLATFORM: macos-arm64 | |
WHEEL_ARTIFACT_NAME: macos-arm64-wheel | |
secrets: inherit | |
test-wheel-macos-x64: | |
needs: [checks, build-wheel-macos-x64] | |
name: "macos-x64: Test Wheels" | |
uses: ./.github/workflows/reusable_test_wheels.yml | |
with: | |
CONCURRENCY: nightly-macos-x64 | |
PLATFORM: macos-x64 | |
WHEEL_ARTIFACT_NAME: macos-x64-wheel | |
secrets: inherit | |
test-wheel-windows-x64: | |
needs: [checks, build-wheel-windows-x64] | |
name: "Windows-x64: Test Wheels" | |
uses: ./.github/workflows/reusable_test_wheels.yml | |
with: | |
CONCURRENCY: nightly-windows-x64 | |
PLATFORM: windows-x64 | |
WHEEL_ARTIFACT_NAME: windows-x64-wheel | |
secrets: inherit | |
# --------------------------------------------------------------------------- | |
run-notebook: | |
name: "Run Notebook" | |
needs: [build-wheel-linux-x64] | |
uses: ./.github/workflows/reusable_run_notebook.yml | |
with: | |
CONCURRENCY: nightly | |
WHEEL_ARTIFACT_NAME: linux-x64-wheel | |
secrets: inherit | |
build-examples: | |
name: "Build Examples" | |
needs: [build-wheel-linux-x64] | |
uses: ./.github/workflows/reusable_build_examples.yml | |
with: | |
CONCURRENCY: nightly | |
CHANNEL: nightly | |
WHEEL_ARTIFACT_NAME: linux-x64-wheel | |
secrets: inherit | |
upload-examples: | |
name: "Upload Examples" | |
needs: [build-examples] | |
uses: ./.github/workflows/reusable_upload_examples.yml | |
with: | |
CONCURRENCY: nightly | |
NIGHTLY: true | |
secrets: inherit | |
benches: | |
name: Benchmarks | |
uses: ./.github/workflows/reusable_bench.yml | |
with: | |
CONCURRENCY: nightly | |
SAVE_BENCHES: true | |
BENCH_NAME: main # We currently only run benches nightly, but we used to run them on main | |
COMPARE_TO: main # We currently only run benches nightly, but we used to run them on main | |
secrets: inherit | |
# -------------------------------------------------------------------------- | |
# Release: | |
generate-pip-index: | |
name: "Generate Pip Index" | |
needs: | |
[ | |
build-wheel-linux-arm64, | |
build-wheel-linux-x64, | |
build-wheel-macos-arm64, | |
build-wheel-macos-x64, | |
build-wheel-windows-x64, | |
] | |
uses: ./.github/workflows/reusable_pip_index.yml | |
with: | |
CONCURRENCY: nightly | |
secrets: inherit | |
bundle-and-upload-rerun_cpp: | |
name: "Bundle and upload rerun_cpp_sdk.zip" | |
needs: | |
[ | |
build-rerun_c-and-upload-linux-arm64, | |
build-rerun_c-and-upload-linux-x64, | |
build-rerun_c-and-upload-macos-arm64, | |
build-rerun_c-and-upload-macos-x64, | |
build-rerun_c-and-upload-windows-x64, | |
] | |
uses: ./.github/workflows/reusable_bundle_and_upload_rerun_cpp.yml | |
with: | |
CONCURRENCY: nightly | |
secrets: inherit | |
pre-release: | |
name: Pre Release | |
concurrency: nightly | |
needs: | |
[ | |
build-rerun-cli-and-upload-linux-arm64, | |
build-rerun-cli-and-upload-linux-x64, | |
build-rerun-cli-and-upload-macos-arm64, | |
build-rerun-cli-and-upload-macos-x64, | |
build-rerun-cli-and-upload-windows-x64, | |
build-rerun_c-and-upload-linux-arm64, | |
build-rerun_c-and-upload-linux-x64, | |
build-rerun_c-and-upload-macos-arm64, | |
build-rerun_c-and-upload-macos-x64, | |
build-rerun_c-and-upload-windows-x64, | |
bundle-and-upload-rerun_cpp, | |
generate-pip-index, | |
upload-web, | |
] | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Add SHORT_SHA env property with commit short sha | |
run: echo "SHORT_SHA=`echo ${{github.sha}} | cut -c1-7`" >> $GITHUB_ENV | |
# First delete the old prerelease. If we don't do this, we don't get things like | |
# proper source-archives and changelog info. | |
# https://github.com/dev-drprasad/delete-tag-and-release | |
- uses: dev-drprasad/delete-tag-and-release@v0.2.1 | |
with: | |
tag_name: prerelease | |
delete_release: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Create the actual prerelease | |
# https://github.com/ncipollo/release-action | |
- name: GitHub Release | |
uses: ncipollo/release-action@v1.12.0 | |
with: | |
body: | | |
This is a prerelease. It is not intended for production use. | |
Please report any issues you find. | |
## Example Hosted App | |
https://rerun.io/viewer/commit/${{ env.SHORT_SHA }} | |
## Wheels can be installed with: | |
``` | |
pip install --pre --no-index -f https://build.rerun.io/commit/${{ env.SHORT_SHA }}/wheels --upgrade rerun-sdk | |
``` | |
or | |
``` | |
pip install --pre --no-index -f https://github.com/rerun-io/rerun/releases/download/prerelease --upgrade rerun-sdk | |
``` | |
## CMake fetch-content for C++ SDK | |
``` | |
include(FetchContent) | |
FetchContent_Declare(rerun_sdk URL https://build.rerun.io/commit/${{ env.SHORT_SHA }}/rerun_cpp_sdk.zip) | |
FetchContent_MakeAvailable(rerun_sdk) | |
``` | |
or | |
``` | |
include(FetchContent) | |
FetchContent_Declare(rerun_sdk URL https://github.com/rerun-io/rerun/releases/download/prerelease/rerun_cpp_sdk.zip) | |
FetchContent_MakeAvailable(rerun_sdk) | |
``` | |
prerelease: true | |
# Be explicit about the commit we're releasing/tagging. | |
# Otherwise it can happen that there's a discrepancy between the tag and the commit for which we uploaded & linked artifacts. | |
# It seems to otherwise use the latest commit for the tag. From the actions's docs: | |
# > If the tag of the release you are creating does not yet exist, you should set both the tag and commit action inputs. | |
# We just deleted the previous tag, so this is the case! | |
commit: ${{github.sha}} | |
name: "Development Build" | |
tag: "prerelease" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
generateReleaseNotes: false | |
allowUpdates: true | |
removeArtifacts: true | |
replacesArtifacts: true | |
sync-release-assets: | |
needs: [pre-release] | |
name: "Sync pre-release assets & build.rerun.io" | |
uses: ./.github/workflows/reusable_sync_release_assets.yml | |
with: | |
CONCURRENCY: nightly | |
RELEASE_VERSION: prerelease | |
secrets: inherit |