2022-02-04 21:08:15 +00:00
|
|
|
#!/usr/bin/env sh
|
2021-05-09 11:28:24 +00:00
|
|
|
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
|
|
|
cd "$script_path/.."
|
2021-05-02 17:26:57 +00:00
|
|
|
set -eux
|
2020-10-17 09:03:10 +00:00
|
|
|
|
2021-02-21 09:12:08 +00:00
|
|
|
# Checks all tests, lints etc.
|
|
|
|
# Basically does what the CI does.
|
|
|
|
|
2022-04-05 06:07:57 +00:00
|
|
|
RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454
|
|
|
|
|
2021-01-04 00:44:02 +00:00
|
|
|
cargo check --workspace --all-targets
|
|
|
|
cargo check --workspace --all-targets --all-features
|
|
|
|
cargo check -p egui_demo_app --lib --target wasm32-unknown-unknown
|
|
|
|
cargo check -p egui_demo_app --lib --target wasm32-unknown-unknown --all-features
|
2021-05-09 12:13:09 +00:00
|
|
|
cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::all
|
2020-10-17 09:03:10 +00:00
|
|
|
cargo test --workspace --all-targets --all-features
|
2022-01-16 21:15:49 +00:00
|
|
|
cargo test --workspace --doc # slow - checks all doc-tests
|
2021-02-21 09:12:08 +00:00
|
|
|
cargo fmt --all -- --check
|
2020-10-17 09:03:10 +00:00
|
|
|
|
2021-10-19 13:32:23 +00:00
|
|
|
cargo doc -p emath -p epaint -p egui -p eframe -p epi -p egui_web -p egui-winit -p egui_glium -p egui_glow --lib --no-deps --all-features
|
2021-04-15 07:48:30 +00:00
|
|
|
cargo doc -p egui_web --target wasm32-unknown-unknown --lib --no-deps --all-features
|
2022-01-22 07:56:36 +00:00
|
|
|
cargo doc --document-private-items --no-deps --all-features
|
2021-02-06 23:11:52 +00:00
|
|
|
|
2021-09-28 15:33:28 +00:00
|
|
|
(cd emath && cargo check --no-default-features)
|
2022-03-21 21:20:37 +00:00
|
|
|
(cd epaint && cargo check --no-default-features)
|
|
|
|
(cd epaint && cargo check --no-default-features --release)
|
|
|
|
(cd egui && cargo check --no-default-features --features "serialize")
|
2022-03-11 18:14:27 +00:00
|
|
|
(cd eframe && cargo check --no-default-features)
|
2021-09-28 15:33:28 +00:00
|
|
|
(cd epi && cargo check --no-default-features)
|
2022-01-16 21:15:49 +00:00
|
|
|
(cd egui_demo_lib && cargo check --no-default-features)
|
2022-02-21 14:26:26 +00:00
|
|
|
(cd egui_extras && cargo check --no-default-features)
|
2022-03-11 18:15:06 +00:00
|
|
|
(cd egui_web && cargo check --no-default-features)
|
2022-03-21 21:20:37 +00:00
|
|
|
(cd egui-winit && cargo check --no-default-features)
|
2021-09-28 15:33:28 +00:00
|
|
|
(cd egui_glium && cargo check --no-default-features)
|
2021-10-19 19:40:55 +00:00
|
|
|
(cd egui_glow && cargo check --no-default-features)
|
2021-09-28 15:33:28 +00:00
|
|
|
|
2022-01-31 18:17:49 +00:00
|
|
|
|
|
|
|
(cd eframe && cargo check --all-features)
|
|
|
|
(cd egui && cargo check --all-features)
|
2022-03-08 07:26:43 +00:00
|
|
|
(cd egui_demo_app && cargo check --all-features)
|
2022-02-21 14:26:26 +00:00
|
|
|
(cd egui_extras && cargo check --all-features)
|
2022-01-31 18:17:49 +00:00
|
|
|
(cd egui_glium && cargo check --all-features)
|
|
|
|
(cd egui_glow && cargo check --all-features)
|
|
|
|
(cd egui_web && cargo check --all-features)
|
|
|
|
# (cd egui-winit && cargo check --all-features) can't do, beacause of https://github.com/rust-lang/cargo/issues/8832
|
|
|
|
(cd emath && cargo check --all-features)
|
|
|
|
(cd epaint && cargo check --all-features)
|
|
|
|
(cd epi && cargo check --all-features)
|
|
|
|
|
2022-02-22 18:32:30 +00:00
|
|
|
./sh/wasm_bindgen_check.sh
|
2022-02-22 15:30:42 +00:00
|
|
|
|
2022-02-04 21:08:15 +00:00
|
|
|
# cargo install cargo-deny
|
2022-02-22 15:30:42 +00:00
|
|
|
cargo deny check
|
2022-01-31 18:17:49 +00:00
|
|
|
|
2021-02-21 09:12:08 +00:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
#
|
|
|
|
|
2020-10-17 09:03:10 +00:00
|
|
|
# For finding bloat:
|
|
|
|
# cargo bloat --release --bin demo_glium -n 200 | rg egui
|
2022-02-19 19:51:51 +00:00
|
|
|
# Also try https://github.com/google/bloaty
|
2020-10-17 09:03:10 +00:00
|
|
|
|
|
|
|
# what compiles slowly?
|
2022-01-16 21:15:49 +00:00
|
|
|
# https://fasterthanli.me/articles/why-is-my-rust-build-so-slow
|
|
|
|
# (cd egui_demo_app && cargo clean && RUSTC_BOOTSTRAP=1 cargo build --release --quiet -Z timings)
|
2021-05-09 11:28:24 +00:00
|
|
|
|
|
|
|
# what compiles slowly?
|
|
|
|
# cargo llvm-lines --lib -p egui | head -20
|
2022-04-07 15:03:19 +00:00
|
|
|
|
|
|
|
echo "All checks passed."
|