Browse Source

Add simple Windows CI workflow check (#2663)

* Add simple Windows CI workflow check

* Fix Windows build in CI

* Windows fix
pull/2832/head
John Hughes 2 years ago
committed by GitHub
parent
commit
8c59888ebd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      .github/workflows/rust.yml
  2. 3
      Cargo.toml
  3. 2
      crates/eframe/src/native/epi_integration.rs
  4. 2
      crates/egui_glow/examples/pure_glow.rs

21
.github/workflows/rust.yml

@ -153,3 +153,24 @@ jobs:
uses: Swatinem/rust-cache@v2
- run: cargo check --features wgpu --target aarch64-linux-android
working-directory: crates/eframe
windows:
name: Check Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.65.0
override: true
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --all-targets --all-features

3
Cargo.toml

@ -27,7 +27,8 @@ opt-level = 2 # fast and small wasm, basically same as `opt-level = 's'`
[profile.dev]
split-debuginfo = "unpacked" # faster debug builds on mac
# Can't leave this on by default, because it breaks the Windows build. Related: https://github.com/rust-lang/cargo/issues/4897
# split-debuginfo = "unpacked" # faster debug builds on mac
# opt-level = 1 # Make debug builds run faster
# Optimize all dependencies even in debug builds (does not affect workspace packages):

2
crates/eframe/src/native/epi_integration.rs

@ -172,7 +172,7 @@ fn window_builder_drag_and_drop(
enable: bool,
) -> winit::window::WindowBuilder {
use winit::platform::windows::WindowBuilderExtWindows as _;
build_window.with_drag_and_drop(enable)
window_builder.with_drag_and_drop(enable)
}
#[cfg(not(target_os = "windows"))]

2
crates/egui_glow/examples/pure_glow.rs

@ -29,7 +29,7 @@ impl GlutinWindowContext {
// try egl and fallback to windows wgl. Windows is the only platform that *requires* window handle to create display.
#[cfg(target_os = "windows")]
let preference = glutin::display::DisplayApiPreference::EglThenWgl(Some(window_handle));
let preference = glutin::display::DisplayApiPreference::EglThenWgl(Some(raw_window_handle));
// try egl and fallback to x11 glx
#[cfg(target_os = "linux")]
let preference = glutin::display::DisplayApiPreference::EglThenGlx(Box::new(

Loading…
Cancel
Save