Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into nv12-support
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Oct 16, 2023
2 parents 4e786a6 + ca078fa commit e542a4e
Show file tree
Hide file tree
Showing 393 changed files with 19,244 additions and 4,682 deletions.
5 changes: 4 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[alias]
# TODO(emilk): remove all these and start using `just` and `pixi` instead.

# `cargo rerun` is short a convenient shorthand, skipping the web viewer.
rerun = "run --package rerun-cli --no-default-features --features native_viewer --"

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

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

# To easily run examples on the web, see https://github.com/rukai/cargo-run-wasm.
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.zip -text diff
**/source_hash.txt linguist-generated=true
Cargo.lock linguist-generated=true
pixi.lock linguist-generated=true
2 changes: 1 addition & 1 deletion .github/actions/deploy-vercel/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ inputs:
required: true

runs:
using: "node18"
using: "node20"
main: "index.mjs"

5 changes: 4 additions & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ permissions:
contents: read

jobs:
# BEWARE(streetsidesoftware/cspell-action#187): a misconfigured cspell will _not_ have a non-zero exit code...
spellcheck:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@v2
- uses: streetsidesoftware/cspell-action@v3
with:
config: "docs/cspell.json"
files: "**/*.md"
strict: true
incremental_files_only: false
linkinator:
name: linkinator
runs-on: ubuntu-latest
Expand Down
139 changes: 118 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RERUN_BOT_TOKEN }}

- name: Set up Python
Expand All @@ -58,7 +59,13 @@ jobs:

- name: Install deps
run: |
python3 -m pip install -r ./scripts/ci/requirements.txt
python3 -m pip install -r ./scripts/ci/requirements-crates.txt
# for `taplo fmt` done in `crates.py version --bump`
- name: Install taplo-cli
uses: taiki-e/install-action@v2
with:
tool: taplo-cli

- name: Update crate versions
id: versioning
Expand Down Expand Up @@ -112,6 +119,44 @@ jobs:
git push
echo "version_bump_commit_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Create pull request
env:
GH_TOKEN: ${{ secrets.RERUN_BOT_TOKEN }}
run: |
set +e
pr=$(gh pr view --json headRefName 2>/dev/null || echo "{}")
if echo "$pr" | jq '. | has("headRefName")' | grep -q 'true'; then
echo "PR already exists"
exit 0
fi
set -e
echo "PR does not exist, creating…"
cat <<EOF > pr-body.txt
### Next steps
- Test the release
- If this is an `alpha` release, you can just merge the pull request.
- Otherwise:
- For any added commits, run the release workflow in `rc` mode again
- After testing, run the release workflow in `release` mode
- Once the final release workflow finishes, [create a GitHub release](https://github.com/rerun-io/rerun/releases/new)
- [ ] Tests
- [ ] Windows
- [ ] Linux
- [ ] MacOS
EOF
gh pr create \
--base main \
--head $(git branch --show-current) \
--title "Release ${{ (inputs.release-type == 'alpha' && steps.versioning.outputs.current) || steps.versioning.outputs.final }}" \
--label "⛴ release" \
--label "exclude from changelog" \
--fill \
--body-file pr-body.txt
update-docs:
name: "Update Docs"
needs: [version]
Expand Down Expand Up @@ -176,40 +221,92 @@ jobs:
git push --force origin ${{ github.ref_name }}:latest
post-release-version-bump:
name: "Post-release Version Bump"
if: inputs.release-type == 'final'
name: "Post-Release Version Bump"
if: inputs.release-type == 'alpha' || inputs.release-type == 'final'
needs: [version, update-docs, publish-crates, build-and-publish-wheels, build-and-publish-web]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.RERUN_BOT_TOKEN }}

- name: Install dependencies
run: |
python3 -m pip install -r scripts/ci/requirements.txt
python3 -m pip install -r scripts/ci/requirements-crates.txt
# for `taplo fmt` done in `crates.py version --bump`
- name: Install taplo-cli
uses: taiki-e/install-action@v2
with:
tool: taplo-cli

# After a release, we bump the minor version and append `+dev`.
- name: Update version
id: update-version
run: |
python3 scripts/ci/crates.py version --bump minor --dev
echo "version=$(python3 scripts/ci/crates.py get-version)" >> "$GITHUB_OUTPUT"
if [ ${{ inputs.release-type }} = "final" ]; then
# After a final release, we bump the minor version and append `+dev`.
python3 scripts/ci/crates.py version --bump prerelease --dev --pre-id=alpha
echo "version=$(python3 scripts/ci/crates.py get-version)" >> "$GITHUB_OUTPUT"
else
# After an alpha release, we bump the prerelease version and append `+dev`.
python3 scripts/ci/crates.py version --bump minor
python3 scripts/ci/crates.py version --bump prerelease --dev --pre-id=alpha
echo "version=$(python3 scripts/ci/crates.py get-version)" >> "$GITHUB_OUTPUT"
fi
- name: Create pull request
uses: peter-evans/[email protected]
- name: Commit new version
run: |
git config --global user.name "rerun-bot"
git config --global user.email "[email protected]"
git commit -am "Bump versions to ${{ steps.update-version.outputs.version }}"
git push
comment-artifact-links:
name: "Link to artifacts"
needs: [version, update-docs, publish-crates, build-and-publish-wheels, build-and-publish-web]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RERUN_BOT_TOKEN }}
base: main
branch: "post-${{ github.ref_name }}"
commit-message: "bump versions to ${{ steps.update-version.outputs.version }}"
title: "Post-release ${{ needs.version.outputs.final }}"
labels: "⛴ release"
committer: "Rerun Bot <[email protected]>"
author: "Rerun Bot <[email protected]>"
body: |
### What
- [x] Bump all crate versions to `${{ steps.update-version.outputs.version }}`

