Skip to content

Commit e542a4e

Browse files
committed
Merge remote-tracking branch 'origin/main' into nv12-support
2 parents 4e786a6 + ca078fa commit e542a4e

393 files changed

Lines changed: 19244 additions & 4682 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[alias]
2+
# TODO(emilk): remove all these and start using `just` and `pixi` instead.
3+
24
# `cargo rerun` is short a convenient shorthand, skipping the web viewer.
35
rerun = "run --package rerun-cli --no-default-features --features native_viewer --"
46

@@ -8,7 +10,8 @@ rerun-release = "run --package rerun-cli --no-default-features --features native
810
# `cargo rerun-web` is short a convenient shorthand for building & starting the web viewer.
911
rerun-web = "run --package rerun-cli --no-default-features --features web_viewer -- --web-viewer"
1012

11-
# Run the codegen. Pass --profile
13+
# Run the codegen. Optionally pass `--profile` to it.
14+
# NOTE: there are several CI jobs with `command: codegen` with the cargo action
1215
codegen = "run --package re_types_builder --"
1316

1417
# To easily run examples on the web, see https://github.com/rukai/cargo-run-wasm.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.zip -text diff
22
**/source_hash.txt linguist-generated=true
3+
Cargo.lock linguist-generated=true
4+
pixi.lock linguist-generated=true

.github/actions/deploy-vercel/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ inputs:
2424
required: true
2525

2626
runs:
27-
using: "node18"
27+
using: "node20"
2828
main: "index.mjs"
2929

.github/workflows/documentation.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ permissions:
1010
contents: read
1111

1212
jobs:
13+
# BEWARE(streetsidesoftware/cspell-action#187): a misconfigured cspell will _not_ have a non-zero exit code...
1314
spellcheck:
1415
name: Spellcheck
1516
runs-on: ubuntu-latest
1617
steps:
1718
- uses: actions/checkout@v4
18-
- uses: streetsidesoftware/cspell-action@v2
19+
- uses: streetsidesoftware/cspell-action@v3
1920
with:
2021
config: "docs/cspell.json"
2122
files: "**/*.md"
23+
strict: true
24+
incremental_files_only: false
2225
linkinator:
2326
name: linkinator
2427
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 118 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
- name: Checkout repository
5050
uses: actions/checkout@v4
5151
with:
52+
fetch-depth: 0
5253
token: ${{ secrets.RERUN_BOT_TOKEN }}
5354

5455
- name: Set up Python
@@ -58,7 +59,13 @@ jobs:
5859

5960
- name: Install deps
6061
run: |
61-
python3 -m pip install -r ./scripts/ci/requirements.txt
62+
python3 -m pip install -r ./scripts/ci/requirements-crates.txt
63+
64+
# for `taplo fmt` done in `crates.py version --bump`
65+
- name: Install taplo-cli
66+
uses: taiki-e/install-action@v2
67+
with:
68+
tool: taplo-cli
6269

