Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove builds and usage of demo.rerun.io #4418

Merged
merged 15 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 14 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
18 changes: 9 additions & 9 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}
secrets: inherit

build-web-demo:
name: "Build Web Demo"
build-examples:
name: "Build Examples"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [min-wheel-build, build-web]
uses: ./.github/workflows/reusable_build_web_demo.yml
needs: [min-wheel-build]
uses: ./.github/workflows/reusable_build_examples.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
WHEEL_ARTIFACT_NAME: linux-wheel-fast
Expand All @@ -136,18 +136,18 @@ jobs:
track-sizes:
name: "Track Sizes"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [build-web-demo]
needs: [build-examples]
uses: ./.github/workflows/reusable_track_size.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
secrets: inherit

upload-web-demo:
name: "Upload Web Demo"
upload-examples:
name: "Upload Examples"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [build-web-demo]
uses: ./.github/workflows/reusable_upload_web_demo.yml
needs: [build-examples]
uses: ./.github/workflows/reusable_upload_examples.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
PR_NUMBER: ${{ github.event.pull_request.number }}
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/on_push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,27 @@ jobs:
CONCURRENCY: push-${{ github.ref_name }}
secrets: inherit

build-web-demo:
name: "Build Web Demo"
needs: [build-wheel-linux, build-web]
uses: ./.github/workflows/reusable_build_web_demo.yml
build-examples:
name: "Build Examples"
needs: [build-wheel-linux]
uses: ./.github/workflows/reusable_build_examples.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
WHEEL_ARTIFACT_NAME: linux-wheel
secrets: inherit

track-sizes:
name: "Track Sizes"
needs: [build-web-demo]
needs: [build-examples]
uses: ./.github/workflows/reusable_track_size.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
secrets: inherit

upload-web-demo:
name: "Upload Web Demo"
needs: [build-web-demo]
uses: ./.github/workflows/reusable_upload_web_demo.yml
upload-examples:
name: "Upload Examples"
needs: [build-examples]
uses: ./.github/workflows/reusable_upload_examples.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
secrets: inherit
Expand Down Expand Up @@ -351,9 +351,6 @@ jobs:
## Example Hosted App
https://app.rerun.io/commit/${{ env.SHORT_SHA }}

## Demo App
https://demo.rerun.io/commit/${{ env.SHORT_SHA }}

