Add self hosted runner to ci.yml (#955)

* Add self hosted runner to ci.yml

* Remove libgtk install

* Use mold as the linker

* Make build logs non verbose

* Fix crash on failure to get GLOBAL_PLATFORM

* Copy the platform enum before calling unwrap_or_default

Co-authored-by: 0hypercube <0hypercube@gmail.com>
This commit is contained in:
Dennis Kobert
2023-01-13 12:32:50 -08:00
committed by Keavon Chambers
co-authored by 0hypercube
parent dcc3eadf44
commit f67fbe8899
3 changed files with 7 additions and 10 deletions
@@ -224,7 +224,7 @@ impl fmt::Display for Key {
return write!(f, "{}", key_name.chars().skip(KEY_PREFIX.len()).collect::<String>());
}
let keyboard_layout = || GLOBAL_PLATFORM.get().expect("Failed to get GLOBAL_PLATFORM").as_keyboard_platform_layout();
let keyboard_layout = || GLOBAL_PLATFORM.get().copied().unwrap_or_default().as_keyboard_platform_layout();
let name = match self {
// Writing system keys
@@ -338,7 +338,7 @@ impl fmt::Display for KeysGroup {
.0
.iter()
.map(|key| {
let keyboard_layout = GLOBAL_PLATFORM.get().expect("Failed to get GLOBAL_PLATFORM").as_keyboard_platform_layout();
let keyboard_layout = GLOBAL_PLATFORM.get().copied().unwrap_or_default().as_keyboard_platform_layout();
let key_is_modifier = matches!(*key, Key::Control | Key::Command | Key::Alt | Key::Shift | Key::Meta | Key::Accel);
if keyboard_layout == KeyboardPlatformLayout::Mac && key_is_modifier {