6370
- name: Update crate versions
6471
id: versioning
@@ -112,6 +119,44 @@ jobs:
112119
git push
113120
echo "version_bump_commit_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
114121
122+
- name: Create pull request
123+
env:
124+
GH_TOKEN: ${{ secrets.RERUN_BOT_TOKEN }}
125+
run: |
126+
set +e
127+
pr=$(gh pr view --json headRefName 2>/dev/null || echo "{}")
128+
if echo "$pr" | jq '. | has("headRefName")' | grep -q 'true'; then
129+
echo "PR already exists"
130+
exit 0
131+
fi
132+
set -e
133+
134+
echo "PR does not exist, creating…"
135+
136+
cat <<EOF > pr-body.txt
137+
### Next steps
138+
- Test the release
139+
- If this is an `alpha` release, you can just merge the pull request.
140+
- Otherwise:
141+
- For any added commits, run the release workflow in `rc` mode again
142+
- After testing, run the release workflow in `release` mode
143+
- Once the final release workflow finishes, [create a GitHub release](https://github.com/rerun-io/rerun/releases/new)
144+
145+
- [ ] Tests
146+
- [ ] Windows
147+
- [ ] Linux
148+
- [ ] MacOS
149+
EOF
150+
151+
gh pr create \
152+
--base main \
153+
--head $(git branch --show-current) \
154+
--title "Release ${{ (inputs.release-type == 'alpha' && steps.versioning.outputs.current) || steps.versioning.outputs.final }}" \
155+
--label "⛴ release" \
156+
--label "exclude from changelog" \
157+
--fill \
158+
--body-file pr-body.txt
159+
115160
update-docs:
116161
name: "Update Docs"
117162
needs: [version]
@@ -176,40 +221,92 @@ jobs:
176221
git push --force origin ${{ github.ref_name }}:latest
177222
178223
post-release-version-bump:
179-
name: "Post-release Version Bump"
180-
if: inputs.release-type == 'final'
224+
name: "Post-Release Version Bump"
225+
if: inputs.release-type == 'alpha' || inputs.release-type == 'final'
181226
needs: [version, update-docs, publish-crates, build-and-publish-wheels, build-and-publish-web]
182227
runs-on: ubuntu-latest
183228
steps:
184229
- name: Checkout repository
185230
uses: actions/checkout@v4
186231
with:
187-
ref: main
232+
token: ${{ secrets.RERUN_BOT_TOKEN }}
188233

189234
- name: Install dependencies
190235
run: |
191-
python3 -m pip install -r scripts/ci/requirements.txt
236+
python3 -m pip install -r scripts/ci/requirements-crates.txt
237+
238+
# for `taplo fmt` done in `crates.py version --bump`
239+
- name: Install taplo-cli
240+
uses: taiki-e/install-action@v2
241+
with:
242+
tool: taplo-cli
192243

193-
# After a release, we bump the minor version and append `+dev`.
194244
- name: Update version
195245
id: update-version
196246
run: |
197-
python3 scripts/ci/crates.py version --bump minor --dev
198-
echo "version=$(python3 scripts/ci/crates.py get-version)" >> "$GITHUB_OUTPUT"
247+
if [ ${{ inputs.release-type }} = "final" ]; then
248+
# After a final release, we bump the minor version and append `+dev`.
249+
python3 scripts/ci/crates.py version --bump prerelease --dev --pre-id=alpha
250+
echo "version=$(python3 scripts/ci/crates.py get-version)" >> "$GITHUB_OUTPUT"
251+
else
252+
# After an alpha release, we bump the prerelease version and append `+dev`.
253+
python3 scripts/ci/crates.py version --bump minor
254+
python3 scripts/ci/crates.py version --bump prerelease --dev --pre-id=alpha
255+
echo "version=$(python3 scripts/ci/crates.py get-version)" >> "$GITHUB_OUTPUT"
256+
fi
199257
200-
- name: Create pull request
201-
uses: peter-evans/create-pull-request@v5.0.2
258+
- name: Commit new version
259+
run: |
260+
git config --global user.name "rerun-bot"
261+
git config --global user.email "bot@rerun.io"
262+
git commit -am "Bump versions to ${{ steps.update-version.outputs.version }}"
263+
git push
264+
265+
comment-artifact-links:
266+
name: "Link to artifacts"
267+
needs: [version, update-docs, publish-crates, build-and-publish-wheels, build-and-publish-web]
268+
runs-on: ubuntu-latest
269+
steps:
270+
- name: Checkout repository
271+
uses: actions/checkout@v4
202272
with:
273+
fetch-depth: 0
203274
token: ${{ secrets.RERUN_BOT_TOKEN }}
204-
base: main
205-
branch: "post-${{ github.ref_name }}"
206-
commit-message: "bump versions to ${{ steps.update-version.outputs.version }}"
207-
title: "Post-release ${{ needs.version.outputs.final }}"
208-
labels: "⛴ release"
209-
committer: "Rerun Bot <bot@rerun.io>"
210-
author: "Rerun Bot <bot@rerun.io>"
211-
body: |
212-
### What
213-
214-
- [x] Bump all crate versions to `${{ steps.update-version.outputs.version }}`
275+
276+
- name: Create comment
277+
env:
278+
GH_TOKEN: ${{ secrets.RERUN_BOT_TOKEN }}
279+
run: |
280+
pr_number=$(gh pr view --json number | jq '.number')
281+
282+
if [ ${{ inputs.release-type }} = "final" ]; then
283+
web_app_link="https://app.rerun.io/version/${{ needs.version.outputs.final }}"
284+
rerun_io_docs_link="https://rerun.io/docs"
285+
py_docs_link="https://ref.rerun.io/docs/python/${{ needs.version.outputs.final }}"
286+
else
287+
web_app_link="https://app.rerun.io/commit/${{ needs.version.outputs.release-commit }}"
288+
rerun_io_docs_link="https://rerun.io/preview/${{ needs.version.outputs.release-commit }}/docs"
289+
py_docs_link="https://ref.rerun.io/docs/python/dev"
290+
fi
291+
wheels_link="https://pypi.org/project/rerun-sdk/${{ needs.version.outputs.current }}"
292+
crates_link="https://crates.io/crates/rerun/${{ needs.version.outputs.current }}"
293+
rs_docs_link="https://docs.rs/rerun/${{ needs.version.outputs.current }}"
294+
295+
pip_install="pip install rerun-sdk==${{ needs.version.outputs.current }}"
296+
cargo_install="cargo install rerun-cli@${{ needs.version.outputs.current }}"
297+
298+
cat <<EOF > comment-body.txt
299+
Version ${{ needs.version.outputs.current }} published sucessfully.
300+
301+
| artifact | install |
302+
| --------------------------- | -------------- |
303+
| [web app]($web_app_link) | |
304+
| [wheels]($wheels_link) | $pip_install |
305+
| [crates]($crates_link) | $cargo_install |
306+
| [docs]($rerun_io_docs_link) | |
307+
| [py docs]($py_docs_link) | |
308+
| [rs docs]($rs_docs_link) | |
309+
EOF
310+
311+
gh pr comment $pr_number --body-file comment-body.txt --edit-last
215312

.github/workflows/reusable_build_and_publish_web.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
type: boolean
2828
required: true
2929

30+
permissions:
31+
contents: "write"
32+
id-token: "write"
33+
3034
jobs:
3135
get-commit-sha:
3236
name: Get Commit Sha
@@ -51,6 +55,12 @@ jobs:
5155
with:
5256
ref: ${{ inputs.release-commit }}
5357

58+
- id: "auth"
59+
uses: google-github-actions/auth@v1
60+
with:
61+
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
62+
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
63+
5464
- name: Set up Rust
5565
uses: ./.github/actions/setup-rust
5666
with:
@@ -98,18 +108,12 @@ jobs:
98108
shell: bash
99109
run: ./scripts/setup_web.sh
100110

101-
- name: Build app.rerun.io (release)
111+
- name: Build app.rerun.io
102112
uses: actions-rs/cargo@v1
103113
with:
104114
command: run
105115
args: --locked -p re_build_web_viewer -- --release
106116

107-
- name: Build app.rerun.io (debug)
108-
uses: actions-rs/cargo@v1
109-
with:
110-
command: run
111-
args: --locked -p re_build_web_viewer -- --debug
112-
113117
- name: Build web demo
114118
env:
115119
COMMIT_HASH: ${{ needs.get-commit-sha.outputs.short-sha }}
@@ -137,6 +141,11 @@ jobs:
137141
destination: "rerun-demo/version/${{ inputs.release-version }}"
138142
parent: false
139143

144+
- name: Publish app.rerun.io
145+
if: inputs.update-latest
146+
run: |
147+
gsutil -m cp -r 'gs://rerun-example-rrd/version/${{ inputs.release-version }}/*' gs://rerun-example-rrd/version/latest
148+
140149
- name: Publish app.rerun.io
141150
if: inputs.update-latest
142151
run: |

.github/workflows/reusable_checks.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,14 @@ jobs:
389389
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
390390
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
391391

392-
- name: Build and run C++ minimal example
393-
shell: bash
394-
run: ./examples/cpp/minimal/build_and_run.sh --werror
395-
396392
- name: Build and run rerun_cpp tests
397393
shell: bash
398394
run: ./rerun_cpp/build_and_run_tests.sh --werror
399395

400-
- name: Build code examples
396+
- name: Build examples
401397
shell: bash
402-
run: ./docs/code-examples/build_all.sh --werror
398+
run: ./examples/cpp/build_all.sh --werror
403399

400+
- name: Build doc-code examples
401+
shell: bash
402+
run: ./docs/code-examples/cpp_build_all.sh --werror

.github/workflows/reusable_deploy_docs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,9 @@ jobs:
169169
runs-on: ubuntu-latest
170170
if: inputs.UPDATE_LATEST
171171
steps:
172-
- name: Setup Node
173-
uses: actions/setup-node@v3
172+
- uses: actions/checkout@v4
174173
with:
175-
node-version: 18
174+
ref: ${{ inputs.RELEASE_COMMIT || (github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.sha) }}
176175

177176
- name: Re-deploy rerun.io
178177
uses: ./.github/actions/deploy-vercel

.github/workflows/reusable_release_crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Install dependencies
2828
run: |
29-
python3 -m pip install -r scripts/ci/requirements.txt
29+
python3 -m pip install -r scripts/ci/requirements-crates.txt
3030
3131
- name: Install Wasm tools
3232
shell: bash

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ crates/re_types/source_hash.txt
55
crates/re_types_builder/source_hash.txt
66

77
# C++ and CMake stuff:
8+
*.a
89
*.bin
910
*.o
1011
**/build/
@@ -29,6 +30,9 @@ __pycache__
2930
*.pyc
3031
*.so
3132

33+
# Pixi environment
34+
.pixi
35+
3236
.gdb_history
3337
perf.data*
3438

0 commit comments

Comments
 (0)