-
Notifications
You must be signed in to change notification settings - Fork 1.5k
105 lines (97 loc) · 2.97 KB
/
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
name: CI
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
unit-tests-pre-config:
runs-on: ubuntu-latest
env:
TOTAL_GROUPS: 2
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
shell: bash
run: |
MATRIX=$(jq -c -n --argjson groups "${{ env.TOTAL_GROUPS }}" \
'{
include: [range(1; $groups + 1) | {group: ., total: $groups}]
}')
echo "matrix=$MATRIX" | tee -a $GITHUB_OUTPUT
unit-tests:
needs: unit-tests-pre-config
strategy:
matrix: ${{ fromJson(needs.unit-tests-pre-config.outputs.matrix) }}
name: "unit-tests (group ${{ matrix.group }})"
uses: ./.github/workflows/unit-test.yml
with:
total-groups: ${{ matrix.total }}
current-group: ${{ matrix.group }}
secrets: inherit
scan-build:
runs-on: ubuntu-latest
container:
image: signalwire/freeswitch-public-base:bookworm
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
options: --privileged
env:
REPOTOKEN: ${{ secrets.REPOTOKEN }}
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install dependencies
shell: bash
run: |
echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf && \
apt-get update && \
apt-get -y remove \
libsofia-sip-ua0 \
libspandsp-dev && \
apt-get -y install \
autoconf \
libsofia-sip-ua-dev \
libspandsp3-dev && \
rm -rf /etc/apt/auth.conf
- name: Checkout code
uses: actions/checkout@v4
with:
path: /__w/freeswitch/freeswitch
- name: Bootstrap
shell: bash
working-directory: /__w/freeswitch/freeswitch
run: |
./bootstrap.sh -j || exit 1
- name: Scan-build FreeSwitch
shell: bash
working-directory: /__w/freeswitch/freeswitch
run: |
cp build/modules.conf.most modules.conf && \
echo 'codecs/mod_openh264' >> modules.conf && \
sed -i \
-e '/mod_mariadb/s/^#//g' \
-e '/mod_v8/s/^#//g' \
-e '/mod_ilbc/s/^/#/g' \
-e '/mod_isac/s/^/#/g' \
-e '/mod_mp4/s/^/#/g' \
-e '/mod_mongo/s/^/#/g' \
-e '/mod_pocketsphinx/s/^/#/g' \
-e '/mod_sangoma_codec/s/^/#/g' \
-e '/mod_siren/s/^/#/g' \
-e '/mod_avmd/s/^/#/g' \
-e '/mod_basic/s/^/#/g' \
-e '/mod_cdr_mongodb/s/^/#/g' \
-e '/mod_cv/s/^/#/g' \
-e '/mod_erlang_event/s/^/#/g' \
-e '/mod_perl/s/^/#/g' \
-e '/mod_rtmp/s/^/#/g' \
-e '/mod_unimrcp/s/^/#/g' \
-e '/mod_xml_rpc/s/^/#/g' \
modules.conf && \
./configure && \
./scan_build.sh