-
Notifications
You must be signed in to change notification settings - Fork 169
213 lines (183 loc) · 6.92 KB
/
smoketest.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: SmokeTest
on: [push]
env:
# TeamTalkJNI JUnit environment variables
INPUTDEVICEID: 1978
OUTPUTDEVICEID: 1978
VIDEODEVICEID: None
VERBOSE: 0
GITHUBSKIP: 1
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Refresh Ubuntu-repo
run: sudo apt update
- name: Source environment
working-directory: ${{runner.workspace}}/TeamTalk5
run: source env.sh
- name: Update packages
working-directory: ${{runner.workspace}}/TeamTalk5
# Ensure FFmpeg doesn't detect additional dependencies
run: |
sudo apt remove libmagickcore-dev libmagickwand-dev libbz2-dev liblzma-dev
sudo apt autoremove
- name: Install Dependencies
run: >-
sudo apt install
cmake
doxygen
junit4
libace-dev
libace-inet-dev
libace-inet-ssl-dev
libace-ssl-dev
libasound2-dev
libogg-dev
libopus-dev
libpcap-dev
libqt5texttospeech5-dev
libqt5x11extras5-dev
libspeex-dev
libspeexdsp-dev
libssl-dev
libtinyxml-dev
libvpx-dev
libxss-dev
ninja-build
portaudio19-dev
python3-minimal
python3-pytest
qtbase5-dev
qtmultimedia5-dev
qttools5-dev
qttools5-dev-tools
valgrind
yasm
zlib1g-dev
- name: Clone submodules
working-directory: ${{runner.workspace}}/TeamTalk5
run: git submodule update --init Library/TeamTalkLib/test/testdata
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: |
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: >-
cmake $GITHUB_WORKSPACE -G Ninja
-DBUILD_TEAMTALK_LIBRARY_UNITTEST_CATCH2=ON
-DFEATURE_PORTAUDIO=OFF
-DFEATURE_V4L2=OFF
-DFEATURE_WEBRTC=OFF
-DTOOLCHAIN_ACE=OFF
-DTOOLCHAIN_CATCH2=ON
-DTOOLCHAIN_FFMPEG=ON
-DTOOLCHAIN_LIBVPX=OFF
-DTOOLCHAIN_OGG=OFF
-DTOOLCHAIN_OPENSSL=OFF
-DTOOLCHAIN_OPUS=OFF
-DTOOLCHAIN_SPEEX=OFF
-DTOOLCHAIN_SPEEXDSP=OFF
-DTOOLCHAIN_TINYXML=OFF
-DTOOLCHAIN_ZLIB=OFF
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build .
- name: Java Server API Test (non-encrypted)
working-directory: ${{runner.workspace}}/TeamTalk5/Library/TeamTalkJNI
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
export ENCRYPTED=0 WEBRTC=0
make runjunitsrv
- name: Java Server API Test (encrypted)
working-directory: ${{runner.workspace}}/TeamTalk5/Library/TeamTalkJNI
run: |
export ENCRYPTED=1 WEBRTC=0
make runjunitsrv
- name: Start TeamTalk Standard Server
working-directory: ${{runner.workspace}}/TeamTalk5
run: |
cp Library/TeamTalkLib/test/tt5srv.xml_template Server/tt5srv.xml
Server/tt5srv -d -c Server/tt5srv.xml
- name: Start TeamTalk Pro Server (encrypted)
working-directory: ${{runner.workspace}}/TeamTalk5
run: |
cp -f Library/TeamTalkLib/test/tt5prosrv.xml_template Server/tt5prosrv.xml
cp Library/TeamTalkLib/test/ttservercert.pem Server/
cp Library/TeamTalkLib/test/ttserverkey.pem Server/
cp Library/TeamTalkLib/test/ca.cer Server/
Server/tt5prosrv -d -wd Server/
- name: Run PyTest
working-directory: ${{runner.workspace}}/TeamTalk5
run: |
source env.sh
pytest-3 Library/TeamTalkPy/test/teamtalk_test.py
- name: Run Python client
working-directory: ${{runner.workspace}}/TeamTalk5
run: |
source env.sh
make -C Client/ttserverlogpy
- name: Catch unit-test
working-directory: ${{runner.workspace}}/TeamTalk5/Library/TeamTalkLib/test
run: |
./catchtt --durations yes
- name: Stop TeamTalk Pro Server
run: killall tt5prosrv
- name: Java Unit-test (non-encrypted)
working-directory: ${{runner.workspace}}/TeamTalk5/Library/TeamTalkJNI
run: |
export ENCRYPTED=0 WEBRTC=0
make runjunit
- name: Stop TeamTalk Standard Server
run: killall tt5srv
- name: Start TeamTalk Pro Server (non-encrypted)
working-directory: ${{runner.workspace}}/TeamTalk5
run: |
cp -f Library/TeamTalkLib/test/tt5srv.xml_template Server/tt5srv.xml
Server/tt5prosrv -d -c Server/tt5srv.xml
- name: Java Unit-test with shared audio devices (non-encrypted)
working-directory: ${{runner.workspace}}/TeamTalk5/Library/TeamTalkJNI
run: |
export ENCRYPTED=0 WEBRTC=0
export INPUTDEVICEID=4026
export OUTPUTDEVICEID=4026
make runjunitpro
- name: Stop TeamTalk Pro Server (non-encrypted)
run: killall tt5prosrv
- name: Start TeamTalk Pro Server (encrypted)
working-directory: ${{runner.workspace}}/TeamTalk5
run: |
cp -f Library/TeamTalkLib/test/tt5prosrv.xml_template Server/tt5prosrv.xml
cp Library/TeamTalkLib/test/ttservercert.pem Server/
cp Library/TeamTalkLib/test/ttserverkey.pem Server/
cp Library/TeamTalkLib/test/ca.cer Server/
Server/tt5prosrv -d -wd Server/
- name: Java Unit-test with virtual audio device (encrypted)
working-directory: ${{runner.workspace}}/TeamTalk5/Library/TeamTalkJNI
run: |
export ENCRYPTED=1 WEBRTC=0
export INPUTDEVICEID=1978
export OUTPUTDEVICEID=1978
make runjunitpro
- name: Stop TeamTalk Pro Server (encrypted)
run: killall tt5prosrv