Sanitizers #61
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-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: | |
fail-fast: false | |
matrix: | |
ci: | |
- os: ubuntu-20.04 | |
node: 18 | |
- os: ubuntu-22.04 | |
node: 20 | |
- os: ubuntu-24.04 | |
node: 20 | |
meson_args: '-Db_sanitize=address' | |
asan_option: 'detect_leaks=0' # Disable leak detection because detect memory leaks in flatbuffers tool. | |
- os: ubuntu-24.04 | |
node: 20 | |
meson_args: '-Db_sanitize=undefined' | |
- os: ubuntu-24.04 | |
node: 20 | |
meson_args: '-Db_sanitize=memory' | |
- os: macos-12 | |
node: 18 | |
- os: macos-14 | |
node: 20 | |
- os: windows-2022 | |
node: 20 | |
build-type: | |
- Release | |
- Debug | |
runs-on: ${{ matrix.ci.os }} | |
env: | |
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' | |
MEDIASOUP_LOCAL_DEV: 'true' | |
MEDIASOUP_BUILDTYPE: ${{ matrix.build-type }} | |
MESON_ARGS: ${{ matrix.ci.meson_args }} | |
ASAN_OPTIONS: ${{ matrix.ci.asan_option }} | |
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 |