Skip to content

Commit

Permalink
Adds macOS and Windows CI for Slint (#1096)
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon authored Nov 15, 2024
1 parent 7f7c542 commit de9f287
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ jobs:
run: cmake --preset mac-release .
- name: Build
run: cmake --build --preset mac-release
- name: Build Slint
run: cargo build -p gui --bin obliteration -F slint -r
- name: Run tests
run: cargo test --workspace --exclude gui --exclude kernel
working-directory: src
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
run: cmake --preset windows-release .
- name: Build
run: cmake --build --preset windows-release
- name: Build Slint
run: cargo build -p gui --bin obliteration -F slint -r
- name: Run tests
run: cargo test --workspace --exclude gui --exclude kernel
working-directory: src
Expand Down
2 changes: 1 addition & 1 deletion gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ qt = []

[dependencies]
bitfield-struct = "0.8.0"
clap = { version = "4.5.20", features = ["derive"], optional = true }
gdbstub = "0.7.2"
gdbstub_arch = "0.3.1"
humansize = "2.1.3"
Expand All @@ -41,7 +42,6 @@ aarch64 = { path = "../arch/aarch64" }
[target.'cfg(target_arch = "x86_64")'.dependencies]
x86-64 = { path = "../arch/x86-64" }
raw-window-handle = { version = "0.6", optional = true }
clap = { version = "4.5.20", features = ["derive"], optional = true }

[dependencies.slint]
git = "https://github.com/slint-ui/slint"
Expand Down
12 changes: 3 additions & 9 deletions gui/src/graphics/metal.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
use self::buffer::MetalBuffer;
use super::{Screen, ScreenBuffer};
use crate::vmm::VmmScreen;
use metal::{CAMetalLayer, Device, MetalLayer};
use objc::runtime::{Object, NO, YES};
use objc::{msg_send, sel, sel_impl};
use std::ptr::null_mut;
use std::sync::Arc;
use metal::Device;
use std::ops::Deref;
use thiserror::Error;

pub struct Metal {
Expand All @@ -31,7 +25,7 @@ impl super::GraphicsApi for Metal {

impl super::PhysicalDevice for metal::Device {
fn name(&self) -> &str {
self.name()
self.deref().name()
}
}

Expand Down

0 comments on commit de9f287

Please sign in to comment.