1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Simplify, clean up and speed up CI (#1970)

Use https://github.com/Swatinem/rust-cache
This commit is contained in:
Emil Ernerfeldt
2022-08-27 09:54:47 +02:00
committed by GitHub
parent f3f6946eb2
commit b978b06159
3 changed files with 104 additions and 171 deletions

View File

@@ -1,26 +1,29 @@
#!/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 -eux
set -x
# Checks all tests, lints etc.
# Basically does what the CI does.
cargo install cargo-cranky # Uses lints defined in Cranky.toml. See https://github.com/ericseppanen/cargo-cranky
RUSTFLAGS="-D warnings"
RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454
cargo check --workspace --all-targets
cargo check --workspace --all-targets --all-features
cargo check --all-targets
cargo check --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
cargo cranky --workspace --all-targets --all-features -- -D warnings
cargo test --workspace --all-targets --all-features
cargo test --workspace --doc # slow - checks all doc-tests
cargo cranky --all-targets --all-features -- -D warnings
cargo test --all-targets --all-features
cargo test --doc # slow - checks all doc-tests
cargo fmt --all -- --check
cargo doc -p eframe -p egui -p egui_demo_lib -p egui_extras -p egui_glium -p egui_glow -p egui-winit -p emath -p epaint --lib --no-deps --all-features
cargo doc --lib --no-deps --all-features
cargo doc --document-private-items --no-deps --all-features
(cd crates/eframe && cargo check --no-default-features --features "glow")