From fc5529d4bcb7cb2df257e6f835e712a28ba078cb Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 11 May 2020 11:19:04 +0400 Subject: [PATCH 1/2] Use the same Opus version as static binary Use Ninja generator Debug build in the test AppImage action should be used --- .github/workflows/appimage.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 2ef0ff0a3..be98173de 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -101,7 +101,7 @@ jobs: sudo apt-get update && \ sudo apt-get install libice-dev libsm-dev libicu-dev liblzma-dev zlib1g-dev \ git wget autoconf automake build-essential libtool pkg-config bison \ - libopus-dev libasound2-dev libpulse-dev portaudio19-dev libdrm-dev libfuse2 \ + libasound2-dev libpulse-dev portaudio19-dev libdrm-dev libfuse2 \ libgtk-3-dev libgtk2.0-dev libatspi2.0-dev libgl1-mesa-dev libegl1-mesa-dev \ libffi-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-xfixes0-dev \ libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-util0-dev \ @@ -264,6 +264,27 @@ jobs: cd ../.. rm -rf dav1d + - name: Opus cache. + id: cache-opus + uses: actions/cache@v1 + with: + path: ${{ env.LibrariesPath }}/opus + key: ${{ runner.OS }}-opus-${{ env.CACHE_KEY }} + - name: Opus. + if: steps.cache-opus.outputs.cache-hit != 'true' + run: | + cd $LibrariesPath + + git clone -b v1.3 --depth=1 $GIT/xiph/opus + cd opus + ./autogen.sh + ./configure + make -j$(nproc) + - name: Opus install. + run: | + cd $LibrariesPath/opus + sudo make install + - name: FFmpeg cache. id: cache-ffmpeg uses: actions/cache@v1 @@ -541,14 +562,16 @@ jobs: fi ./configure.sh \ + -GNinja \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_CXX_FLAGS="-s" \ -DTDESKTOP_API_TEST=ON \ -DDESKTOP_APP_USE_PACKAGED_LAZY=ON \ -DDESKTOP_APP_USE_PACKAGED_FONTS=OFF \ -DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=OFF \ $DEFINE - cd ../out/Release + cd ../out/Debug cmake --build . -- -j$(nproc) DESTDIR=../../AppDir cmake --install . From d3528bce9948a9e064e9f336f47ce8d74a1fd70a Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 11 May 2020 15:07:07 +0400 Subject: [PATCH 2/2] Use Ninja backend in Windows action --- .github/workflows/win.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index b0a4a1757..abad4fe86 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -363,23 +363,26 @@ jobs: if: env.ONLY_CACHE == 'false' shell: cmd run: | - cd %REPO_NAME%\Telegram + cd %REPO_NAME% + call vcvars32.bat - call configure.bat ^ + cmake -B build . ^ + -GNinja ^ + -DCMAKE_BUILD_TYPE=Debug ^ + -DCMAKE_C_COMPILER=cl ^ + -DCMAKE_CXX_COMPILER=cl ^ -D TDESKTOP_API_TEST=ON ^ -D DESKTOP_APP_USE_PACKAGED=OFF ^ %TDESKTOP_BUILD_DEFINE% ^ -DCMAKE_SYSTEM_VERSION=%SDK% - call vcvars32.bat - cd ..\out - msbuild -m Telegram.sln /nologo /p:Configuration=Debug,Platform=Win32 + cmake --build build - name: Move artifact. if: env.UPLOAD_ARTIFACT == 'true' shell: cmd run: | - cd %REPO_NAME%\out\Debug + cd %REPO_NAME%\build\bin mkdir artifact move Kotatogram.exe artifact/ move Updater.exe artifact/ @@ -388,4 +391,4 @@ jobs: if: env.UPLOAD_ARTIFACT == 'true' with: name: ${{ env.ARTIFACT_NAME }} - path: ${{ env.REPO_NAME }}\out\Debug\artifact\ + path: ${{ env.REPO_NAME }}\build\bin\artifact\