From 1f6bf15480901565ee3671d51a151eef1fbf35aa Mon Sep 17 00:00:00 2001 From: Ygor Souza Date: Sun, 28 Jan 2024 13:07:47 +0100 Subject: [PATCH] Enable x11 or wayland when running check.sh on Linux winit does not build otherwise. --- crates/egui_demo_app/Cargo.toml | 2 ++ scripts/check.sh | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/crates/egui_demo_app/Cargo.toml b/crates/egui_demo_app/Cargo.toml index 8bf3da5f501..e15a11b62d7 100644 --- a/crates/egui_demo_app/Cargo.toml +++ b/crates/egui_demo_app/Cargo.toml @@ -30,6 +30,8 @@ syntect = ["egui_demo_lib/syntect"] glow = ["eframe/glow"] wgpu = ["eframe/wgpu", "bytemuck", "dep:wgpu"] +wayland = ["eframe/wayland"] +x11 = ["eframe/x11"] [dependencies] chrono = { version = "0.4", default-features = false, features = [ diff --git a/scripts/check.sh b/scripts/check.sh index 542b738eccf..e6ad3b559a1 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -35,10 +35,23 @@ cargo test --quiet --all-targets --all-features cargo test --quiet --doc # slow - checks all doc-tests cargo check --quiet -p eframe --no-default-features --features "glow" -cargo check --quiet -p eframe --no-default-features --features "wgpu" +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" -cargo check --quiet -p egui_demo_app --no-default-features --features "wgpu" +cargo check --quiet -p egui_demo_app --no-default-features --features "glow","x11" + +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