Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Apr 9, 2024
1 parent 5600190 commit 7cf89d0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 120 deletions.
1 change: 1 addition & 0 deletions .github/workflows/mediasoup-rust-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
arch: arm64
- os: macos-12
- os: macos-14
- os: windows-2022

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

Expand Down
111 changes: 0 additions & 111 deletions .github/workflows/mediasoup-worker-debug.yaml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/mediasoup-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
# A single Node.js version should be fine for C++.
node:
- 20
build-type:
- Release
- Debug

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

Expand All @@ -61,7 +64,7 @@ jobs:
CXX: ${{ matrix.build.cxx }}
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true'
MEDIASOUP_LOCAL_DEV: 'true'
MEDIASOUP_BUILDTYPE: 'Release'
MEDIASOUP_BUILDTYPE: ${{ matrix.build-type }}

steps:
- name: Checkout
Expand Down
13 changes: 5 additions & 8 deletions worker/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ use std::process::Command;
use std::{env, fs};

fn main() {
// 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 = 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()
// On Windows Rust always links against release version of MSVC runtime, thus requires
// Release build here
let build_type = if cfg!(all(debug_assertions, not(windows))) {
"Debug"
} else {
"Release".to_string()
"Release"
};

let out_dir = env::var("OUT_DIR").unwrap();
Expand Down

0 comments on commit 7cf89d0

Please sign in to comment.