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

Nightly builds #4505

Merged
merged 49 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
0ea3cea
rename `main` to `nightly`
jprochazk Dec 13, 2023
0596f97
add nightly build
jprochazk Dec 13, 2023
5ec6182
move common examples build logic into crate
jprochazk Dec 13, 2023
ff18552
support multiple channels
jprochazk Dec 13, 2023
9f70cd1
set channel
jprochazk Dec 13, 2023
b90195b
build `detect_and_track_objects` on nightly
jprochazk Dec 13, 2023
26d585c
build more examples
jprochazk Dec 13, 2023
f9069f9
fix lint
jprochazk Dec 13, 2023
f891f79
rename jobs + add `workflow_dispatch` trigger
jprochazk Dec 13, 2023
e07287c
add re_examples to `ARCHITECTURE.md`
jprochazk Dec 13, 2023
3f4fb1f
remove stable diffusion
jprochazk Dec 13, 2023
73d439a
remove signed distance fields
jprochazk Dec 13, 2023
3eb8329
fix version requirement in depth guided stable diffusion + add it back
jprochazk Dec 13, 2023
3c6abba
use `main` channel in publish web
jprochazk Dec 13, 2023
5125bd5
don't deploy docs on nightly
jprochazk Dec 13, 2023
a396ab2
don't use pixi
jprochazk Dec 13, 2023
1901a33
`--no-input` when building examples
jprochazk Dec 13, 2023
deba0fe
remove `mesh-to-sdf` and `segment-anything` from the repo
jprochazk Dec 13, 2023
4794b50
remove docker container + use pixi
jprochazk Dec 13, 2023
96099fa
set manifest urls properly
jprochazk Dec 13, 2023
e5e1abf
dont upload commits on nightly build
jprochazk Dec 13, 2023
6d7ac40
set default manifest url in nightly build
jprochazk Dec 13, 2023
cfc9e5a
temp
jprochazk Dec 13, 2023
8f0d1d4
Merge branch 'main' into jan/nightly-builds
jprochazk Dec 13, 2023
2662b0c
override url to `version/nightly` on nightly channel
jprochazk Dec 13, 2023
7dd2c58
upload nightly
jprochazk Dec 13, 2023
c5ec9d5
Merge branch 'main' into jan/nightly-builds
jprochazk Dec 13, 2023
412e005
set schedule
jprochazk Dec 13, 2023
6ab8cfa
Print the final list of generated .rrd files and their sizes
emilk Dec 14, 2023
2a4a519
Improve initial printout of example candidates
emilk Dec 14, 2023
cf2e509
Add missing dependency
emilk Dec 14, 2023
cbd0744
update pr template
jprochazk Dec 14, 2023
004f79f
clarify what timezone schedule is in
jprochazk Dec 14, 2023
d2a4a72
merge example builds
jprochazk Dec 14, 2023
ca8ebe3
update usage
jprochazk Dec 14, 2023
afce3e0
update ARCHITECTURE.md
jprochazk Dec 14, 2023
cc072cd
update example frontmatter
jprochazk Dec 14, 2023
9b4e334
fix versions
jprochazk Dec 14, 2023
6a461b5
document frontmatter `channel`
jprochazk Dec 14, 2023
4aac2b1
spacing
jprochazk Dec 14, 2023
d210ec1
rename error variable
jprochazk Dec 14, 2023
a32e90e
update error message
jprochazk Dec 14, 2023
8d04e42
only set default manifest url on nightly
jprochazk Dec 14, 2023
2d415d6
temp
jprochazk Dec 14, 2023
1b1bd70
fix track_sizes not depending on web build
jprochazk Dec 14, 2023
319489c
back to schedule only
jprochazk Dec 14, 2023
447630d
Merge branch 'main' into jan/nightly-builds
jprochazk Dec 14, 2023
60e864c
sort
jprochazk Dec 14, 2023
0d1b795
Merge branch 'main' into jan/nightly-builds
jprochazk Dec 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ To get an auto-generated PR description you can put "copilot:summary" or "copilo
* [ ] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [ ] I've included a screenshot or gif (if applicable)
* [ ] I have tested the web demo (if applicable):
* Full build: [app.rerun.io](https://app.rerun.io/pr/{{ pr.number }}/index.html)
* Partial build: [app.rerun.io](https://app.rerun.io/pr/{{ pr.number }}/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) - Useful for quick testing when changes do not affect examples in any way
* Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html)
* Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/{{pr.number}}/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [ ] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Nightly

on:
workflow_dispatch:
schedule:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# 12:15 UTC, every day
- cron: "15 12 * * *"
Comment on lines +7 to +8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so "nightly" means… slightly after noon 😆 I guess it's always night somewhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking this way we get to react to any build failures


jobs:
build-web:
name: "Build Web"
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-wheel-linux:
name: "Build & Upload Wheels"
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
CONCURRENCY: nightly-linux
PLATFORM: linux
WHEEL_ARTIFACT_NAME: linux-wheel
MODE: "pr"
secrets: inherit

build-examples:
name: "Build Examples"
needs: [build-wheel-linux]
uses: ./.github/workflows/reusable_build_examples.yml
with:
CONCURRENCY: nightly
CHANNEL: nightly
WHEEL_ARTIFACT_NAME: linux-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
4 changes: 3 additions & 1 deletion .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
uses: ./.github/workflows/reusable_build_web.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
CHANNEL: main
secrets: inherit

upload-web:
Expand All @@ -130,13 +131,14 @@ jobs:
uses: ./.github/workflows/reusable_build_examples.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
CHANNEL: main
WHEEL_ARTIFACT_NAME: linux-wheel-fast
secrets: inherit

track-sizes:
name: "Track Sizes"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [build-examples]
needs: [build-web, build-examples]
uses: ./.github/workflows/reusable_track_size.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/on_push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: ./.github/workflows/reusable_deploy_docs.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
PY_AND_CPP_DOCS_VERSION_NAME: "nightly"
PY_AND_CPP_DOCS_VERSION_NAME: "main"
UPDATE_LATEST: false
secrets: inherit

Expand All @@ -65,6 +65,7 @@ jobs:
uses: ./.github/workflows/reusable_build_web.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
CHANNEL: main
secrets: inherit

upload-web:
Expand All @@ -81,12 +82,13 @@ jobs:
uses: ./.github/workflows/reusable_build_examples.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
CHANNEL: main
WHEEL_ARTIFACT_NAME: linux-wheel
secrets: inherit

track-sizes:
name: "Track Sizes"
needs: [build-examples]
needs: [build-web, build-examples]
uses: ./.github/workflows/reusable_track_size.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/reusable_build_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ on:
WHEEL_ARTIFACT_NAME:
required: true
type: string
CHANNEL: # `nightly` or `main`
required: true
type: string

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

env:
PYTHON_VERSION: "3.8"
# web_sys_unstable_apis is required to enable the web_sys clipboard API which egui_web uses
# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html
# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html
Expand All @@ -33,9 +35,6 @@ jobs:

runs-on: ubuntu-latest-16-cores

container:
image: rerunio/ci_docker:0.11.0

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -49,20 +48,26 @@ jobs:
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0

- name: Download Wheel
uses: actions/download-artifact@v3
with:
name: ${{ inputs.WHEEL_ARTIFACT_NAME }}
path: wheel

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
- name: Install example dependencies
shell: bash
run: |
pixi run pip install \
-r scripts/ci/requirements-examples-${{ inputs.CHANNEL }}.txt \
--no-input

- name: Install Python dependencies and wheel
shell: bash
run: |
pixi run pip install -r scripts/ci/requirements-web-demo.txt
pixi run pip uninstall rerun-sdk -y
pixi run pip install deprecated numpy>=1.23 pyarrow==10.0.1 pytest==7.1.2
pixi run pip install rerun-sdk --no-index --find-links wheel
Expand All @@ -84,7 +89,9 @@ jobs:
- name: Build examples
shell: bash
run: |
pixi run build-examples example_data
pixi run build-examples rrd \
--channel ${{ inputs.CHANNEL }} \
example_data

- name: Upload assets
uses: actions/upload-artifact@v3
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ on:
required: false
type: string
default: "prerelease"
EXTRA_FLAGS:
required: false
CHANNEL: # `nightly` or `main`
required: true
type: string
default: ""

concurrency:
group: ${{ inputs.CONCURRENCY }}-build-web
Expand Down Expand Up @@ -54,21 +53,29 @@ jobs:
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0

- name: Build web-viewer (release)
shell: bash
run: |
cargo run --locked -p re_build_web_viewer -- --release ${{ inputs.EXTRA_FLAGS }}
if [ ${{ inputs.CHANNEL }} = "nightly" ]; then
export DEFAULT_EXAMPLES_MANIFEST_URL="https://app.rerun.io/version/nightly/examples_manifest.json"
fi
cargo run --locked -p re_build_web_viewer -- --release

# We build a single manifest pointing to the `commit`
# All the `pr`, `nightly`, release tag, etc. variants will always just point to the resolved commit
# All the `pr`, `main`, release tag, etc. variants will always just point to the resolved commit
- 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)"

