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

Disable web viewer file check in ci #8834

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all 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: 10 additions & 8 deletions crates/viewer/re_web_viewer_server/build.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
use std::path::Path;

fn main() {
// https://blog.rust-lang.org/2024/05/06/check-cfg.html
println!("cargo::rustc-check-cfg=cfg(disable_web_viewer_server)");

let viewer_js_path = Path::new("./web_viewer/re_viewer.js");
let viewer_wasm_path = Path::new("./web_viewer/re_viewer_bg.wasm");
// See `Cargo.toml` docs for the `__ci` feature for more information about the `disable_web_viewer_server` cfg.
#[cfg(not(feature = "__ci"))]
{
let viewer_js_path = std::path::Path::new("./web_viewer/re_viewer.js");
let viewer_wasm_path = std::path::Path::new("./web_viewer/re_viewer_bg.wasm");

assert!(
viewer_js_path.exists() && viewer_wasm_path.exists(),
"Web viewer not found, run `pixi run rerun-build-web` to build it!"
);
assert!(
viewer_js_path.exists() && viewer_wasm_path.exists(),
"Web viewer not found, run `pixi run rerun-build-web` to build it!"
);
}
}
Loading