mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 15:13:12 -04:00
<!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> * [X] I have followed the instructions in the PR template I am preparing a separate PR that adds support for JXL with `jxl-oxide`, which is unlikely to be added to the `image` crate anytime soon (more context will be provided in that PR). `jxl-oxide` makes use of the [`array::each_mut`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_mut) API which was stabilized in 1.77, which is the motivation for this MSRV bump. Rust 1.77 was officially released to stable on 21 March, 2024.
93 lines
3.4 KiB
Bash
Executable File
93 lines
3.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# This scripts runs various CI-like checks in a convenient way.
|
|
|
|
set -eu
|
|
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
|
cd "$script_path/.."
|
|
set -x
|
|
|
|
# Checks all tests, lints etc.
|
|
# Basically does what the CI does.
|
|
|
|
cargo +1.77.0 install --quiet typos-cli
|
|
|
|
export RUSTFLAGS="-D warnings"
|
|
export RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454
|
|
|
|
# Fast checks first:
|
|
typos
|
|
./scripts/lint.py
|
|
cargo fmt --all -- --check
|
|
cargo doc --quiet --lib --no-deps --all-features
|
|
cargo doc --quiet --document-private-items --no-deps --all-features
|
|
cargo clippy --quiet --all-targets --all-features -- -D warnings
|
|
cargo clippy --quiet --all-targets --all-features --release -- -D warnings # we need to check release mode too
|
|
|
|
./scripts/clippy_wasm.sh
|
|
|
|
cargo check --quiet --all-targets
|
|
cargo check --quiet --all-targets --all-features
|
|
cargo check --quiet -p egui_demo_app --lib --target wasm32-unknown-unknown
|
|
cargo check --quiet -p egui_demo_app --lib --target wasm32-unknown-unknown --all-features
|
|
# TODO(#5297) re-enable --all-features once the tests work with the unity feature
|
|
cargo test --quiet --all-targets
|
|
cargo test --quiet --doc # slow - checks all doc-tests
|
|
|
|
cargo check --quiet -p eframe --no-default-features --features "glow"
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
cargo check --quiet -p eframe --no-default-features --features "wgpu","x11"
|
|
cargo check --quiet -p eframe --no-default-features --features "wgpu","wayland"
|
|
else
|
|
cargo check --quiet -p eframe --no-default-features --features "wgpu"
|
|
fi
|
|
|
|
cargo check --quiet -p egui --no-default-features --features "serde"
|
|
cargo check --quiet -p egui_demo_app --no-default-features --features "glow"
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
cargo check --quiet -p egui_demo_app --no-default-features --features "wgpu","x11"
|
|
cargo check --quiet -p egui_demo_app --no-default-features --features "wgpu","wayland"
|
|
else
|
|
cargo check --quiet -p egui_demo_app --no-default-features --features "wgpu"
|
|
fi
|
|
|
|
cargo check --quiet -p egui_demo_lib --no-default-features
|
|
cargo check --quiet -p egui_extras --no-default-features
|
|
cargo check --quiet -p egui_glow --no-default-features
|
|
cargo check --quiet -p egui-winit --no-default-features --features "wayland"
|
|
cargo check --quiet -p egui-winit --no-default-features --features "x11"
|
|
cargo check --quiet -p emath --no-default-features
|
|
cargo check --quiet -p epaint --no-default-features --release
|
|
cargo check --quiet -p epaint --no-default-features
|
|
|
|
cargo check --quiet -p eframe --all-features
|
|
cargo check --quiet -p egui --all-features
|
|
cargo check --quiet -p egui_demo_app --all-features
|
|
cargo check --quiet -p egui_extras --all-features
|
|
cargo check --quiet -p egui_glow --all-features
|
|
cargo check --quiet -p egui-winit --all-features
|
|
cargo check --quiet -p emath --all-features
|
|
cargo check --quiet -p epaint --all-features
|
|
|
|
./scripts/wasm_bindgen_check.sh
|
|
|
|
./scripts/cargo_deny.sh
|
|
|
|
# TODO(emilk): consider using https://github.com/taiki-e/cargo-hack or https://github.com/frewsxcv/cargo-all-features
|
|
|
|
# ------------------------------------------------------------
|
|
#
|
|
|
|
# For finding bloat:
|
|
# cargo bloat --release --bin egui_demo_app -n 200 | rg egui
|
|
# Also try https://github.com/google/bloaty
|
|
|
|
# what compiles slowly?
|
|
# cargo clean && time cargo build -p eframe --timings
|
|
# https://fasterthanli.me/articles/why-is-my-rust-build-so-slow
|
|
|
|
# what compiles slowly?
|
|
# cargo llvm-lines --lib -p egui | head -20
|
|
|
|
echo "All checks passed."
|