forked from pjsip/pjproject
-
Notifications
You must be signed in to change notification settings - Fork 0
321 lines (316 loc) · 12.9 KB
/
ci-win.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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
name: CI Windows
on:
push:
branches:
- 'master'
pull_request:
types: [opened, synchronize, reopened]
jobs:
build-windows-default:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: get swig
run: Invoke-WebRequest -Uri "https://github.com/pjsip/third_party_libs/raw/main/swigwin-4.1.1.zip" -OutFile ".\swigwin.zip"
shell: powershell
- name: expand swig
run: |
Expand-Archive -LiteralPath .\swigwin.zip -DestinationPath .\swigwin\; pwd
cd swigwin\swigwin-4.1.1
Add-Content ..\..\swig_path.txt $pwd.Path
shell: powershell
- name: config site
run:
type nul > pjlib/include/pj/config_site.h
shell: cmd
- name: MSBuild
run: |
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
msbuild pjproject-vs14.sln /p:PlatformToolset=v143 /p:Configuration=Debug /p:Platform=win32
shell: cmd
- name: build swig
run: |
set /P SWIG_PATH=<swig_path.txt
set PATH=%PATH%;%SWIG_PATH%
dir pjlib/include/pj/config_site.h
type pjlib/include/pj/config_site.h
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
set INCLUDE=%INCLUDE%;%JAVA_HOME%\include;%JAVA_HOME%\include\win32
cd pjsip-apps/build
msbuild swig_java_pjsua2.vcxproj /p:PlatformToolset=v143 /p:Configuration=Debug /p:Platform=win32 /p:UseEnv=true
shell: cmd
windows-with-openssl-unit-test-1:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: get openssl
run: Invoke-WebRequest -Uri "https://github.com/pjsip/third_party_libs/raw/main/openssl-1.1.1s-win.zip" -OutFile ".\openssl.zip"
shell: powershell
- name: expand openssl
run: |
Expand-Archive -LiteralPath .\openssl.zip -DestinationPath .;
cd openssl_build
Add-Content ..\openssl_dir.txt $pwd.Path
shell: powershell
- name: check openssl folder
run: |
set /P OPENSSL_DIR=<openssl_dir.txt
dir %OPENSSL_DIR%\include
dir %OPENSSL_DIR%\lib
shell: cmd
- name: config site
run:
cd pjlib/include/pj; cp config_site_test.h config_site.h; Add-Content config_site.h "#define PJ_HAS_SSL_SOCK 1"
shell: powershell
- name: check VsDevCmd.bat
run: dir "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
shell: cmd
- name: MSBuild
working-directory: .
run: |
set /P OPENSSL_DIR=<openssl_dir.txt
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
set INCLUDE=%INCLUDE%;%OPENSSL_DIR%\include
set LIB=%LIB%;%OPENSSL_DIR%\lib
msbuild pjproject-vs14.sln /p:PlatformToolset=v143 /p:Configuration=Release /p:Platform=win32 /p:UseEnv=true
shell: cmd
- name: unit tests
run: |
$env:OPENSSL_DIR = Get-Content .\openssl_dir.txt
$env:PATH+=";$env:OPENSSL_DIR\bin"
cd pjlib/bin; ./pjlib-test-i386-Win32-vc14-Release.exe --ci-mode
cd ../../pjlib-util/bin; ./pjlib-util-test-i386-Win32-vc14-Release.exe
cd ../../pjmedia/bin/; ./pjmedia-test-i386-Win32-vc14-Release.exe
shell: powershell
windows-with-openssl-unit-test-2:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: get openssl
run: Invoke-WebRequest -Uri "https://github.com/pjsip/third_party_libs/raw/main/openssl-1.1.1s-win.zip" -OutFile ".\openssl.zip"
shell: powershell
- name: expand openssl
run: |
Expand-Archive -LiteralPath .\openssl.zip -DestinationPath .; pwd
cd openssl_build
Add-Content ..\openssl_dir.txt $pwd.Path
shell: powershell
- name: check openssl folder
run: |
set /P OPENSSL_DIR=<openssl_dir.txt
dir "%OPENSSL_DIR%\include"
dir "%OPENSSL_DIR%\lib"
shell: cmd
- name: config site
run:
cd pjlib/include/pj; cp config_site_test.h config_site.h; Add-Content config_site.h "#define PJ_HAS_SSL_SOCK 1"
shell: powershell
- name: check VsDevCmd.bat
run: dir "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
shell: cmd
- name: MSBuild
working-directory: .
run: |
set /P OPENSSL_DIR=<openssl_dir.txt
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
set INCLUDE=%INCLUDE%;%OPENSSL_DIR%\include
set LIB=%LIB%;%OPENSSL_DIR%\lib
msbuild pjproject-vs14.sln /p:PlatformToolset=v143 /p:Configuration=Release /p:Platform=win32 /p:UseEnv=true
shell: cmd
- name: build test tools cmp_wav
run: |
set /P OPENSSL_DIR=<openssl_dir.txt
cd tests/pjsua/tools
set INCLUDE=%INCLUDE%;%OPENSSL_DIR%\include
set LIB=%LIB%;%OPENSSL_DIR%\lib
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
msbuild cmp_wav.vcxproj /p:PlatformToolset=v143 /p:Configuration=Release /p:Platform=win32 /p:UseEnv=true
shell: cmd
- name: set up Python 3.10 for pjsua test
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: unit tests
run: |
$env:OPENSSL_DIR = Get-Content .\openssl_dir.txt
$env:PATH+=";$env:OPENSSL_DIR\bin"
cd tests/pjsua; python runall.py
cd ../../pjsip/bin; ./pjsip-test-i386-Win32-vc14-Release.exe
shell: powershell
build-windows-gnu-tls:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: get gnutls
run: Invoke-WebRequest -Uri "https://github.com/pjsip/third_party_libs/raw/main/gnutls-3.5.17-win.zip" -Outfile ".\gnutls.zip"
shell: powershell
- name: expand gnutls
run: |
Expand-Archive -LiteralPath .\gnutls.zip -DestinationPath .; pwd
cd gnutls_build
Add-Content ..\gnutls_dir.txt $pwd.Path
shell: powershell
- name: check gnutls folder
run: |
set /P GNUTLS_DIR=<gnutls_dir.txt
dir "%GNUTLS_DIR%\include"
dir "%GNUTLS_DIR%\lib\"
shell: cmd
- name: config site
run: |
echo "" > pjlib\include\pj\config_site.h
Add-Content config_site.h "#define PJ_HAS_SSL_SOCK 1"
Add-Content config_site.h "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_GNUTLS"
shell: powershell
- name: check VsDevCmd.bat
run: dir "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
shell: cmd
- name: MSBuild
working-directory: .
run: |
set /P GNUTLS_DIR=<gnutls_dir.txt
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
set INCLUDE=%INCLUDE%;%GNUTLS_DIR%\include
set LIB=%LIB%;%GNUTLS_DIR%\lib
msbuild pjproject-vs14.sln /p:PlatformToolset=v143 /p:Configuration=Release /p:Platform=win32 /p:UseEnv=true
shell: cmd
windows-with-video-libvpx-schannel-unit-test-1:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: get vpx
run: Invoke-WebRequest -Uri "https://github.com/pjsip/third_party_libs/raw/main/vpx-1.12-win.zip" -Outfile "vpx.zip"
shell: powershell
- name: expand libvpx
run: |
Expand-Archive -LiteralPath .\vpx.zip -DestinationPath .; pwd
cd vpx_build
Add-Content ..\vpx_dir.txt $pwd.Path
shell: powershell
- name: check vpx folder
run: |
set /P VPX_DIR=<vpx_dir.txt
dir "%VPX_DIR%\include"
dir "%VPX_DIR%\lib"
shell: cmd
- name: get sdl
run: Invoke-WebRequest -Uri "https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-devel-2.26.2-VC.zip" -Outfile ".\sdl.zip"
shell: powershell
- name: expand sdl
run: |
Expand-Archive -LiteralPath .\sdl.zip -DestinationPath .\sdl_build\; pwd
cd sdl_build\SDL2-2.26.2
Add-Content ..\..\sdl_dir.txt $pwd.Path
shell: powershell
- name: check sdl folder
run: |
set /P SDL_DIR=<sdl_dir.txt
dir "%SDL_DIR%\include"
dir "%SDL_DIR%\lib\x86"
shell: cmd
- name: config site
run: |
cd pjlib/include/pj; cp config_site_test.h config_site.h
Add-Content config_site.h "#define PJ_HAS_SSL_SOCK 1"
Add-Content config_site.h "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_SCHANNEL"
Add-Content config_site.h "#undef PJMEDIA_SRTP_HAS_DTLS"
Add-Content config_site.h "#define PJMEDIA_HAS_VIDEO 1"
Add-Content config_site.h "#define PJMEDIA_VIDEO_DEV_HAS_DSHOW 1"
Add-Content config_site.h "#define PJMEDIA_HAS_LIBYUV 1"
Add-Content config_site.h "#define PJMEDIA_VIDEO_DEV_HAS_SDL 1"
Add-Content config_site.h "#define PJMEDIA_HAS_VPX_CODEC 1"
shell: powershell
- name: check VsDevCmd.bat
run: dir "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
shell: cmd
- name: MSBuild
working-directory: .
run: |
set /P OPENSSL_DIR=<openssl_dir.txt
set /P VPX_DIR=<vpx_dir.txt
set /P SDL_DIR=<sdl_dir.txt
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
set INCLUDE=%INCLUDE%;%OPENSSL_DIR%\include;%VPX_DIR%\include;%SDL_DIR%\include
set LIB=%LIB%;%OPENSSL_DIR%\lib;%VPX_DIR%\lib;%SDL_DIR%\lib\x86
msbuild pjproject-vs14.sln /p:PlatformToolset=v143 /p:Configuration=Release /p:Platform=win32 /p:UseEnv=true
shell: cmd
- name: build test tools cmp_wav
run: |
set /P OPENSSL_DIR=<openssl_dir.txt
set /P VPX_DIR=<vpx_dir.txt
set /P SDL_DIR=<sdl_dir.txt
cd tests/pjsua/tools
set INCLUDE=%INCLUDE%;%OPENSSL_DIR%\include;%VPX_DIR%\include;%SDL_DIR%\include
set LIB=%LIB%;%VPX_DIR%\lib;%SDL_DIR%\lib\x86
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
msbuild cmp_wav.vcxproj /p:PlatformToolset=v143 /p:Configuration=Release /p:Platform=win32 /p:UseEnv=true
shell: cmd
- name: set up Python 3.10 for pjsua test
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: unit tests
run: |
$env:SDL_DIR = Get-Content .\sdl_dir.txt
$env:PATH+=";$env:SDL_DIR\lib\x86;"
cd tests/pjsua; python runall.py
cd ../../pjlib/bin; ./pjlib-test-i386-Win32-vc14-Release.exe --ci-mode
cd ../../pjlib-util/bin; ./pjlib-util-test-i386-Win32-vc14-Release.exe
cd ../../pjmedia/bin/; ./pjmedia-test-i386-Win32-vc14-Release.exe
shell: powershell
build-windows-video-ffmpeg:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: get ffmpeg
run: Invoke-WebRequest -Uri "https://github.com/pjsip/third_party_libs/raw/main/ffmpeg-5.1.2-win.zip" -Outfile "ffmpeg.zip"
shell: powershell
- name: expand ffmpeg
run: |
Expand-Archive -LiteralPath .\ffmpeg.zip -DestinationPath .; pwd
cd ffmpeg_build
Add-Content ..\ffmpeg_dir.txt $pwd.Path
shell: powershell
- name: check ffmpeg folder
run: |
set /P FFMPEG_DIR=<ffmpeg_dir.txt
dir "%FFMPEG_DIR%\include"
dir "%FFMPEG_DIR%\lib"
shell: cmd
- name: get sdl
run: Invoke-WebRequest -Uri "https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-devel-2.26.2-VC.zip" -Outfile ".\sdl.zip"
shell: powershell
- name: expand sdl
run: |
Expand-Archive -LiteralPath .\sdl.zip -DestinationPath .\sdl_build\; pwd
cd sdl_build\SDL2-2.26.2
Add-Content ..\..\sdl_dir.txt $pwd.Path
shell: powershell
- name: check sdl folder
run: |
set /P SDL_DIR=<sdl_dir.txt
dir "%SDL_DIR%\include\SDL"
dir "%SDL_DIR%\lib\x86"
shell: cmd
- name: config site
run: |
echo "" > pjlib\include\pj\config_site.h
Add-Content config_site.h "#define PJMEDIA_HAS_VIDEO 1"
Add-Content config_site.h "#define PJMEDIA_HAS_FFMPEG 1"
Add-Content config_site.h "#define PJMEDIA_HAS_FFMPEG_VID_CODEC 1"
Add-Content config_site.h "#define PJMEDIA_VIDEO_DEV_HAS_FFMPEG 1"
Add-Content config_site.h "#define PJMEDIA_VIDEO_DEV_HAS_SDL 1"
shell: powershell
- name: check VsDevCmd.bat
run: dir "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
shell: cmd
- name: MSBuild
working-directory: .
run: |
set /P FFMPEG_DIR=<ffmpeg_dir.txt
set /P LIBSDL_DIR=<sdl_dir.txt
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
set INCLUDE=%INCLUDE%;%LIBFFMPEG_DIR%\include;%SDL_DIR%\include
set LIB=%LIB%;%FFMPEG_DIR%\lib;%SDL_DIR%\lib\x86
msbuild pjproject-vs14.sln /p:PlatformToolset=v143 /p:Configuration=Release /p:Platform=win32 /p:UseEnv=true
shell: cmd