Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
251 changes: 251 additions & 0 deletions .github/workflows/build.yml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
name: Build PJ Project
on:
push:
branches: [ main ]

jobs:
build-linux-x86:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set Project src
run: echo "SRC_VERSION=2.14" >> $GITHUB_ENV
- name: Unzip PJ Project
run: unzip ./pjproject-${{ env.SRC_VERSION }}.zip
- name: install dependencies
run: sudo apt-get install -y swig nasm sip-tester libvpx-dev libopencore-amrnb-dev
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: get openh264
run: git clone --single-branch --branch openh264v2.1.0 https://github.com/cisco/openh264.git
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: build openh264
run: cd openh264 && make && sudo make install && sudo ldconfig
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: config site
run: cd pjlib/include/pj && cp config_site_test.h config_site.h && echo "#define PJMEDIA_HAS_VIDEO 1" >> config_site.h
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: configure
run: CFLAGS="-g -fPIC -DHAS_VID_CODEC_TEST=0" CXXFLAGS="-g -fPIC" LDFLAGS="-rdynamic" ./configure
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: make
run: make
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: Show Build Artifacts
working-directory: ./pjproject-${{ env.SRC_VERSION }}
run: ls -l
- name: Prepare PJSIP bundle
run: |
mkdir -p ./pjsip-bundle/lib
mkdir -p ./pjsip-bundle/include
# Copy all static and shared libraries and headers
# PJ Lib
cp ./pjproject-${{ env.SRC_DIR }}/pjlib/lib/*.a ./pjsip-bundle/lib/ 2>/dev/null || true
cp ./pjproject-${{ env.SRC_DIR }}/pjlib/lib/*.so ./pjsip-bundle/lib/ 2>/dev/null || true
cp -r ./pjproject-${{ env.SRC_DIR }}/pjlib/include/* ./pjsip-bundle/include/ 2>/dev/null || true
# PJ SIP
cp ./pjproject-${{ env.SRC_DIR }}/pjsip/lib/*.a ./pjsip-bundle/lib/ 2>/dev/null || true
cp ./pjproject-${{ env.SRC_DIR }}/pjsip/lib/*.so ./pjsip-bundle/lib/ 2>/dev/null || true
cp -r ./pjproject-${{ env.SRC_DIR }}/pjsip/include/* ./pjsip-bundle/include/ 2>/dev/null || true
# PJ Nath
cp ./pjproject-${{ env.SRC_DIR }}/pjnath/lib/*.a ./pjsip-bundle/lib/ 2>/dev/null || true
cp ./pjproject-${{ env.SRC_DIR }}/pjnath/lib/*.so ./pjsip-bundle/lib/ 2>/dev/null || true
cp -r ./pjproject-${{ env.SRC_DIR }}/pjnath/include/* ./pjsip-bundle/include/ 2>/dev/null || true
# PJ Media
cp ./pjproject-${{ env.SRC_DIR }}/pjmedia/lib/*.a ./pjsip-bundle/lib/ 2>/dev/null || true
cp ./pjproject-${{ env.SRC_DIR }}/pjmedia/lib/*.so ./pjsip-bundle/lib/ 2>/dev/null || true
cp -r ./pjproject-${{ env.SRC_DIR }}/pjmedia/include/* ./pjsip-bundle/include/ 2>/dev/null || true
# Copy CLI binary for testing
cp ./pjproject-${{ env.SRC_DIR }}/pjsip-apps/bin/pjsua-* ./pjsip-bundle/ 2>/dev/null || true
# Optionally copy third-party libs (example: opus, ssl)
# cp /usr/lib/x86_64-linux-gnu/libopus.so* ./pjsip-bundle/lib/ 2>/dev/null || true
# cp /usr/lib/x86_64-linux-gnu/libssl.so* ./pjsip-bundle/lib/ 2>/dev/null || true
# cp /usr/lib/x86_64-linux-gnu/libcrypto.so* ./pjsip-bundle/lib/ 2>/dev/null || true
- name: Read VERSION
id: version
uses: juliangruber/read-file-action@v1
with:
path: ./VERSION
- name: Zip PJSIP bundle
run: |
cd ./pjsip-bundle
zip -r ../pjsip-linux.x86.zip .
- name: Upload ZIP to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: 'v${{ steps.version.outputs.content }}'
files: ./pjsip-linux.x86.zip
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}


build-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set Project src
run: echo "SRC_VERSION=2.14" >> $GITHUB_ENV
- name: Unzip PJ Project
run: unzip ./pjproject-${{ env.SRC_VERSION }}.zip
- name: install dependencies
run: brew install openssl@1.1 libvpx swig
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: config site
run: echo -e "#define PJMEDIA_HAS_VIDEO 1\n#define PJMEDIA_HAS_VID_TOOLBOX_CODEC 1\n" > pjlib/include/pj/config_site.h
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: configure
run: CFLAGS="-I/usr/local/include -I/usr/local/opt/openssl@1.1/include -fPIC" LDFLAGS="-L/usr/local/lib -L/usr/local/opt/openssl@1.1/lib" CXXFLAGS="-fPIC" ./configure
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: make
run: make
working-directory: ./pjproject-${{ env.SRC_VERSION }}
- name: Show Build Artifacts
working-directory: ./pjproject-${{ env.SRC_VERSION }}
run: ls -l
- name: Prepare PJSIP bundle
run: |
mkdir -p ./pjsip-bundle/lib
mkdir -p ./pjsip-bundle/include
# Copy all static and shared libraries and headers
# PJ Lib
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjlib/lib/*.a ./pjsip-bundle/lib/ 2>/dev/null || true
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjlib/lib/*.so ./pjsip-bundle/lib/ 2>/dev/null || true
cp -r ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjlib/include/* ./pjsip-bundle/include/ 2>/dev/null || true
# PJ SIP
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjsip/lib/*.a ./pjsip-bundle/lib/ 2>/dev/null || true
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjsip/lib/*.so ./pjsip-bundle/lib/ 2>/dev/null || true
cp -r ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjsip/include/* ./pjsip-bundle/include/ 2>/dev/null || true
# PJ Nath
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjnath/lib/*.a ./pjsip-bundle/lib/ 2>/dev/null || true
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjnath/lib/*.so ./pjsip-bundle/lib/ 2>/dev/null || true
cp -r ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjnath/include/* ./pjsip-bundle/include/ 2>/dev/null || true
# PJ Media
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjmedia/lib/*.a ./pjsip-bundle/lib/ 2>/dev/null || true
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjmedia/lib/*.so ./pjsip-bundle/lib/ 2>/dev/null || true
cp -r ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjmedia/include/* ./pjsip-bundle/include/ 2>/dev/null || true
# Copy CLI binary for testing
cp ./pjproject-${{ env.SRC_VERSION }}/${{ env.SRC_DIR }}/pjsip-apps/bin/pjsua-* ./pjsip-bundle/ 2>/dev/null || true
# Optionally copy third-party libs (example: opus, ssl)
# cp /usr/lib/x86_64-linux-gnu/libopus.so* ./pjsip-bundle/lib/ 2>/dev/null || true
# cp /usr/lib/x86_64-linux-gnu/libssl.so* ./pjsip-bundle/lib/ 2>/dev/null || true
# cp /usr/lib/x86_64-linux-gnu/libcrypto.so* ./pjsip-bundle/lib/ 2>/dev/null || true
- name: Read VERSION
id: version
uses: juliangruber/read-file-action@v1
with:
path: ./VERSION
- name: Zip PJSIP bundle
run: |
cd ./pjsip-bundle
zip -r ../pjsip-macos.arm64.zip .
- name: Upload ZIP to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: 'v${{ steps.version.outputs.content }}'
files: ./pjsip-macos.arm64.zip
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}


build-windows-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set Project src
run: echo "SRC_VERSION=2.14" >> $GITHUB_ENV
- name: Unzip PJ Project
run: unzip ./pjproject-${{ env.SRC_VERSION }}.zip
- name: get openssl
run: Invoke-WebRequest -Uri "https://mirror.firedaemon.com/OpenSSL/openssl-1.1.1q.zip" -OutFile ".\openssl.zip"
shell: powershell
- name: expand openssl
run: |
Expand-Archive -LiteralPath .\openssl.zip -DestinationPath .\openssl_build\; pwd
cd openssl_build\openssl-1.1\x86
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: get libvpx
run: Invoke-WebRequest -Uri "https://github.com/ShiftMediaProject/libvpx/releases/download/v1.8.2/libvpx_v1.8.2_msvc14.zip" -Outfile "libvpx.zip"
shell: powershell
- name: expand libvpx
run: |
Expand-Archive -LiteralPath .\libvpx.zip -DestinationPath .\libvpx_build\; pwd
cd libvpx_build
Add-Content ..\libvpx_dir.txt $pwd.Path
shell: powershell
- name: check libvpx folder
run: |
set /P LIBVPX_DIR=<libvpx_dir.txt
dir "%LIBVPX_DIR%\include"
dir "%LIBVPX_DIR%\lib\x86"
shell: cmd
- name: get libsdl
run: Invoke-WebRequest -Uri "https://github.com/ShiftMediaProject/SDL/releases/download/release-2.0.9/libsdl_release-2.0.9_msvc14.zip" -Outfile ".\libsdl.zip"
shell: powershell
- name: expand libsdl
run: |
Expand-Archive -LiteralPath .\libsdl.zip -DestinationPath .\libsdl_build\; pwd
cd libsdl_build
Add-Content ..\libsdl_dir.txt $pwd.Path
shell: powershell
- name: check libsdl folder
run: |
set /P LIBSDL_DIR=<libsdl_dir.txt
dir "%LIBSDL_DIR%\include\SDL"
dir "%LIBSDL_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 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 LIBVPX_DIR=<libvpx_dir.txt
set /P LIBSDL_DIR=<libsdl_dir.txt
call "%PROGRAMFILES%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
set INCLUDE=%INCLUDE%;%OPENSSL_DIR%\include;%LIBVPX_DIR%\include;%LIBSDL_DIR%\include\SDL
set LIB=%LIB%;%OPENSSL_DIR%\lib;%LIBVPX_DIR%\lib\x86;%LIBSDL_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 LIBVPX_DIR=<libvpx_dir.txt
set /P LIBSDL_DIR=<libsdl_dir.txt
cd tests/pjsua/tools
set INCLUDE=%INCLUDE%;%OPENSSL_DIR%\include;%LIBVPX_DIR%\include;%LIBSDL_DIR%\include\SDL
set LIB=%LIB%;%OPENSSL_DIR%\lib;%LIBVPX_DIR%\lib\x86;%LIBSDL_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 2.7 for pjsua test
uses: actions/setup-python@v2
with:
python-version: 2.7
- name: unit tests
run: |
$env:OPENSSL_DIR = Get-Content .\openssl_dir.txt
$env:LIBVPX_DIR = Get-Content .\libvpx_dir.txt
$env:LIBSDL_DIR = Get-Content .\libsdl_dir.txt
$env:PATH+=";$env:OPENSSL_DIR\bin;$env:LIBVPX_DIR\bin\x86;$env:LIBSDL_DIR\bin\x86;"
cd tests/pjsua; python runall.py
cd ../../pjlib/bin; ./pjlib-test-i386-Win32-vc14-Release.exe
cd ../../pjlib-util/bin; ./pjlib-util-test-i386-Win32-vc14-Release.exe
cd ../../pjmedia/bin/; ./pjmedia-test-i386-Win32-vc14-Release.exe
shell: powershell
1 change: 1 addition & 0 deletions .github/workflows/node-addon-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@