## Wheels can be installed with:
```
pip install --pre -f https://build.rerun.io/commit/${{ env.SHORT_SHA }}/wheels --upgrade rerun-sdk
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Reusable Build Web Demo
name: Reusable Build Examples

on:
workflow_call:
Expand All @@ -11,7 +11,7 @@ on:
type: string

concurrency:
group: ${{ inputs.CONCURRENCY }}-build-web-demo
group: ${{ inputs.CONCURRENCY }}-build-examples
cancel-in-progress: true

env:
Expand All @@ -25,8 +25,8 @@ env:
RUSTDOCFLAGS: --deny warnings --deny rustdoc::missing_crate_level_docs

jobs:
rs-build-web-demo:
name: Build Web Demo
rs-build-examples:
name: Build Examples
permissions:
contents: "read"
id-token: "write"
Expand All @@ -41,11 +41,13 @@ jobs:
with:
ref: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.ref) || '' }}

- name: Download Web Viewer
uses: actions/download-artifact@v3
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
name: web_viewer
path: web_viewer
cache_key: "build-web"
save_cache: false
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- name: Download Wheel
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -79,15 +81,13 @@ jobs:
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 web demo
env:
COMMIT_HASH: ${{ steps.get-sha.outputs.sha }}
- name: Build examples
shell: bash
run: |
pixi run python3 scripts/ci/build_demo_app.py --skip-build
pixi run build-examples example_data

- name: Upload web demo assets
- name: Upload assets
uses: actions/upload-artifact@v3
with:
name: web_demo
path: web_demo
name: example_data
path: example_data
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
sha="$(echo $full_commit | cut -c1-7)"

cargo run --locked -p re_build_examples_manifest -- \
--base-url "https://demo.rerun.io/commit/$sha" \
--base-url "https://app.rerun.io/commit/$sha" \
web_viewer/examples_manifest.json

- name: Upload web assets
Expand Down
36 changes: 7 additions & 29 deletions .github/workflows/reusable_publish_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
type: string
required: true
update-latest:
description: "Whether to update the latest version of demo/app"
description: "Whether to update the latest version of app"
type: boolean
required: true

Expand Down Expand Up @@ -104,23 +104,21 @@ jobs:
run: |
pixi run cargo run --locked -p re_build_web_viewer -- --release

- name: Build examples
shell: bash
run: |
pixi run build-examples web_viewer/examples

- name: Build examples manifest
shell: bash
run: |
full_commit="${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha }}"
sha="$(echo $full_commit | cut -c1-7)"

pixi run build-examples-manifest \
--base-url "https://demo.rerun.io/commit/$sha" \
--base-url "https://app.rerun.io/commit/$sha" \
web_viewer/examples_manifest.json

- name: Build web demo
env:
COMMIT_HASH: ${{ needs.get-commit-sha.outputs.short-sha }}
shell: bash
run: |
pixi run python3 scripts/ci/build_demo_app.py --skip-build

- name: Upload app.rerun.io (versioned)
uses: google-github-actions/upload-cloud-storage@v1
with:
Expand All @@ -135,28 +133,8 @@ jobs:
destination: "rerun-web-viewer/commit/${{ needs.get-commit-sha.outputs.short-sha }}"
parent: false

- name: Upload demo.rerun.io (versioned)
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/version/${{ inputs.release-version }}"
parent: false

- name: Upload demo.rerun.io (commit)
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/commit/${{ needs.get-commit-sha.outputs.short-sha }}"
parent: false

- name: Publish app.rerun.io
if: inputs.update-latest
shell: bash
run: |
gsutil -m cp -r 'gs://rerun-web-viewer/version/${{ inputs.release-version }}/*' gs://rerun-web-viewer/version/latest

- name: Publish demo.rerun.io
if: inputs.update-latest
shell: bash
run: |
gsutil -m cp -r 'gs://rerun-demo/version/${{ inputs.release-version }}/*' gs://rerun-demo/version/latest
12 changes: 6 additions & 6 deletions .github/workflows/reusable_track_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ jobs:
name: web_viewer
path: web_viewer

- name: Download web_demo
- name: Download examples
uses: actions/download-artifact@v3
with:
name: web_demo
path: web_demo
name: example_data
path: example_data

- name: Download base results
shell: bash
Expand Down Expand Up @@ -92,9 +92,9 @@ jobs:
entries+=("Wasm:web_viewer/re_viewer_bg.wasm:MiB")
entries+=("JS:web_viewer/re_viewer.js:kiB")

for file in web_demo/examples/**/*.rrd; do
name=$(basename $(dirname "$file"))
entries+=("$name.rrd:$file:MiB")
for file in example_data/*.rrd; do
name=$(basename "$file")
entries+=("$name:$file:MiB")
done

data=$(python3 scripts/ci/sizes.py measure "${entries[@]}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Reusable Upload Web Demo
name: Reusable Upload Examples

on:
workflow_call:
Expand All @@ -23,12 +23,12 @@ on:
default: ""

concurrency:
group: ${{ inputs.CONCURRENCY }}-upload-web-demo
group: ${{ inputs.CONCURRENCY }}-upload-examples
cancel-in-progress: true

jobs:
upload-web:
name: Upload Web Demo to Google Cloud
name: Upload Examples to Google Cloud
permissions:
contents: "read"
id-token: "write"
Expand All @@ -40,11 +40,11 @@ jobs:
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}

- name: Download web demo assets
- name: Download assets
uses: actions/download-artifact@v3
with:
name: web_demo
path: web_demo
name: example_data
path: example_data

# Upload the wasm, html etc to a Google cloud bucket:
- id: "auth"
Expand All @@ -60,56 +60,56 @@ jobs:
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: "Upload web demo (commit)"
- name: "Upload examples (commit)"
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/commit/${{ steps.get-sha.outputs.sha }}"
path: "example_data"
destination: "rerun-web-viewer/commit/${{ steps.get-sha.outputs.sha }}/examples"
parent: false

- name: "Upload web demo (tagged)"
- name: "Upload examples (tagged)"
if: inputs.MARK_TAGGED_VERSION
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/version/${{inputs.RELEASE_VERSION}}"
path: "example_data"
destination: "rerun-web-viewer/version/${{ inputs.RELEASE_VERSION }}/examples"
parent: false

- name: "Upload web demo (adhoc)"
- name: "Upload examples (adhoc)"
if: ${{ inputs.ADHOC_NAME != '' }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/adhoc/${{inputs.ADHOC_NAME}}"
path: "example_data"
destination: "rerun-web-viewer/adhoc/${{ inputs.ADHOC_NAME }}/examples"
parent: false

- name: "Upload web demo (prerelease)"
- name: "Upload examples (prerelease)"
if: github.ref == 'refs/heads/main'
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/prerelease"
path: "example_data"
destination: "rerun-web-viewer/prerelease/examples"
parent: false
headers: |-
cache-control: no-cache, max-age=0

- name: "Upload web demo (nightly)"
- name: "Upload examples (nightly)"
# TEMP: Tracking `main` until we can do actual nightly builds.
if: github.ref == 'refs/heads/main'
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/version/nightly"
path: "example_data"
destination: "rerun-web-viewer/version/nightly/examples"
parent: false
headers: |-
cache-control: no-cache, max-age=0

- name: "Upload web demo (pr)"
- name: "Upload examples (pr)"
if: ${{ inputs.PR_NUMBER != '' }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/pr/${{ inputs.PR_NUMBER }}"
path: "example_data"
destination: "rerun-web-viewer/pr/${{ inputs.PR_NUMBER }}/examples"
parent: false
headers: |-
cache-control: no-cache, max-age=0
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ screenshot*.png
# Web demo app build
web_demo

# Saved example `.rrd` files
example_data

# Screenshot comparison build
/compare_screenshot

Expand Down
Loading
Loading