Skip to content

Commit

Permalink
CI: Uncomment more worker ASAN tests (#1427)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc authored Jul 18, 2024
1 parent 1c0121b commit 09810e9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 48 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mediasoup-worker-fuzzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
uses: actions/checkout@v4

# We need to install pip invoke manually.
- name: pip3 install invoke
- if: runner.os != 'macOS'
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
- if: runner.os == 'macOS'
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
Expand Down
78 changes: 34 additions & 44 deletions .github/workflows/mediasoup-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ jobs:
- os: ubuntu-20.04
cc: gcc
cxx: g++
# Workaround for this issue in Ubunt 20.04:
# https://github.com/versatica/mediasoup/actions/runs/9992113733/job/27616379442?pr=1427
workaround-ubuntu-20-04: true
- os: ubuntu-20.04
cc: clang
cxx: clang++
workaround-ubuntu-20-04: true
- os: ubuntu-22.04
cc: gcc
cxx: g++
Expand Down Expand Up @@ -71,67 +75,53 @@ jobs:
${{ matrix.build.os }}-node-${{matrix.build.cc}}-
# We need to install pip invoke manually.
- name: pip3 install invoke
- if: runner.os != 'macOS'
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
- if: runner.os == 'macOS'
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
- if: runner.os != 'Windows'
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
# Workaround for this issue in Ubuntu 20.04:
# https://github.com/versatica/mediasoup/actions/runs/9992113733/job/27616379442?pr=1427
- if: ${{ matrix.build.workaround-ubuntu-20-04 }}
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

# NOTE: Maybe make it work on Windows someday.
- 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
# NOTE: Maybe make it work on Windows someday.
- if: runner.os != 'Windows'
name: invoke -r worker test
run: invoke -r worker test
# TODO: Maybe fix this one day.
if: runner.os != 'Windows'

# Address Sanitizer only works on Linux.
# Let's clean everything before rebuilding worker tests with ASAN.
- 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
# Address Sanitizer only works on Linux.
if: runner.os == 'Linux'
- if: runner.os == 'Linux'
name: invoke -r worker test-asan-address
run: invoke -r worker clean-all && invoke -r worker test-asan-address

# Address Sanitizer only works on Linux.
# Let's clean everything before rebuilding worker tests with ASAN.
# - name: invoke -r worker clean-all
# run: invoke -r worker clean-all
# # Address Sanitizer only works on Linux.
# if: runner.os == 'Linux'

# 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'
- if: runner.os == 'Linux'
name: invoke -r worker test-asan-undefined
run: invoke -r worker clean-all && invoke -r worker test-asan-undefined

# Address Sanitizer only works on Linux.
# Let's clean everything before rebuilding worker tests with ASAN.
# - name: invoke -r worker clean-all
# run: invoke -r worker clean-all
# # Address Sanitizer only works on Linux.
# if: runner.os == 'Linux'

# TODO: Uncomment once https://github.com/versatica/mediasoup/issues/1417
# is fixed.
# - name: invoke -r worker test-asan-thread
# run: invoke -r worker test-asan-thread
# # Address Sanitizer only works on Linux.
# if: runner.os == 'Linux'
- if: runner.os == 'Linux'
name: invoke -r worker test-asan-thread
run: invoke -r worker clean-all && invoke -r worker test-asan-thread

0 comments on commit 09810e9

Please sign in to comment.