- name: Create comment
env:
GH_TOKEN: ${{ secrets.RERUN_BOT_TOKEN }}
run: |
pr_number=$(gh pr view --json number | jq '.number')
if [ ${{ inputs.release-type }} = "final" ]; then
web_app_link="https://app.rerun.io/version/${{ needs.version.outputs.final }}"
rerun_io_docs_link="https://rerun.io/docs"
py_docs_link="https://ref.rerun.io/docs/python/${{ needs.version.outputs.final }}"
else
web_app_link="https://app.rerun.io/commit/${{ needs.version.outputs.release-commit }}"
rerun_io_docs_link="https://rerun.io/preview/${{ needs.version.outputs.release-commit }}/docs"
py_docs_link="https://ref.rerun.io/docs/python/dev"
fi
wheels_link="https://pypi.org/project/rerun-sdk/${{ needs.version.outputs.current }}"
crates_link="https://crates.io/crates/rerun/${{ needs.version.outputs.current }}"
rs_docs_link="https://docs.rs/rerun/${{ needs.version.outputs.current }}"
pip_install="pip install rerun-sdk==${{ needs.version.outputs.current }}"
cargo_install="cargo install rerun-cli@${{ needs.version.outputs.current }}"
cat <<EOF > comment-body.txt
Version ${{ needs.version.outputs.current }} published sucessfully.
| artifact | install |
| --------------------------- | -------------- |
| [web app]($web_app_link) | |
| [wheels]($wheels_link) | $pip_install |
| [crates]($crates_link) | $cargo_install |
| [docs]($rerun_io_docs_link) | |
| [py docs]($py_docs_link) | |
| [rs docs]($rs_docs_link) | |
EOF
gh pr comment $pr_number --body-file comment-body.txt --edit-last
23 changes: 16 additions & 7 deletions .github/workflows/reusable_build_and_publish_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ on:
type: boolean
required: true

permissions:
contents: "write"
id-token: "write"

jobs:
get-commit-sha:
name: Get Commit Sha
Expand All @@ -51,6 +55,12 @@ jobs:
with:
ref: ${{ inputs.release-commit }}

- id: "auth"
uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
Expand Down Expand Up @@ -98,18 +108,12 @@ jobs:
shell: bash
run: ./scripts/setup_web.sh

- name: Build app.rerun.io (release)
- name: Build app.rerun.io
uses: actions-rs/cargo@v1
with:
command: run
args: --locked -p re_build_web_viewer -- --release

- name: Build app.rerun.io (debug)
uses: actions-rs/cargo@v1
with:
command: run
args: --locked -p re_build_web_viewer -- --debug

- name: Build web demo
env:
COMMIT_HASH: ${{ needs.get-commit-sha.outputs.short-sha }}
Expand Down Expand Up @@ -137,6 +141,11 @@ jobs:
destination: "rerun-demo/version/${{ inputs.release-version }}"
parent: false

- name: Publish app.rerun.io
if: inputs.update-latest
run: |
gsutil -m cp -r 'gs://rerun-example-rrd/version/${{ inputs.release-version }}/*' gs://rerun-example-rrd/version/latest
- name: Publish app.rerun.io
if: inputs.update-latest
run: |
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,14 @@ jobs:
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- name: Build and run C++ minimal example
shell: bash
run: ./examples/cpp/minimal/build_and_run.sh --werror

- name: Build and run rerun_cpp tests
shell: bash
run: ./rerun_cpp/build_and_run_tests.sh --werror

- name: Build code examples
- name: Build examples
shell: bash
run: ./docs/code-examples/build_all.sh --werror
run: ./examples/cpp/build_all.sh --werror

- name: Build doc-code examples
shell: bash
run: ./docs/code-examples/cpp_build_all.sh --werror
5 changes: 2 additions & 3 deletions .github/workflows/reusable_deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,9 @@ jobs:
runs-on: ubuntu-latest
if: inputs.UPDATE_LATEST
steps:
- name: Setup Node
uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
node-version: 18
ref: ${{ inputs.RELEASE_COMMIT || (github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.sha) }}

- name: Re-deploy rerun.io
uses: ./.github/actions/deploy-vercel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Install dependencies
run: |
python3 -m pip install -r scripts/ci/requirements.txt
python3 -m pip install -r scripts/ci/requirements-crates.txt
- name: Install Wasm tools
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ crates/re_types/source_hash.txt
crates/re_types_builder/source_hash.txt

# C++ and CMake stuff:
*.a
*.bin
*.o
**/build/
Expand All @@ -29,6 +30,9 @@ __pycache__
*.pyc
*.so

# Pixi environment
.pixi

.gdb_history
perf.data*

Expand Down
2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"gaborv.flatbuffers",
"github.vscode-github-actions",
"josetr.cmake-language-support-vscode",
"ms-python.black-formatter",
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools-extension-pack",
Expand All @@ -18,7 +20,7 @@
"vadimcn.vscode-lldb",
"wayou.vscode-todo-highlight",
"webfreak.debug",
"xaver.clang-format", // C++ formatter
"xaver.clang-format", // C++ formatter
"zxh404.vscode-proto3",
]
}
Loading

0 comments on commit e542a4e

Please sign in to comment.