cargo run --locked -p re_build_examples_manifest -- \
pixi run build-examples manifest \
--base-url "https://app.rerun.io/commit/$sha" \
--channel "${{ inputs.CHANNEL }}" \
web_viewer/examples_manifest.json

- name: Upload web assets
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/reusable_publish_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,19 @@ jobs:
- name: Build examples
shell: bash
run: |
pixi run build-examples web_viewer/examples
pixi run build-examples rrd \
--channel "main" \
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 \
pixi run build-examples manifest \
--base-url "https://app.rerun.io/commit/$sha" \
--channel "main" \
web_viewer/examples_manifest.json

- name: Upload app.rerun.io (versioned)
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/reusable_upload_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
PR_NUMBER:
type: string
default: ""
NIGHTLY:
required: false
type: boolean
default: false

concurrency:
group: ${{ inputs.CONCURRENCY }}-upload-examples
Expand Down Expand Up @@ -61,6 +65,7 @@ jobs:
echo "sha=$(echo $full_commit | cut -c1-7)" >> "$GITHUB_OUTPUT"

- name: "Upload examples (commit)"
if: ${{ !inputs.NIGHTLY }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "example_data"
Expand Down Expand Up @@ -93,13 +98,12 @@ jobs:
headers: |-
cache-control: no-cache, max-age=0

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

- name: "Upload examples (nightly)"
if: ${{ inputs.NIGHTLY }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "example_data"
destination: "rerun-web-viewer/version/nightly/examples"
parent: false
headers: |-
cache-control: no-cache, max-age=0
20 changes: 17 additions & 3 deletions .github/workflows/reusable_upload_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:
required: false
type: string
default: ""
NIGHTLY:
required: false
type: boolean
default: false

concurrency:
group: ${{ inputs.CONCURRENCY }}-upload-web
Expand Down Expand Up @@ -62,6 +66,7 @@ jobs:
echo "sha=$(echo $full_commit | cut -c1-7)" >> "$GITHUB_OUTPUT"

- name: "Upload web-viewer (commit)"
if: ${{ !inputs.NIGHTLY }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_viewer"
Expand Down Expand Up @@ -94,13 +99,12 @@ jobs:
headers: |-
cache-control: no-cache, max-age=0

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

- name: "Upload web-viewer (nightly)"
if: ${{ inputs.NIGHTLY }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_viewer"
destination: "rerun-web-viewer/version/nightly"
parent: false
headers: |-
cache-control: no-cache, max-age=0
3 changes: 1 addition & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ Update instructions:
| re_build_info | Information about the build. Use together with re_build_tools |
| re_build_tools | build.rs helpers for generating build info |
| re_types_builder | Generates code for Rerun's SDKs from flatbuffers definitions. |
| re_build_examples | Build rerun example RRD files |
| re_build_examples_manifest | Build the rerun examples manifest JSON file |
| re_build_examples | Build rerun example RRD files and manifest |
| re_build_web_viewer | Build the rerun web-viewer Wasm from source |


Expand Down