diff --git a/.github/workflows/mediasoup-rust-debug.yaml b/.github/workflows/mediasoup-rust-debug.yaml index ec1e921b74..4bd2310d75 100644 --- a/.github/workflows/mediasoup-rust-debug.yaml +++ b/.github/workflows/mediasoup-rust-debug.yaml @@ -24,7 +24,6 @@ jobs: arch: arm64 - os: macos-12 - os: macos-14 - - os: windows-2022 runs-on: ${{ matrix.ci.os }} diff --git a/worker/build.rs b/worker/build.rs index af106d5d69..0d9e0adbd1 100644 --- a/worker/build.rs +++ b/worker/build.rs @@ -2,16 +2,16 @@ use std::process::Command; use std::{env, fs}; fn main() { - // Honor MEDIASOUP_BUILDTYPE environment variable if given + // Honor MEDIASOUP_BUILDTYPE environment variable if given. // On Windows Rust always links against release version of MSVC runtime, // thus requires Release build - let build_type = env::var("MEDIASOUP_BUILDTYPE").unwrap_or_else(|_| { - if cfg!(all(debug_assertions, not(windows))) { - "Debug".to_string() - } else { - "Release".to_string() - } - }); + let build_type = if env::var("MEDIASOUP_BUILDTYPE").is_ok() && cfg!(not(windows)) { + env::var("MEDIASOUP_BUILDTYPE").unwrap().to_string() + } else if cfg!(all(debug_assertions, not(windows))) { + "Debug".to_string() + } else { + "Release".to_string() + }; let out_dir = env::var("OUT_DIR").unwrap();