Skip to content

Commit c1b3397

Browse files
committed
Merge branch 'main' into antoine/wheels-linux-aarch64
# Conflicts: # .github/workflows/reusable_test_wheels.yml
2 parents e718959 + 4982c01 commit c1b3397

File tree

257 files changed

+589
-325
lines changed

Some content is hidden

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

257 files changed

+589
-325
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ inputs:
2222
description: "Release commit to update the deployment to"
2323
type: string
2424
required: true
25+
release_version:
26+
description: "Which release version to update the deployment to"
27+
type: string
28+
required: true
2529

2630
runs:
2731
using: "node20"

.github/actions/deploy-vercel/index.mjs

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const token = getRequiredInput("vercel_token");
88
const teamName = getRequiredInput("vercel_team_name");
99
const projectName = getRequiredInput("vercel_project_name");
1010
const releaseCommit = getRequiredInput("release_commit");
11+
const releaseVersion = getRequiredInput("release_version");
1112

1213
const client = new Client(token);
1314

@@ -25,21 +26,38 @@ assert(project, `failed to get project "${projectName}"`);
2526
info`Fetching latest production deployment`;
2627
const productionDeployments = await client.deployments(team.id, project.id);
2728
const latestProductionDeployment = productionDeployments[0];
28-
assert(latestProductionDeployment, `failed to get latest production deployment`);
29+
assert(
30+
latestProductionDeployment,
31+
`failed to get latest production deployment`,
32+
);
2933

34+
const environment = await client.envs(team.id, project.id);
3035
const RELEASE_COMMIT_KEY = "RELEASE_COMMIT";
36+
const RELEASE_VERSION_KEY = "RELEASE_VERSION";
3137

3238
info`Fetching "${RELEASE_COMMIT_KEY}" env var`;
33-
const environment = await client.envs(team.id, project.id);
34-
const releaseCommitEnv = environment.find((env) => env.key === RELEASE_COMMIT_KEY);
39+
const releaseCommitEnv = environment.find(
40+
(env) => env.key === RELEASE_COMMIT_KEY,
41+
);
3542
assert(releaseCommitEnv, `failed to get "${RELEASE_COMMIT_KEY}" env var`);
3643

44+
info`Fetching "${RELEASE_VERSION_KEY}" env var`;
45+
const releaseVersionEnv = environment.find(
46+
(env) => env.key === RELEASE_VERSION_KEY,
47+
);
48+
assert(releaseVersionEnv, `failed to get "${RELEASE_VERSION_KEY}" env var`);
49+
3750
info`Setting "${RELEASE_COMMIT_KEY}" env to "${releaseCommit}"`;
3851
await client.setEnv(team.id, project.id, releaseCommitEnv.id, {
3952
key: RELEASE_COMMIT_KEY,
4053
value: releaseCommit,
4154
});
4255

56+
info`Setting "${RELEASE_VERSION_KEY}" env to "${releaseVersion}"`;
57+
await client.setEnv(team.id, project.id, releaseVersionEnv.id, {
58+
key: RELEASE_VERSION_KEY,
59+
value: releaseVersion,
60+
});
61+
4362
info`Triggering redeploy`;
4463
await client.redeploy(team.id, latestProductionDeployment.uid, "landing");
45-

.github/workflows/contrib_rerun_py.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ jobs:
112112
run: |
113113
RUST_LOG=debug tests/roundtrips.py --release --target x86_64-unknown-linux-gnu --no-py-build
114114
115-
- name: Run docs/code-examples/compare_code_example_output.py
115+
- name: Run docs/snippets/compare_snippet_output.py
116116
shell: bash
117117
# --release so we can inherit from some of the artifacts that maturin has just built before
118118
# --target x86_64-unknown-linux-gnu because otherwise cargo loses the target cache… even though this is the target anyhow…
119119
# --no-py-build because rerun-sdk is already built and installed
120120
run: |
121-
RUST_LOG=debug docs/code-examples/compare_code_example_output.py --release --target x86_64-unknown-linux-gnu --no-py-build
121+
RUST_LOG=debug docs/snippets/compare_snippet_output.py --release --target x86_64-unknown-linux-gnu --no-py-build
122122
123123
- name: Cache RRD dataset
124124
id: dataset

.github/workflows/reusable_build_examples.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ jobs:
9393
--channel ${{ inputs.CHANNEL }} \
9494
example_data
9595
96+
- name: Build snippets
97+
shell: bash
98+
run: |
99+
pixi run build-examples snippets \
100+
example_data/snippets
101+
96102
- name: Upload assets
97103
uses: actions/upload-artifact@v3
98104
with:

.github/workflows/reusable_deploy_docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,4 @@ jobs:
261261
vercel_team_name: ${{ vars.VERCEL_TEAM_NAME }}
262262
vercel_project_name: ${{ vars.VERCEL_PROJECT_NAME }}
263263
release_commit: ${{ inputs.RELEASE_COMMIT }}
264+
release_version: ${{ inputs.RELEASE_VERSION }}

