.github/workflows/linux.yml #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- 'master' | |
- 'try' | |
paths: | |
- '.github/workflows/linux.yml' | |
- 'override/**' | |
workflow_dispatch: | |
schedule: | |
- cron: '20 20 * * *' | |
jobs: | |
build-telegram-qt-5: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/${{ github.repository }}/arch_env:latest | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Check out CI repository code | |
uses: actions/checkout@v4 | |
- name: Check out tdesktop repository code | |
uses: actions/checkout@v4 | |
with: | |
repository: 'telegramdesktop/tdesktop' | |
path: tdesktop | |
submodules: recursive | |
fetch-depth: 2 | |
- name: Check out tg_owt tree | |
uses: actions/checkout@v4 | |
with: | |
repository: 'desktop-app/tg_owt' | |
path: tg_owt | |
submodules: recursive | |
fetch-depth: 1 | |
- name: Check out aosc-os-abbs tree | |
uses: actions/checkout@v4 | |
with: | |
repository: 'AOSC-Dev/aosc-os-abbs' | |
path: TREE | |
fetch-depth: 1 | |
- name: Install tg_owt | |
run: | | |
cd tg_owt | |
mkdir build | |
cd build | |
cmake .. -GNinja -DBUILD_SHARED_LIBS=OFF \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DTG_OWT_DLOPEN_PIPEWIRE=OFF | |
ninja | |
ninja install | |
- name: Patch tdesktop | |
run: | | |
cp -r TREE/app-web/telegram-desktop/autobuild/patches ./ | |
if [ "$(ls -A override/*.patch 2> /dev/null)" ]; then | |
cp override/*.patch patches | |
else | |
echo '[info] no additional patches found' | |
fi | |
cd tdesktop | |
for i in ../patches/*; do patch -Np1 < $i; done | |
- name: Build tdesktop | |
run: | | |
cd tdesktop | |
mkdir build | |
cd build | |
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX='/usr' \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DDESKTOP_APP_SPECIAL_TARGET= \ | |
-DTDESKTOP_LAUNCHER_BASENAME=telegramdesktop \ | |
-DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=OFF \ | |
-DDESKTOP_APP_USE_PACKAGED=OFF \ | |
-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF \ | |
-DQT_VERSION_MAJOR=5 \ | |
-DTDESKTOP_API_ID=17349 \ | |
-DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb | |
ninja | |
env DESTDIR=$PWD/abdist ninja install | |
cd abdist | |
strip usr/bin/telegram-desktop | |
tar cJf ../../../tdesktop-dev.tar.xz * | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tdesktop-dev-amd64-archlinux | |
path: tdesktop-dev.tar.xz |