-
Notifications
You must be signed in to change notification settings - Fork 2.5k
184 lines (183 loc) · 5.83 KB
/
janus-ci.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: janus-ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
compiler: [gcc, clang]
datachannels: ["yes", "no"]
libcurl: ["yes", "no"]
include:
- datachannels: "yes"
libcurl: "yes"
deps_from_src: "yes"
janus_config_opts: ""
- datachannels: "yes"
libcurl: "no"
deps_from_src: "no"
janus_config_opts: "--disable-aes-gcm -disable-mqtt --disable-mqtt-event-handler --disable-turn-rest-api --disable-sample-event-handler"
- datachannels: "no"
libcurl: "yes"
deps_from_src: "no"
janus_config_opts: "--disable-aes-gcm -disable-mqtt --disable-mqtt-event-handler --disable-data-channels"
exclude:
- datachannels: "no"
libcurl: "no"
env:
CC: ${{ matrix.compiler }}
steps:
- name: install janus apt dependencies
run: >
sudo apt-get update && sudo apt-get --no-install-recommends -y install
autoconf
cmake
duktape-dev
gtk-doc-tools
libavcodec-dev
libavformat-dev
libavutil-dev
libcollection-dev
libconfig-dev
libevent-dev
libglib2.0-dev
libgirepository1.0-dev
liblua5.3-dev
libjansson-dev
libmicrohttpd-dev
libmount-dev
libnanomsg-dev
libogg-dev
libopus-dev
librabbitmq-dev
libsofia-sip-ua-dev
libssl-dev
libtool
libvorbis-dev
ninja-build
openssl
- name: setup additional dependencies from apt
if: ${{ matrix.deps_from_src == 'no' }}
run: >
sudo apt-get --no-install-recommends -y install
libnice-dev
libsrtp2-dev
libusrsctp-dev
libwebsockets-dev
- name: install libcurl from apt
if: ${{ matrix.libcurl == 'yes' }}
run: sudo apt-get --no-install-recommends -y install libcurl4-openssl-dev
- name: setup python
if: ${{ matrix.deps_from_src == 'yes' }}
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- name: install python packages
if: ${{ matrix.deps_from_src == 'yes' }}
run: pip install wheel meson
- name: setup libnice from sources
if: ${{ matrix.deps_from_src == 'yes' }}
run: |
git clone --depth 1 --quiet -b master https://gitlab.freedesktop.org/libnice/libnice.git libnice
pushd libnice
if [ $CC = clang ]; then LNICE_CFLAGS="-Wno-cast-align"; fi;
meson setup -Dprefix=/usr -Dlibdir=lib -Dc_args="$LNICE_CFLAGS" -Ddebug=false -Doptimization=0 -Dexamples=disabled -Dgtk_doc=disabled -Dgupnp=disabled -Dgstreamer=disabled -Dtests=disabled build
ninja -C build
sudo ninja -C build install
- name: checkout libsrtp source
if: ${{ matrix.deps_from_src == 'yes' }}
uses: actions/checkout@v3
with:
repository: cisco/libsrtp
ref: v2.5.0
- name: setup libsrtp from sources
if: ${{ matrix.deps_from_src == 'yes' }}
run: |
./configure --prefix=/usr --enable-openssl
make -j$(nproc) shared_library
sudo make install
- name: checkout usrsctp source
if: ${{ matrix.datachannels == 'yes' && matrix.deps_from_src == 'yes' }}
uses: actions/checkout@v3
with:
repository: sctplab/usrsctp
ref: master
- name: setup usrsctp from sources
if: ${{ matrix.datachannels == 'yes' && matrix.deps_from_src == 'yes' }}
run: |
./bootstrap
./configure --prefix=/usr --disable-static --disable-debug --disable-programs --disable-inet --disable-inet6
make -j$(nproc)
sudo make install
- name: checkout lws source
if: ${{ matrix.deps_from_src == 'yes' }}
uses: actions/checkout@v3
with:
repository: warmcat/libwebsockets
ref: v4.3.2
- name: setup lws from sources
if: ${{ matrix.deps_from_src == 'yes' }}
run: |
mkdir -p build
pushd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLWS_WITH_STATIC=OFF -DLWS_WITHOUT_CLIENT=ON -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_SERVER=ON -DLWS_WITH_HTTP2=OFF ..
make -j$(nproc)
sudo make install
- name: checkout paho-mqtt source
if: ${{ matrix.deps_from_src == 'yes' }}
uses: actions/checkout@v3
with:
repository: eclipse/paho.mqtt.c
ref: v1.3.12
- name: setup paho-mqtt from sources
if: ${{ matrix.deps_from_src == 'yes' }}
run: |
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_SAMPLES=FALSE -DPAHO_BUILD_DOCUMENTATION=FALSE .
make -j$(nproc)
sudo make install
- name: checkout janus source
uses: actions/checkout@v3
- name: build janus from sources
env:
JANUS_CONFIG_COMMON: "--disable-docs --enable-post-processing --enable-plugin-lua --enable-plugin-duktape --enable-json-logger"
JANUS_CONFIG_OPTS: ${{ matrix.janus_config_opts }}
run: |
./autogen.sh
./configure $JANUS_CONFIG_COMMON $JANUS_CONFIG_OPTS
make -j$(nproc)
make check-fuzzers
javascript-lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install modules
run: |
cd npm
npm install
- name: Run ESLint
run: |
cd npm
npm run lint
javascript-dist:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install modules
run: |
cd npm
npm install
- name: Make dist files
run: |
cd npm
npm run prerelease
- uses: actions/upload-artifact@v3
with:
name: janus.es.js
path: npm/dist/janus.es.js