Skip to content

Commit

Permalink
don't run mediasoup-rust ci in debug mode in Windows (not supported)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Apr 9, 2024
1 parent 3b23846 commit 5600190
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/mediasoup-rust-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
arch: arm64
- os: macos-12
- os: macos-14
- os: windows-2022

runs-on: ${{ matrix.ci.os }}

Expand Down
16 changes: 8 additions & 8 deletions worker/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 5600190

Please sign in to comment.