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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
25 additions and
3 deletions
-
.github/workflows/rust.yml
-
Cargo.toml
-
crates/eframe/src/native/epi_integration.rs
-
crates/egui_glow/examples/pure_glow.rs
|
@ -153,3 +153,24 @@ jobs: |
|
|
uses: Swatinem/rust-cache@v2 |
|
|
uses: Swatinem/rust-cache@v2 |
|
|
- run: cargo check --features wgpu --target aarch64-linux-android |
|
|
- run: cargo check --features wgpu --target aarch64-linux-android |
|
|
working-directory: crates/eframe |
|
|
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 |
|
|
|
|
|
|
|
|
|
@ -27,7 +27,8 @@ opt-level = 2 # fast and small wasm, basically same as `opt-level = 's'` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[profile.dev] |
|
|
[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 |
|
|
# opt-level = 1 # Make debug builds run faster |
|
|
|
|
|
|
|
|
# Optimize all dependencies even in debug builds (does not affect workspace packages): |
|
|
# Optimize all dependencies even in debug builds (does not affect workspace packages): |
|
|
|
@ -172,7 +172,7 @@ fn window_builder_drag_and_drop( |
|
|
enable: bool, |
|
|
enable: bool, |
|
|
) -> winit::window::WindowBuilder { |
|
|
) -> winit::window::WindowBuilder { |
|
|
use winit::platform::windows::WindowBuilderExtWindows as _; |
|
|
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"))] |
|
|
#[cfg(not(target_os = "windows"))] |
|
|
|
@ -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.
|
|
|
// try egl and fallback to windows wgl. Windows is the only platform that *requires* window handle to create display.
|
|
|
#[cfg(target_os = "windows")] |
|
|
#[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
|
|
|
// try egl and fallback to x11 glx
|
|
|
#[cfg(target_os = "linux")] |
|
|
#[cfg(target_os = "linux")] |
|
|
let preference = glutin::display::DisplayApiPreference::EglThenGlx(Box::new( |
|
|
let preference = glutin::display::DisplayApiPreference::EglThenGlx(Box::new( |
|
|