-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable web viewer file check in ci (#8834)
- Loading branch information
Showing
1 changed file
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" | ||
); | ||
} | ||
} |