CI: Uncomment more worker ASAN tests #4733
Workflow file for this run
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
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: | |
# Here we want to see all errors, not just the first one. | |
fail-fast: false | |
matrix: | |
build: | |
- os: ubuntu-20.04 | |
cc: gcc | |
cxx: g++ | |
# Workaround for this issue: | |
# https://github.com/versatica/mediasoup/actions/runs/9992113733/job/27616379442?pr=1427 | |
install-libgcc-9-dev: true | |
- os: ubuntu-20.04 | |
cc: clang | |
cxx: clang++ | |
install-libgcc-9-dev: true | |
- os: ubuntu-22.04 | |
cc: gcc | |
cxx: g++ | |
- os: ubuntu-22.04 | |
cc: clang | |
cxx: clang++ | |
- 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 | |
build-type: | |
- Release | |
- Debug | |
runs-on: ${{ matrix.build.os }} | |
env: | |
CC: ${{ matrix.build.cc }} | |
CXX: ${{ matrix.build.cxx }} | |
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' | |
MEDIASOUP_LOCAL_DEV: 'false' | |
MEDIASOUP_BUILDTYPE: ${{ matrix.build-type }} | |
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. | |
- if: runner.os != 'macOS' | |
name: pip3 install invoke | |
run: pip3 install invoke | |
# In macOS we need to specify this option. | |
- if: runner.os == 'macOS' | |
name: pip3 install --break-system-packages invoke | |
run: pip3 install --break-system-packages invoke | |
# We need to install npm deps of worker/scripts/package.json. | |
- if: runner.os != 'Windows' | |
name: npm ci --prefix worker/scripts | |
run: npm ci --prefix worker/scripts --foreground-scripts | |
# Workaround for this issue: | |
# https://github.com/versatica/mediasoup/actions/runs/9992113733/job/27616379442?pr=1427 | |
- if: ${{ matrix.build.install-libgcc-9-dev }} | |
name: workaround for Ubuntu 20.04 | |
run: sudo apt install -y libgcc-10-dev && sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/10/libtsan_preinit.o /usr/lib/libtsan_preinit.o | |
- if: runner.os != 'Windows' | |
name: invoke -r worker lint | |
run: invoke -r worker lint | |
- name: invoke -r worker mediasoup-worker | |
run: invoke -r worker mediasoup-worker | |
- name: invoke -r worker test | |
run: invoke -r worker test | |
# Let's clean everything before rebuilding worker tests with ASAN. | |
- if: runner.os == 'Linux' | |
name: invoke -r worker clean-all | |
run: invoke -r worker clean-all | |
# Address Sanitizer only works on Linux. | |
- if: runner.os == 'Linux' | |
name: invoke -r worker test-asan-address | |
run: invoke -r worker test-asan-address | |
# Let's clean everything before rebuilding worker tests with ASAN. | |
- if: runner.os == 'Linux' | |
name: invoke -r worker clean-all | |
run: invoke -r worker clean-all | |
# TODO: Uncomment once https://github.com/versatica/mediasoup/issues/1417 | |
# is fixed. | |
- name: invoke -r worker test-asan-undefined | |
run: invoke -r worker test-asan-undefined | |
# Address Sanitizer only works on Linux. | |
if: runner.os == 'Linux' | |
# Let's clean everything before rebuilding worker tests with ASAN. | |
- if: runner.os == 'Linux' | |
name: invoke -r worker clean-all | |
run: invoke -r worker clean-all | |
# Address Sanitizer only works on Linux. | |
- if: runner.os == 'Linux' | |
name: invoke -r worker test-asan-thread | |
run: invoke -r worker test-asan-thread |