Fixed Github CI Windows build.
This commit is contained in:
parent
437d35d8c4
commit
fff42a664c
|
@ -52,28 +52,34 @@ jobs:
|
||||||
- ""
|
- ""
|
||||||
env:
|
env:
|
||||||
SDK: "10.0.18362.0"
|
SDK: "10.0.18362.0"
|
||||||
VC: "call vcvars32.bat && cd Libraries"
|
|
||||||
GIT: "https://github.com"
|
GIT: "https://github.com"
|
||||||
QT: "5_15_2"
|
|
||||||
QT_VER: "5.15.2"
|
QT_VER: "5.15.2"
|
||||||
OPENSSL_VER: "1_1_1"
|
OPENSSL_VER: "1_1_1"
|
||||||
UPLOAD_ARTIFACT: "false"
|
UPLOAD_ARTIFACT: "false"
|
||||||
ONLY_CACHE: "false"
|
ONLY_CACHE: "false"
|
||||||
MANUAL_CACHING: "2"
|
MANUAL_CACHING: "0"
|
||||||
DOC_PATH: "docs/building-win.md"
|
DOC_PATH: "docs/building-win.md"
|
||||||
AUTO_CACHING: "1"
|
AUTO_CACHING: "1"
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
working-directory: Libraries
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get repository name.
|
- name: Get repository name.
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: ilammy/msvc-dev-cmd@v1.9.0
|
||||||
|
name: x86 Native Tools Command Prompt.
|
||||||
|
with:
|
||||||
|
arch: win32
|
||||||
|
|
||||||
- name: Set up environment paths.
|
- name: Set up environment paths.
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
echo "C:\\Strawberry\\perl\\bin\\" >> $GITHUB_PATH
|
echo "C:\\Strawberry\\perl\\bin\\" >> $GITHUB_PATH
|
||||||
echo "C:\\Program Files\\NASM\\" >> $GITHUB_PATH
|
echo "C:\\Program Files\\NASM\\" >> $GITHUB_PATH
|
||||||
|
@ -84,6 +90,8 @@ jobs:
|
||||||
p=`pwd | sed 's#^/[d]#d:#g' |sed 's#/#\\\\#g'`
|
p=`pwd | sed 's#^/[d]#d:#g' |sed 's#/#\\\\#g'`
|
||||||
echo "LibrariesPath=$p" >> $GITHUB_ENV
|
echo "LibrariesPath=$p" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
echo "QT=${QT_VER//./_}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Save msbuild version.
|
- name: Save msbuild version.
|
||||||
run: |
|
run: |
|
||||||
call vcvars32.bat
|
call vcvars32.bat
|
||||||
|
@ -97,6 +105,7 @@ jobs:
|
||||||
|
|
||||||
- name: Generate cache key.
|
- name: Generate cache key.
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
curl -o $LibrariesPath/tg_owt-version.json https://api.github.com/repos/desktop-app/tg_owt/git/refs/heads/master
|
curl -o $LibrariesPath/tg_owt-version.json https://api.github.com/repos/desktop-app/tg_owt/git/refs/heads/master
|
||||||
curl -o $LibrariesPath/tg_angle-version.json https://api.github.com/repos/desktop-app/tg_angle/git/refs/heads/master
|
curl -o $LibrariesPath/tg_angle-version.json https://api.github.com/repos/desktop-app/tg_angle/git/refs/heads/master
|
||||||
|
@ -108,7 +117,10 @@ jobs:
|
||||||
echo "CACHE_KEY=`md5sum CACHE_KEY.txt | awk '{ print $1 }'`" >> $GITHUB_ENV
|
echo "CACHE_KEY=`md5sum CACHE_KEY.txt | awk '{ print $1 }'`" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Choco installs.
|
- name: Choco installs.
|
||||||
run: choco install --no-progress -y nasm yasm jom ninja
|
run: |
|
||||||
|
choco install --allow-empty-checksums --no-progress -y yasm
|
||||||
|
choco install --no-progress -y nasm jom ninja
|
||||||
|
python -m pip install pywin32
|
||||||
|
|
||||||
- name: NuGet sources.
|
- name: NuGet sources.
|
||||||
run: |
|
run: |
|
||||||
|
@ -117,6 +129,7 @@ jobs:
|
||||||
|
|
||||||
- name: Patches.
|
- name: Patches.
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
echo "Find necessary commit from doc."
|
echo "Find necessary commit from doc."
|
||||||
checkoutCommit=$(grep -A 1 "cd patches" $REPO_NAME/$DOC_PATH | sed -n 2p)
|
checkoutCommit=$(grep -A 1 "cd patches" $REPO_NAME/$DOC_PATH | sed -n 2p)
|
||||||
|
@ -139,8 +152,6 @@ jobs:
|
||||||
|
|
||||||
- name: LZMA.
|
- name: LZMA.
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone %GIT%/telegramdesktop/lzma.git
|
git clone %GIT%/telegramdesktop/lzma.git
|
||||||
cd lzma
|
cd lzma
|
||||||
cd C\Util\LzmaLib
|
cd C\Util\LzmaLib
|
||||||
|
@ -155,8 +166,6 @@ jobs:
|
||||||
- name: OpenSSL.
|
- name: OpenSSL.
|
||||||
if: steps.cache-openssl.outputs.cache-hit != 'true'
|
if: steps.cache-openssl.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone %GIT%/openssl/openssl.git openssl_%OPENSSL_VER%
|
git clone %GIT%/openssl/openssl.git openssl_%OPENSSL_VER%
|
||||||
cd openssl_%OPENSSL_VER%
|
cd openssl_%OPENSSL_VER%
|
||||||
git checkout OpenSSL_%OPENSSL_VER%-stable
|
git checkout OpenSSL_%OPENSSL_VER%-stable
|
||||||
|
@ -180,8 +189,6 @@ jobs:
|
||||||
|
|
||||||
- name: Zlib.
|
- name: Zlib.
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone %GIT%/telegramdesktop/zlib.git
|
git clone %GIT%/telegramdesktop/zlib.git
|
||||||
cd zlib
|
cd zlib
|
||||||
git checkout tdesktop
|
git checkout tdesktop
|
||||||
|
@ -191,8 +198,6 @@ jobs:
|
||||||
- name: MozJPEG.
|
- name: MozJPEG.
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone -b v4.0.1-rc2 %GIT%/mozilla/mozjpeg.git
|
git clone -b v4.0.1-rc2 %GIT%/mozilla/mozjpeg.git
|
||||||
cd mozjpeg
|
cd mozjpeg
|
||||||
cmake . ^
|
cmake . ^
|
||||||
|
@ -211,8 +216,6 @@ jobs:
|
||||||
- name: OpenAL Soft.
|
- name: OpenAL Soft.
|
||||||
if: steps.cache-openal.outputs.cache-hit != 'true'
|
if: steps.cache-openal.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone -b openal-soft-1.21.0 --depth=1 %GIT%/kcat/openal-soft.git
|
git clone -b openal-soft-1.21.0 --depth=1 %GIT%/kcat/openal-soft.git
|
||||||
cd openal-soft\build
|
cd openal-soft\build
|
||||||
cmake .. ^
|
cmake .. ^
|
||||||
|
@ -236,8 +239,6 @@ jobs:
|
||||||
GYP_MSVS_VERSION: 2019
|
GYP_MSVS_VERSION: 2019
|
||||||
if: steps.cache-breakpad.outputs.cache-hit != 'true'
|
if: steps.cache-breakpad.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd %LibrariesPath%
|
|
||||||
|
|
||||||
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%
|
||||||
|
@ -271,8 +272,6 @@ jobs:
|
||||||
- name: Opus.
|
- name: Opus.
|
||||||
if: steps.cache-opus.outputs.cache-hit != 'true'
|
if: steps.cache-opus.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone %GIT%/telegramdesktop/opus.git
|
git clone %GIT%/telegramdesktop/opus.git
|
||||||
cd opus
|
cd opus
|
||||||
git checkout tdesktop
|
git checkout tdesktop
|
||||||
|
@ -281,10 +280,7 @@ jobs:
|
||||||
msbuild -m opus.sln /property:Configuration=Release /property:Platform="Win32"
|
msbuild -m opus.sln /property:Configuration=Release /property:Platform="Win32"
|
||||||
|
|
||||||
- name: Rnnoise.
|
- name: Rnnoise.
|
||||||
shell: cmd
|
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone %GIT%/desktop-app/rnnoise.git
|
git clone %GIT%/desktop-app/rnnoise.git
|
||||||
mkdir rnnoise\out
|
mkdir rnnoise\out
|
||||||
cd rnnoise\out
|
cd rnnoise\out
|
||||||
|
@ -300,7 +296,6 @@ jobs:
|
||||||
- name: FFmpeg.
|
- name: FFmpeg.
|
||||||
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
|
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
choco install --no-progress -y msys2
|
choco install --no-progress -y msys2
|
||||||
|
|
||||||
git clone %GIT%/FFmpeg/FFmpeg.git ffmpeg
|
git clone %GIT%/FFmpeg/FFmpeg.git ffmpeg
|
||||||
|
@ -321,8 +316,6 @@ jobs:
|
||||||
- name: Angle.
|
- name: Angle.
|
||||||
if: steps.cache-angle.outputs.cache-hit != 'true'
|
if: steps.cache-angle.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone --recursive %GIT%/desktop-app/tg_angle.git
|
git clone --recursive %GIT%/desktop-app/tg_angle.git
|
||||||
mkdir tg_angle\out\Debug
|
mkdir tg_angle\out\Debug
|
||||||
cd tg_angle\out\Debug
|
cd tg_angle\out\Debug
|
||||||
|
@ -348,8 +341,6 @@ jobs:
|
||||||
- name: Configure Qt 5.15.2.
|
- name: Configure Qt 5.15.2.
|
||||||
if: steps.cache-qt.outputs.cache-hit != 'true'
|
if: steps.cache-qt.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
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
|
||||||
|
@ -401,7 +392,6 @@ jobs:
|
||||||
- name: Qt 5.15.2 build.
|
- name: Qt 5.15.2 build.
|
||||||
if: steps.cache-qt.outputs.cache-hit != 'true'
|
if: steps.cache-qt.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
cd qt_%QT%
|
cd qt_%QT%
|
||||||
|
|
||||||
jom -j%NUMBER_OF_PROCESSORS%
|
jom -j%NUMBER_OF_PROCESSORS%
|
||||||
|
@ -419,8 +409,6 @@ jobs:
|
||||||
- name: WebRTC.
|
- name: WebRTC.
|
||||||
if: steps.cache-webrtc.outputs.cache-hit != 'true'
|
if: steps.cache-webrtc.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
%VC%
|
|
||||||
|
|
||||||
git clone --recursive %GIT%/desktop-app/tg_owt.git
|
git clone --recursive %GIT%/desktop-app/tg_owt.git
|
||||||
mkdir tg_owt\out\Debug
|
mkdir tg_owt\out\Debug
|
||||||
cd tg_owt\out\Debug
|
cd tg_owt\out\Debug
|
||||||
|
@ -457,10 +445,12 @@ jobs:
|
||||||
echo "TDESKTOP_BUILD_DEFINE=$DEFINE" >> $GITHUB_ENV
|
echo "TDESKTOP_BUILD_DEFINE=$DEFINE" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Free up some disk space.
|
- name: Free up some disk space.
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
run: del /S *.pdb
|
run: del /S *.pdb
|
||||||
|
|
||||||
- name: Telegram Desktop build.
|
- name: Telegram Desktop build.
|
||||||
if: env.ONLY_CACHE == 'false'
|
if: env.ONLY_CACHE == 'false'
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
cd %REPO_NAME%\Telegram
|
cd %REPO_NAME%\Telegram
|
||||||
|
|
||||||
|
@ -478,6 +468,7 @@ jobs:
|
||||||
|
|
||||||
- name: Move artifact.
|
- name: Move artifact.
|
||||||
if: env.UPLOAD_ARTIFACT == 'true'
|
if: env.UPLOAD_ARTIFACT == 'true'
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
cd %REPO_NAME%\out\Debug
|
cd %REPO_NAME%\out\Debug
|
||||||
mkdir artifact
|
mkdir artifact
|
||||||
|
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit 24543509c1cbec834f463229d204d21494831359
|
Subproject commit 4d44d822e01b3b5fbec3ce824e01f56aa35d7f72
|
Loading…
Reference in New Issue