Skip to content

Commit

Permalink
Enable liburing by default (#1255)
Browse files Browse the repository at this point in the history
- Bonus track: add explicit `--foreground-scripts` to all `npm ci` commands in CI actions
- Bonus track: add `check: true` to `run_command` in our `meson.build` to avoid issue #1256
  • Loading branch information
ibc committed Dec 6, 2023
1 parent 716571d commit ad2d814
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mediasoup-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# NOTE: Add --force since otherwise `npm ci` fails in Node 16 because
# @octokit/auth-token dev dependency requires Node >= 16.
- name: npm ci
run: npm ci --force
run: npm ci --force --foreground-scripts

- name: npm run lint:node
run: npm run lint:node
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mediasoup-worker-prebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
node-version: ${{ matrix.node }}

# We need to install some NPM production deps for npm-scripts.mjs to work.
- name: npm ci
run: npm ci --ignore-scripts --omit=dev
- name: npm ci --ignore-scripts
run: npm ci --ignore-scripts --omit=dev --foreground-scripts

# However we also need to install pip invoke manually (since
# `--ignore-scripts` prevented invoke from being installed).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mediasoup-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:

# We need to install npm deps of worker/scripts/package.json.
- name: npm ci --prefix worker/scripts
run: npm ci --prefix worker/scripts
run: npm ci --prefix worker/scripts --foreground-scripts
# TODO: Maybe fix this one day.
if: runner.os != 'Windows'

Expand Down
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

### NEXT

* Update worker liburing dependency to 2.4-2 ([PR #1254](https://github.com/versatica/mediasoup/pull/1254)):
* Update worker liburing dependency to 2.4-2 ([PR #1254](https://github.com/versatica/mediasoup/pull/1254)).
* liburing: Enable by default ([PR 1255](https://github.com/versatica/mediasoup/pull/1255)).


### 3.13.8

* LibUring: Enable liburing usage for SCTP data delivery ([PR 1249](https://github.com/versatica/mediasoup/pull/1249)).
* LibUring: Disable by default ([PR 1253](https://github.com/versatica/mediasoup/pull/1253)).
* liburing: Enable liburing usage for SCTP data delivery ([PR 1249](https://github.com/versatica/mediasoup/pull/1249)).
* liburing: Disable by default ([PR 1253](https://github.com/versatica/mediasoup/pull/1253)).


### 3.13.7
Expand Down
4 changes: 2 additions & 2 deletions worker/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ if host_machine.system() == 'windows'
]
endif

if host_machine.system() == 'linux' and get_option('ms_enable_liburing')
kernel_version = run_command('uname', '-r').stdout().strip()
if host_machine.system() == 'linux' and not get_option('ms_disable_liburing')
kernel_version = run_command('uname', '-r', check: true).stdout().strip()

# Enable liburing for kernel versions greather than or equal to 6.
if kernel_version[0].to_int() >= 6
Expand Down
8 changes: 4 additions & 4 deletions worker/meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
option('ms_log_trace', type : 'boolean', value : false, description : 'When enabled, logs the current method/function if current log level is "debug"')
option('ms_log_file_line', type : 'boolean', value : false, description : 'When enabled, all the logging macros print more verbose information, including current file and line')
option('ms_rtc_logger_rtp', type : 'boolean', value : false, description : 'When enabled, prints a line with information for each RTP packet')
option('ms_enable_liburing', type : 'boolean', value : false, description : 'When enabled, enables liburing')
option('ms_log_trace', type : 'boolean', value : false, description : 'When set to true, logs the current method/function if current log level is "debug"')
option('ms_log_file_line', type : 'boolean', value : false, description : 'When set to true, all the logging macros print more verbose information, including current file and line')
option('ms_rtc_logger_rtp', type : 'boolean', value : false, description : 'When set to true, prints a line with information for each RTP packet')
option('ms_disable_liburing', type : 'boolean', value : false, description : 'When set to true, disables liburing integration despite current host supports it')

0 comments on commit ad2d814

Please sign in to comment.