Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Meson to 1.5.0 #1424

Merged
merged 16 commits into from
Jul 18, 2024
21 changes: 20 additions & 1 deletion .github/workflows/mediasoup-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ concurrency:
jobs:
ci:
strategy:
# Here we want to see all errors, not just the first one.
fail-fast: false
matrix:
build:
Expand Down Expand Up @@ -48,7 +49,7 @@ jobs:
CC: ${{ matrix.build.cc }}
CXX: ${{ matrix.build.cxx }}
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true'
MEDIASOUP_LOCAL_DEV: 'true'
MEDIASOUP_LOCAL_DEV: 'false'
MEDIASOUP_BUILDTYPE: ${{ matrix.build-type }}

steps:
Expand Down Expand Up @@ -98,18 +99,36 @@ jobs:
# TODO: Maybe fix this one day.
if: runner.os != 'Windows'

# 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'

# 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'

# 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
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### NEXT

- Worker: Test, fix buffer overflow ([PR #1419](https://github.com/versatica/mediasoup/pull/1419)).
- Bump up Meson from 1.3.0 to 1.5.0 ([PR #1424](https://github.com/versatica/mediasoup/pull/1424)).

### 3.14.8

Expand Down Expand Up @@ -434,7 +435,7 @@ Migrate `npm-scripts.js` to `npm-scripts.mjs` (ES Module) ([PR #1093](https://gi

### 3.10.2

- Fix release contents by including meson_options.txt ([PR #863](https://github.com/versatica/mediasoup/pull/863)).
- Fix release contents by including `meson_options.txt` ([PR #863](https://github.com/versatica/mediasoup/pull/863)).

### 3.10.1

Expand Down
11 changes: 5 additions & 6 deletions worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
NUM_CORES = len(os.sched_getaffinity(0)) if hasattr(os, 'sched_getaffinity') else os.cpu_count();
PYTHON = os.getenv('PYTHON') or sys.executable;
MESON = os.getenv('MESON') or f'{PIP_MESON_NINJA_DIR}/bin/meson';
MESON_VERSION = os.getenv('MESON_VERSION') or '1.3.0';
MESON_VERSION = os.getenv('MESON_VERSION') or '1.5.0';
# MESON_ARGS can be used to provide extra configuration parameters to meson,
# such as adding defines or changing optimization options. For instance, use
# `MESON_ARGS="-Dms_log_trace=true -Dms_log_file_line=true" npm i` to compile
Expand All @@ -61,7 +61,6 @@
# Let's use a specific version of ninja to avoid buggy version 1.11.1:
# https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/
# https://github.com/ninja-build/ninja/issues/2211
# https://github.com/ninja-build/ninja/issues/2212
NINJA_VERSION = os.getenv('NINJA_VERSION') or '1.10.2.4';
PYLINT_VERSION = os.getenv('PYLINT_VERSION') or '3.0.2';
NPM = os.getenv('NPM') or 'npm';
Expand Down Expand Up @@ -389,7 +388,7 @@ def test(ctx):
);


@task(pre=[call(setup, meson_args=MESON_ARGS + ' -Db_sanitize=address'), flatc])
@task(pre=[call(setup, meson_args=MESON_ARGS + ' -Db_sanitize=address -Db_lundef=false'), flatc])
def test_asan_address(ctx):
"""
Run worker test with Address Sanitizer with '-fsanitize=address'
Expand Down Expand Up @@ -420,7 +419,7 @@ def test_asan_address(ctx):
);


@task(pre=[call(setup, meson_args=MESON_ARGS + ' -Db_sanitize=undefined'), flatc])
@task(pre=[call(setup, meson_args=MESON_ARGS + ' -Db_sanitize=undefined -Db_lundef=false'), flatc])
def test_asan_undefined(ctx):
"""
Run worker test with undefined Sanitizer with -fsanitize=undefined
Expand Down Expand Up @@ -451,7 +450,7 @@ def test_asan_undefined(ctx):
);


@task(pre=[call(setup, meson_args=MESON_ARGS + ' -Db_sanitize=thread'), flatc])
@task(pre=[call(setup, meson_args=MESON_ARGS + ' -Db_sanitize=thread -Db_lundef=false'), flatc])
def test_asan_thread(ctx):
"""
Run worker test with thread Sanitizer with -fsanitize=thread
Expand Down Expand Up @@ -511,7 +510,7 @@ def tidy(ctx):
);


@task(pre=[call(setup, meson_args=MESON_ARGS + ' -Db_sanitize=address'), flatc])
@task(pre=[call(setup, meson_args=MESON_ARGS + ' -Db_sanitize=address -Db_lundef=false'), flatc])
def fuzzer(ctx):
"""
Build the mediasoup-worker-fuzzer binary (which uses libFuzzer)
Expand Down
Loading