-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
71 lines (59 loc) · 1.92 KB
/
mediasoup-worker-prebuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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:
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:
- 20
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@v4
- name: Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
# We need to install some NPM production deps for npm-scripts.mjs to work.
- 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).
- name: pip3 install invoke
run: pip3 install invoke
- name: npm run worker:build
run: npm run worker:build
# Publish prebuild binaries on tag.
- name: npm run worker:prebuild
run: npm run worker:prebuild
- name: Upload mediasoup-worker prebuilt binary
uses: softprops/action-gh-release@v1
with:
files: worker/prebuild/mediasoup-worker-*.tgz