mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added WebRTC building to Github CI.
This commit is contained in:
parent
a911f2c0c3
commit
bc7925985c
6 changed files with 172 additions and 25 deletions
53
.github/workflows/linux.yml
vendored
53
.github/workflows/linux.yml
vendored
|
@ -95,7 +95,8 @@ jobs:
|
||||||
libgtk2.0-dev libice-dev libsm-dev libicu-dev libdrm-dev dh-autoreconf \
|
libgtk2.0-dev libice-dev libsm-dev libicu-dev libdrm-dev dh-autoreconf \
|
||||||
autoconf automake build-essential libxml2-dev libass-dev libfreetype6-dev \
|
autoconf automake build-essential libxml2-dev libass-dev libfreetype6-dev \
|
||||||
libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev \
|
libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev \
|
||||||
libvorbis-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-screensaver0-dev \
|
libvorbis-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev \
|
||||||
|
libxcb-screensaver0-dev libjpeg-dev \
|
||||||
libxcb-xfixes0-dev libxcb-keysyms1-dev libxcb-icccm4-dev libatspi2.0-dev \
|
libxcb-xfixes0-dev libxcb-keysyms1-dev libxcb-icccm4-dev libatspi2.0-dev \
|
||||||
libxcb-render-util0-dev libxcb-util0-dev libxcb-xkb-dev libxrender-dev \
|
libxcb-render-util0-dev libxcb-util0-dev libxcb-xkb-dev libxrender-dev \
|
||||||
libasound-dev libpulse-dev libxcb-sync0-dev libxcb-randr0-dev libegl1-mesa-dev \
|
libasound-dev libpulse-dev libxcb-sync0-dev libxcb-randr0-dev libegl1-mesa-dev \
|
||||||
|
@ -373,7 +374,7 @@ jobs:
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
sudo make DESTDIR="$LibrariesPath/openssl-cache" install_sw
|
sudo make DESTDIR="$LibrariesPath/openssl-cache" install_sw
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf $opensslDir
|
# rm -rf $opensslDir # Keep this folder for WebRTC.
|
||||||
- name: OpenSSL install.
|
- name: OpenSSL install.
|
||||||
run: |
|
run: |
|
||||||
cd $LibrariesPath
|
cd $LibrariesPath
|
||||||
|
@ -512,6 +513,54 @@ jobs:
|
||||||
mkdir -p breakpad/out/Default/
|
mkdir -p breakpad/out/Default/
|
||||||
cp breakpad-cache/dump_syms breakpad/out/Default/dump_syms
|
cp breakpad-cache/dump_syms breakpad/out/Default/dump_syms
|
||||||
|
|
||||||
|
- name: WebRTC cache.
|
||||||
|
id: cache-webrtc
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.LibrariesPath }}/webrtc
|
||||||
|
key: ${{ runner.OS }}-webrtc-${{ env.CACHE_KEY }}-${{ hashFiles('**/patches/webrtc/*') }}
|
||||||
|
- name: WebRTC.
|
||||||
|
if: steps.cache-webrtc.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $LibrariesPath
|
||||||
|
|
||||||
|
# # OpenSSL.
|
||||||
|
# opensslDir=openssl_${OPENSSL_VER}
|
||||||
|
# mkdir $opensslDir
|
||||||
|
# cp -R $OPENSSL_PREFIX/ $opensslDir/
|
||||||
|
# cd openssl-cache
|
||||||
|
# cp $(find . | grep libssl.a) $LibrariesPath/$opensslDir
|
||||||
|
# cp $(find . | grep libcrypto.a) $LibrariesPath/$opensslDir
|
||||||
|
|
||||||
|
# cd $LibrariesPath
|
||||||
|
|
||||||
|
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
export PATH=`pwd`/depot_tools:$PATH
|
||||||
|
|
||||||
|
mkdir webrtc
|
||||||
|
cd webrtc
|
||||||
|
cp ../patches/webrtc/.gclient ./
|
||||||
|
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
||||||
|
gclient sync --no-history
|
||||||
|
|
||||||
|
applyPatch() {
|
||||||
|
cd $LibrariesPath/webrtc/$1
|
||||||
|
git apply $LibrariesPath/patches/webrtc/$(basename $1).diff
|
||||||
|
}
|
||||||
|
applyPatch src
|
||||||
|
applyPatch src/build
|
||||||
|
applyPatch src/third_party
|
||||||
|
applyPatch src/third_party/libsrtp
|
||||||
|
|
||||||
|
cd $LibrariesPath/webrtc/src
|
||||||
|
../../patches/webrtc/configure.sh
|
||||||
|
|
||||||
|
ninja -C out/Debug webrtc
|
||||||
|
|
||||||
|
# Cleanup.
|
||||||
|
../../patches/webrtc/cleanup_webrtc.sh
|
||||||
|
rm -rf $LibrariesPath/openssl_${OPENSSL_VER}
|
||||||
|
|
||||||
- name: Telegram Desktop build.
|
- name: Telegram Desktop build.
|
||||||
if: env.ONLY_CACHE == 'false'
|
if: env.ONLY_CACHE == 'false'
|
||||||
run: |
|
run: |
|
||||||
|
|
39
.github/workflows/mac.yml
vendored
39
.github/workflows/mac.yml
vendored
|
@ -419,8 +419,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd $LibrariesPath
|
cd $LibrariesPath
|
||||||
|
|
||||||
git clone git://code.qt.io/qt/qt5.git qt$QT
|
git clone git://code.qt.io/qt/qt5.git qt_$QT
|
||||||
cd qt$QT
|
cd qt_$QT
|
||||||
perl init-repository --module-subset=qtbase,qtimageformats
|
perl init-repository --module-subset=qtbase,qtimageformats
|
||||||
git checkout v5.12.8
|
git checkout v5.12.8
|
||||||
git submodule update qtbase
|
git submodule update qtbase
|
||||||
|
@ -449,6 +449,41 @@ jobs:
|
||||||
make clean
|
make clean
|
||||||
cp -r $QT_PREFIX $LibrariesPath/qt-cache
|
cp -r $QT_PREFIX $LibrariesPath/qt-cache
|
||||||
|
|
||||||
|
- name: WebRTC cache.
|
||||||
|
id: cache-webrtc
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.LibrariesPath }}/webrtc
|
||||||
|
key: ${{ runner.OS }}-webrtc-${{ env.CACHE_KEY }}-${{ hashFiles('**/patches/webrtc/*') }}
|
||||||
|
- name: WebRTC.
|
||||||
|
if: steps.cache-webrtc.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $LibrariesPath
|
||||||
|
|
||||||
|
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
export PATH=`pwd`/depot_tools:$PATH
|
||||||
|
|
||||||
|
mkdir webrtc
|
||||||
|
cd webrtc
|
||||||
|
cp ../patches/webrtc/.gclient ./
|
||||||
|
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
||||||
|
gclient sync --no-history
|
||||||
|
|
||||||
|
applyPatch() {
|
||||||
|
cd $LibrariesPath/webrtc/$1
|
||||||
|
git apply $LibrariesPath/patches/webrtc/$(basename $1).diff
|
||||||
|
}
|
||||||
|
applyPatch src
|
||||||
|
applyPatch src/build
|
||||||
|
applyPatch src/third_party
|
||||||
|
applyPatch src/third_party/libsrtp
|
||||||
|
|
||||||
|
cd $LibrariesPath/webrtc/src
|
||||||
|
../../patches/webrtc/configure.sh
|
||||||
|
|
||||||
|
ninja -C out/Debug webrtc
|
||||||
|
../../patches/webrtc/cleanup_webrtc.sh
|
||||||
|
|
||||||
- name: Telegram Desktop build.
|
- name: Telegram Desktop build.
|
||||||
if: env.ONLY_CACHE == 'false'
|
if: env.ONLY_CACHE == 'false'
|
||||||
run: |
|
run: |
|
||||||
|
|
89
.github/workflows/win.yml
vendored
89
.github/workflows/win.yml
vendored
|
@ -60,6 +60,7 @@ jobs:
|
||||||
VC: "call vcvars32.bat && cd Libraries"
|
VC: "call vcvars32.bat && cd Libraries"
|
||||||
GIT: "https://github.com"
|
GIT: "https://github.com"
|
||||||
QT: "5_12_8"
|
QT: "5_12_8"
|
||||||
|
QT_VER: "5.12.8"
|
||||||
OPENSSL_VER: "1_1_1"
|
OPENSSL_VER: "1_1_1"
|
||||||
UPLOAD_ARTIFACT: "false"
|
UPLOAD_ARTIFACT: "false"
|
||||||
ONLY_CACHE: "false"
|
ONLY_CACHE: "false"
|
||||||
|
@ -121,6 +122,20 @@ jobs:
|
||||||
cd Patches
|
cd Patches
|
||||||
eval $checkoutCommit
|
eval $checkoutCommit
|
||||||
|
|
||||||
|
- name: Find any version of Python 2.
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo Find any version of Python 2.
|
||||||
|
for /D %%a in (C:\hostedtoolcache\windows\Python\2.*) do (
|
||||||
|
SET PY2=%%a\x64
|
||||||
|
)
|
||||||
|
if [%PY2%] == [] (
|
||||||
|
echo Python 2 is not found.
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
echo Found %PY2%.
|
||||||
|
echo ::set-env name=PY2::%PY2%
|
||||||
|
|
||||||
- name: LZMA.
|
- name: LZMA.
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
|
@ -214,16 +229,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd %LibrariesPath%
|
cd %LibrariesPath%
|
||||||
|
|
||||||
echo Find any version of Python 2.
|
|
||||||
for /D %%a in (C:\hostedtoolcache\windows\Python\2.*) do (
|
|
||||||
SET PY2=%%a\x64
|
|
||||||
)
|
|
||||||
IF [%PY2%] == [] (
|
|
||||||
echo Python 2 is not found.
|
|
||||||
exit 1
|
|
||||||
)
|
|
||||||
echo Found %PY2%.
|
|
||||||
|
|
||||||
git clone %GIT%/telegramdesktop/gyp.git
|
git clone %GIT%/telegramdesktop/gyp.git
|
||||||
cd gyp
|
cd gyp
|
||||||
SET PATH=%PY2%;%cd%;%PATH%
|
SET PATH=%PY2%;%cd%;%PATH%
|
||||||
|
@ -293,7 +298,7 @@ jobs:
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ env.LibrariesPath }}/Qt-5.12.8
|
path: ${{ env.LibrariesPath }}/Qt-${{ env.QT_VER }}
|
||||||
key: ${{ runner.OS }}-qt-${{ env.CACHE_KEY }}-${{ hashFiles('**/qtbase_5_12_8/*') }}
|
key: ${{ runner.OS }}-qt-${{ env.CACHE_KEY }}-${{ hashFiles('**/qtbase_5_12_8/*') }}
|
||||||
- name: Configure Qt 5.12.8.
|
- name: Configure Qt 5.12.8.
|
||||||
if: steps.cache-qt.outputs.cache-hit != 'true'
|
if: steps.cache-qt.outputs.cache-hit != 'true'
|
||||||
|
@ -304,7 +309,7 @@ jobs:
|
||||||
git clone git://code.qt.io/qt/qt5.git qt_%QT%
|
git clone git://code.qt.io/qt/qt5.git qt_%QT%
|
||||||
cd qt_%QT%
|
cd qt_%QT%
|
||||||
perl init-repository --module-subset=qtbase,qtimageformats
|
perl init-repository --module-subset=qtbase,qtimageformats
|
||||||
git checkout v5.12.8
|
git checkout v%QT_VER%
|
||||||
git submodule update qtbase
|
git submodule update qtbase
|
||||||
git submodule update qtimageformats
|
git submodule update qtimageformats
|
||||||
cd qtbase
|
cd qtbase
|
||||||
|
@ -315,7 +320,7 @@ jobs:
|
||||||
SET LIBS=libcrypto.lib Ws2_32.lib Gdi32.lib Advapi32.lib Crypt32.lib User32.lib
|
SET LIBS=libcrypto.lib Ws2_32.lib Gdi32.lib Advapi32.lib Crypt32.lib User32.lib
|
||||||
|
|
||||||
configure ^
|
configure ^
|
||||||
-prefix "%LibrariesPath%\Qt-5.12.8" ^
|
-prefix "%LibrariesPath%\Qt-%QT_VER%" ^
|
||||||
-debug ^
|
-debug ^
|
||||||
-force-debug-info ^
|
-force-debug-info ^
|
||||||
-opensource ^
|
-opensource ^
|
||||||
|
@ -343,6 +348,64 @@ jobs:
|
||||||
cd ..
|
cd ..
|
||||||
rmdir /S /Q qt_%QT%
|
rmdir /S /Q qt_%QT%
|
||||||
|
|
||||||
|
- name: WebRTC cache.
|
||||||
|
id: cache-webrtc
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.LibrariesPath }}/webrtc
|
||||||
|
key: ${{ runner.OS }}-webrtc-2-${{ env.CACHE_KEY }}-${{ hashFiles('**/patches/webrtc/*') }}
|
||||||
|
- name: WebRTC.
|
||||||
|
if: steps.cache-webrtc.outputs.cache-hit != 'true'
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
%VC%
|
||||||
|
|
||||||
|
# Qt libjpeg.
|
||||||
|
mkdir qt_%QT%
|
||||||
|
cd qt_%QT%
|
||||||
|
git clone -b %QT_VER% https://github.com/qt/qtbase
|
||||||
|
|
||||||
|
move qtbase\src\3rdparty\libjpeg ..
|
||||||
|
cd ..
|
||||||
|
dir
|
||||||
|
rmdir /S /Q qt_%QT%
|
||||||
|
mkdir qt_%QT%\qtbase\src\3rdparty\
|
||||||
|
move libjpeg qt_%QT%\qtbase\src\3rdparty\
|
||||||
|
|
||||||
|
# Depot tools.
|
||||||
|
cd %LibrariesPath%
|
||||||
|
|
||||||
|
curl -O https://storage.googleapis.com/chrome-infra/depot_tools.zip
|
||||||
|
7z x depot_tools.zip
|
||||||
|
cd depot_tools
|
||||||
|
SET PATH=%PY2%;%cd%;%PATH%
|
||||||
|
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||||
|
|
||||||
|
# WebRTC.
|
||||||
|
cd %LibrariesPath%
|
||||||
|
|
||||||
|
mkdir webrtc
|
||||||
|
cd webrtc
|
||||||
|
copy ..\patches\webrtc\.gclient .gclient
|
||||||
|
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
||||||
|
gclient sync --no-history
|
||||||
|
cd src
|
||||||
|
git apply ..\..\patches\webrtc\src.diff
|
||||||
|
cd build
|
||||||
|
git apply ..\..\..\patches\webrtc\build.diff
|
||||||
|
cd ..\third_party
|
||||||
|
git apply ..\..\..\patches\webrtc\third_party.diff
|
||||||
|
cd libsrtp
|
||||||
|
git apply ..\..\..\..\patches\webrtc\libsrtp.diff
|
||||||
|
cd ..\..
|
||||||
|
..\..\patches\webrtc\configure.bat
|
||||||
|
ninja -C out/Debug webrtc
|
||||||
|
|
||||||
|
# Cleanup.
|
||||||
|
..\..\patches\webrtc\cleanup_webrtc.bat
|
||||||
|
cd %LibrariesPath%
|
||||||
|
rmdir /S /Q qt_%QT%
|
||||||
|
|
||||||
- name: Read defines.
|
- name: Read defines.
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -54,7 +54,7 @@ Go to ***BuildPath*** and run
|
||||||
|
|
||||||
git clone https://github.com/desktop-app/patches.git
|
git clone https://github.com/desktop-app/patches.git
|
||||||
cd patches
|
cd patches
|
||||||
git checkout deeea06
|
git checkout 08351e3
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
git clone https://github.com/xiph/opus
|
git clone https://github.com/xiph/opus
|
||||||
|
@ -280,7 +280,7 @@ Go to ***BuildPath*** and run
|
||||||
cd webrtc
|
cd webrtc
|
||||||
cp ../patches/webrtc/.gclient ./
|
cp ../patches/webrtc/.gclient ./
|
||||||
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
||||||
gclient sync
|
gclient sync --no-history
|
||||||
cd src
|
cd src
|
||||||
git apply ../../patches/webrtc/src.diff
|
git apply ../../patches/webrtc/src.diff
|
||||||
cd build
|
cd build
|
||||||
|
|
|
@ -34,7 +34,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
|
||||||
cd ThirdParty
|
cd ThirdParty
|
||||||
git clone https://github.com/desktop-app/patches.git
|
git clone https://github.com/desktop-app/patches.git
|
||||||
cd patches
|
cd patches
|
||||||
git checkout deeea06
|
git checkout 08351e3
|
||||||
cd ../
|
cd ../
|
||||||
git clone https://chromium.googlesource.com/external/gyp
|
git clone https://chromium.googlesource.com/external/gyp
|
||||||
cd gyp
|
cd gyp
|
||||||
|
@ -67,7 +67,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
|
||||||
|
|
||||||
git clone https://github.com/desktop-app/patches.git
|
git clone https://github.com/desktop-app/patches.git
|
||||||
cd patches
|
cd patches
|
||||||
git checkout deeea06
|
git checkout 08351e3
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
git clone https://github.com/desktop-app/lzma.git
|
git clone https://github.com/desktop-app/lzma.git
|
||||||
|
@ -169,7 +169,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
|
||||||
cd webrtc
|
cd webrtc
|
||||||
copy ..\patches\webrtc\.gclient .gclient
|
copy ..\patches\webrtc\.gclient .gclient
|
||||||
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
||||||
gclient sync
|
gclient sync --no-history
|
||||||
cd src
|
cd src
|
||||||
git apply ../../patches/webrtc/src.diff
|
git apply ../../patches/webrtc/src.diff
|
||||||
cd build
|
cd build
|
||||||
|
|
|
@ -29,7 +29,7 @@ Go to ***BuildPath*** and run
|
||||||
|
|
||||||
git clone https://github.com/desktop-app/patches.git
|
git clone https://github.com/desktop-app/patches.git
|
||||||
cd patches
|
cd patches
|
||||||
git checkout deeea06
|
git checkout 08351e3
|
||||||
cd ../
|
cd ../
|
||||||
git clone https://chromium.googlesource.com/external/gyp
|
git clone https://chromium.googlesource.com/external/gyp
|
||||||
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
@ -47,7 +47,7 @@ Go to ***BuildPath*** and run
|
||||||
|
|
||||||
git clone https://github.com/desktop-app/patches.git
|
git clone https://github.com/desktop-app/patches.git
|
||||||
cd patches
|
cd patches
|
||||||
git checkout deeea06
|
git checkout 08351e3
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
git clone https://git.tukaani.org/xz.git
|
git clone https://git.tukaani.org/xz.git
|
||||||
|
@ -276,7 +276,7 @@ Go to ***BuildPath*** and run
|
||||||
cd webrtc
|
cd webrtc
|
||||||
cp ../patches/webrtc/.gclient ./
|
cp ../patches/webrtc/.gclient ./
|
||||||
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
git clone https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
||||||
gclient sync
|
gclient sync --no-history
|
||||||
cd src
|
cd src
|
||||||
git apply ../../patches/webrtc/src.diff
|
git apply ../../patches/webrtc/src.diff
|
||||||
cd build
|
cd build
|
||||||
|
|
Loading…
Add table
Reference in a new issue