-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid abseil containers with SeqManager compared functions
Fixes #1366 ### Details - As demonstrated in temporal PR #1368, standard C++ STD containers do not throw (even in debug mode) when using `Compare` functions in maps/sets that do not honor transitivity, i.e. `comp(a,b) && comp(b,c) -> comp(a,c)`. - So let's not use abseil containers in those cases. ### Bonus tracks - Dupicate CI actions in debug mode. - Make mediasoup Rust building honor `MEDIASOUP_BUILDTYPE` env variable if given. - Fix an amazing bug in `AudioLevelObserver.cpp` which failed to compile because it uses a `absl::btree_multimap` without including the `absl/container/btree_map.h` header (it didn't fail before due to some absl header included by yet anothe included file, etc).
- Loading branch information
Showing
14 changed files
with
310 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: mediasoup-node | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
concurrency: | ||
# Cancel a currently running workflow from the same PR, branch or tag when a | ||
# new workflow is triggered. | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
ci: | ||
- os: ubuntu-20.04 | ||
node: 18 | ||
- os: ubuntu-22.04 | ||
node: 20 | ||
- os: ubuntu-20.04 | ||
node: 18 | ||
arch: arm64 | ||
- os: ubuntu-22.04 | ||
node: 20 | ||
arch: arm64 | ||
- os: macos-12 | ||
node: 18 | ||
- os: macos-14 | ||
node: 20 | ||
- os: windows-2022 | ||
node: 20 | ||
|
||
runs-on: ${{ matrix.ci.os }} | ||
|
||
env: | ||
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' | ||
MEDIASOUP_LOCAL_DEV: 'true' | ||
MEDIASOUP_BUILDTYPE: 'Debug' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.ci.node }} | ||
|
||
- name: Configure cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.npm | ||
key: ${{ matrix.ci.os }}-node-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
${{ matrix.ci.os }}-node- | ||
- name: npm ci | ||
run: npm ci --foreground-scripts | ||
|
||
- name: npm run lint:node | ||
run: npm run lint:node | ||
|
||
- name: npm run test:node | ||
run: npm run test:node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: mediasoup-rust | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
concurrency: | ||
# Cancel a currently running workflow from the same PR, branch or tag when a | ||
# new workflow is triggered. | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
ci: | ||
- os: ubuntu-20.04 | ||
- os: ubuntu-22.04 | ||
- os: ubuntu-20.04 | ||
arch: arm64 | ||
- os: ubuntu-22.04 | ||
arch: arm64 | ||
- os: macos-12 | ||
- os: macos-14 | ||
- os: windows-2022 | ||
|
||
runs-on: ${{ matrix.ci.os }} | ||
|
||
env: | ||
KEEP_BUILD_ARTIFACTS: '1' | ||
MEDIASOUP_BUILDTYPE: 'Debug' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Configure cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
key: ${{ matrix.ci.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | ||
|
||
- name: cargo fmt | ||
run: cargo fmt --all -- --check | ||
|
||
- name: cargo clippy | ||
run: cargo clippy --all-targets -- -D warnings | ||
|
||
- name: cargo test | ||
run: cargo test --verbose | ||
|
||
- name: cargo doc | ||
run: cargo doc --locked --all --no-deps --lib | ||
env: | ||
DOCS_RS: '1' | ||
RUSTDOCFLAGS: '-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ jobs: | |
|
||
env: | ||
KEEP_BUILD_ARTIFACTS: '1' | ||
MEDIASOUP_BUILDTYPE: 'Release' | ||
|
||
steps: | ||
- name: Checkout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: mediasoup-worker | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
concurrency: | ||
# Cancel a currently running workflow from the same PR, branch or tag when a | ||
# new workflow is triggered. | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
build: | ||
- os: ubuntu-20.04 | ||
cc: gcc | ||
cxx: g++ | ||
- os: ubuntu-20.04 | ||
cc: clang | ||
cxx: clang++ | ||
- os: ubuntu-22.04 | ||
cc: gcc | ||
cxx: g++ | ||
- os: ubuntu-22.04 | ||
cc: clang | ||
cxx: clang++ | ||
- os: ubuntu-20.04 | ||
cc: gcc | ||
cxx: g++ | ||
arch: arm64 | ||
- os: ubuntu-20.04 | ||
cc: clang | ||
cxx: clang++ | ||
arch: arm64 | ||
- os: ubuntu-22.04 | ||
cc: gcc | ||
cxx: g++ | ||
arch: arm64 | ||
- os: ubuntu-22.04 | ||
cc: clang | ||
cxx: clang++ | ||
arch: arm64 | ||
- os: macos-12 | ||
cc: gcc | ||
cxx: g++ | ||
- os: macos-14 | ||
cc: clang | ||
cxx: clang++ | ||
- os: windows-2022 | ||
cc: cl | ||
cxx: cl | ||
# A single Node.js version should be fine for C++. | ||
node: | ||
- 20 | ||
|
||
runs-on: ${{ matrix.build.os }} | ||
|
||
env: | ||
CC: ${{ matrix.build.cc }} | ||
CXX: ${{ matrix.build.cxx }} | ||
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' | ||
MEDIASOUP_LOCAL_DEV: 'true' | ||
MEDIASOUP_BUILDTYPE: 'Debug' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Configure cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.npm | ||
key: ${{ matrix.build.os }}-node-${{matrix.build.cc}}-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
${{ matrix.build.os }}-node-${{matrix.build.cc}}- | ||
# We need to install pip invoke manually. | ||
- name: pip3 install invoke | ||
run: pip3 install invoke | ||
if: runner.os != 'macOS' | ||
|
||
# In macOS we need to specify this option. | ||
- name: pip3 install --break-system-packages invoke | ||
run: pip3 install --break-system-packages invoke | ||
if: runner.os == 'macOS' | ||
|
||
# We need to install npm deps of worker/scripts/package.json. | ||
- name: npm ci --prefix worker/scripts | ||
run: npm ci --prefix worker/scripts --foreground-scripts | ||
# TODO: Maybe fix this one day. | ||
if: runner.os != 'Windows' | ||
|
||
- name: invoke -r worker lint | ||
run: invoke -r worker lint | ||
# TODO: Maybe fix this one day. | ||
if: runner.os != 'Windows' | ||
|
||
- name: invoke -r worker mediasoup-worker | ||
run: invoke -r worker mediasoup-worker | ||
|
||
- name: invoke -r worker test | ||
run: invoke -r worker test | ||
# TODO: Maybe fix this one day. | ||
if: runner.os != 'Windows' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: mediasoup-worker-fuzzer | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
concurrency: | ||
# Cancel a currently running workflow from the same PR, branch or tag when a | ||
# new workflow is triggered. | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
build: | ||
- os: ubuntu-22.04 | ||
cc: clang | ||
cxx: clang++ | ||
- os: ubuntu-22.04 | ||
cc: clang | ||
cxx: clang++ | ||
arch: arm64 | ||
|
||
runs-on: ${{ matrix.build.os }} | ||
|
||
env: | ||
CC: ${{ matrix.build.cc }} | ||
CXX: ${{ matrix.build.cxx }} | ||
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' | ||
MEDIASOUP_LOCAL_DEV: 'true' | ||
MEDIASOUP_BUILDTYPE: 'Debug' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# We need to install pip invoke manually. | ||
- name: pip3 install invoke | ||
run: pip3 install invoke | ||
if: runner.os != 'macOS' | ||
|
||
# In macOS we need to specify this option. | ||
- name: pip3 install --break-system-packages invoke | ||
run: pip3 install --break-system-packages invoke | ||
if: runner.os == 'macOS' | ||
|
||
# Build the mediasoup-worker-fuzzer binary (which uses libFuzzer). | ||
- name: invoke -r worker fuzzer | ||
run: invoke -r worker fuzzer | ||
|
||
# Run mediasoup-worker-fuzzer for 5 minutes. | ||
- name: run-fuzzer.sh 300 | ||
run: cd worker && ./scripts/run-fuzzer.sh 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.