Skip to content

mediasoup-worker-prebuild #14

mediasoup-worker-prebuild

mediasoup-worker-prebuild #14

name: mediasoup-worker-prebuild
on:
push:
# Only trigger for production releases.
tags:
- "*.*.*"
# Only trigger when other workflows succeeded.
workflow_run:
workflows: [mediasoup-worker, mediasoup-node, mediasoup-rust]
types:
- completed
jobs:
ci:
strategy:
fail-fast: false
matrix:
build:
# For Linux let's use an old version of Ubuntu (20.04) that builds the
# mediasoup-worker binary using an old version of GLib, so it will work
# on Linux hosts running more modern GLib versions.
# See https://github.com/versatica/mediasoup/issues/1089.
- os: ubuntu-20.04
cc: gcc
cxx: g++
- os: macos-12
cc: clang
cxx: clang++
- os: windows-2022
cc: cl
cxx: cl
node:
- 18
runs-on: ${{ matrix.build.os }}
env:
CC: ${{ matrix.build.cc }}
CXX: ${{ matrix.build.cxx }}
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: "true"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# We need to install some NPM production deps for npm-scripts.mjs to work.
- run: npm ci --ignore-scripts --omit=dev
- run: npm run worker:build
# Publish prebuild binaries on tag.
- run: npm run worker:prebuild
- name: Upload mediasoup-worker prebuilt binary
uses: softprops/action-gh-release@v1
with:
files: worker/prebuild/mediasoup-worker-*.tgz