.github/workflows/reusable_test_wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,11 @@ jobs:
201201
run: |
202202
RUST_LOG=debug tests/roundtrips.py --release --target x86_64-unknown-linux-gnu --no-py-build
203203
204-
- name: Run docs/code-examples/compare_code_example_output.py
204+
- name: Run docs/snippets/compare_snippet_output.py
205205
if: ${{ inputs.PLATFORM != 'windows-x64' }}
206206
shell: bash
207207
# --release so we can inherit from some of the artifacts that maturin has just built before
208208
# --target x86_64-unknown-linux-gnu because otherwise cargo loses the target cache… even though this is the target anyhow…
209209
# --no-py-build because rerun-sdk is already built and installed
210210
run: |
211-
RUST_LOG=debug docs/code-examples/compare_code_example_output.py --release --target x86_64-unknown-linux-gnu --no-py-build
211+
RUST_LOG=debug docs/snippets/compare_snippet_output.py --release --target x86_64-unknown-linux-gnu --no-py-build

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ add_subdirectory(crates/rerun_c) # The Rerun C SDK library, must be included bef
157157
add_subdirectory(rerun_cpp) # The Rerun C++ SDK library.
158158
add_subdirectory(examples/cpp)
159159
add_subdirectory(tests/cpp)
160-
add_subdirectory(docs/code-examples)
160+
add_subdirectory(docs/snippets)

Cargo.lock

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
resolver = "2"
33
members = [
44
"crates/*",
5-
"docs/code-examples",
5+
"docs/snippets",
66
"examples/rust/*",
77
"rerun_py",
88
"run_wasm",
@@ -283,13 +283,13 @@ debug = true
283283
# As a last resport, patch with a commit to our own repository.
284284
# ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk.
285285

286-
ecolor = { git = "https://github.com/emilk/egui.git", rev = "0afbefc884cc6d8ada9c60461b1b7c89415270b1" } # egui master 2024-03-13
287-
eframe = { git = "https://github.com/emilk/egui.git", rev = "0afbefc884cc6d8ada9c60461b1b7c89415270b1" } # egui master 2024-03-13
288-
egui = { git = "https://github.com/emilk/egui.git", rev = "0afbefc884cc6d8ada9c60461b1b7c89415270b1" } # egui master 2024-03-13
289-
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "0afbefc884cc6d8ada9c60461b1b7c89415270b1" } # egui master 2024-03-13
290-
egui_plot = { git = "https://github.com/emilk/egui.git", rev = "0afbefc884cc6d8ada9c60461b1b7c89415270b1" } # egui master 2024-03-13
291-
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "0afbefc884cc6d8ada9c60461b1b7c89415270b1" } # egui master 2024-03-13
292-
emath = { git = "https://github.com/emilk/egui.git", rev = "0afbefc884cc6d8ada9c60461b1b7c89415270b1" } # egui master 2024-03-13
286+
ecolor = { git = "https://github.com/emilk/egui.git", rev = "bf7ffb982a6e8c0a40d0871c38bccacef9ee8efb" } # egui master 2024-03-15
287+
eframe = { git = "https://github.com/emilk/egui.git", rev = "bf7ffb982a6e8c0a40d0871c38bccacef9ee8efb" } # egui master 2024-03-15
288+
egui = { git = "https://github.com/emilk/egui.git", rev = "bf7ffb982a6e8c0a40d0871c38bccacef9ee8efb" } # egui master 2024-03-15
289+
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "bf7ffb982a6e8c0a40d0871c38bccacef9ee8efb" } # egui master 2024-03-15
290+
egui_plot = { git = "https://github.com/emilk/egui.git", rev = "bf7ffb982a6e8c0a40d0871c38bccacef9ee8efb" } # egui master 2024-03-15
291+
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "bf7ffb982a6e8c0a40d0871c38bccacef9ee8efb" } # egui master 2024-03-15
292+
emath = { git = "https://github.com/emilk/egui.git", rev = "bf7ffb982a6e8c0a40d0871c38bccacef9ee8efb" } # egui master 2024-03-15
293293

294294
# Useful while developing:
295295
# ecolor = { path = "../../egui/crates/ecolor" }

crates/re_build_examples/src/lib.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,42 @@
33
pub mod example;
44
pub mod manifest;
55
pub mod rrd;
6+
pub mod snippets;
7+
8+
use std::io::stdout;
9+
use std::io::IsTerminal;
10+
use std::process::Command;
11+
use std::process::Output;
12+
use std::time::Duration;
613

714
pub use example::{Channel, Example};
15+
use indicatif::MultiProgress;
16+
use indicatif::ProgressBar;
17+
18+
fn wait_for_output(
19+
mut cmd: Command,
20+
name: &str,
21+
progress: &MultiProgress,
22+
) -> anyhow::Result<Output> {
23+
let progress = progress.add(ProgressBar::new_spinner().with_message(name.to_owned()));
24+
progress.enable_steady_tick(Duration::from_millis(100));
25+
26+
let output = cmd.output()?;
27+
28+
let elapsed = progress.elapsed().as_secs_f64();
29+
let tick = if output.status.success() {
30+
"✔"
31+
} else {
32+
"✘"
33+
};
34+
let message = format!("{tick} {name} ({elapsed:.3}s)");
35+
36+
if stdout().is_terminal() {
37+
progress.set_message(message);
38+
progress.finish();
39+
} else {
40+
println!("{message}");
41+
}
42+
43+
Ok(output)
44+
}

0 commit comments

Comments
 (0)