From e4311411af5d483a5705af9560732cf23edd0dac Mon Sep 17 00:00:00 2001 From: solopasha Date: Fri, 6 Jan 2023 18:40:34 +0300 Subject: [PATCH] build ayugram --- .github/workflows/ayugram.yml | 37 +++++++++++++++++++ .gitignore | 3 ++ ...ram.desktop.yml => com.ayugram.desktop.yml | 30 +++++---------- 3 files changed, 49 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/ayugram.yml create mode 100644 .gitignore rename org.telegram.desktop.yml => com.ayugram.desktop.yml (96%) diff --git a/.github/workflows/ayugram.yml b/.github/workflows/ayugram.yml new file mode 100644 index 0000000..197dcf5 --- /dev/null +++ b/.github/workflows/ayugram.yml @@ -0,0 +1,37 @@ +on: + push: + workflow_dispatch: +name: CI +jobs: + flatpak: + name: 'Flatpak' + runs-on: ubuntu-latest + container: + image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08 + options: --privileged + steps: + - uses: actions/checkout@v4 + with: + submodules: 'true' + + - name: Restore cache + id: cache + uses: actions/cache/restore@v4 + with: + path: .flatpak-builder + key: ayugram-flatpak-${{ github.sha }} + restore-keys: ayugram-flatpak- + + - uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3 + with: + bundle: ayugram.flatpak + manifest-path: com.ayugram.desktop.yml + cache: false + + - name: Save cache + id: cache-save + uses: actions/cache/save@v4 + if: always() + with: + path: .flatpak-builder + key: ${{ steps.cache.outputs.cache-primary-key }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2d8ba78 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.flatpak-builder/ +.vscode/ +repo/ diff --git a/org.telegram.desktop.yml b/com.ayugram.desktop.yml similarity index 96% rename from org.telegram.desktop.yml rename to com.ayugram.desktop.yml index 61ef706..6c6b345 100644 --- a/org.telegram.desktop.yml +++ b/com.ayugram.desktop.yml @@ -1,16 +1,14 @@ -id: org.telegram.desktop +id: com.ayugram.desktop runtime: org.freedesktop.Platform runtime-version: '23.08' sdk: org.freedesktop.Sdk -command: telegram-desktop -rename-icon: telegram +command: ayugram-desktop +rename-icon: ayugram finish-args: - --share=ipc - --share=network - --socket=wayland - - --socket=fallback-x11 - --socket=pulseaudio - - --device=all - --talk-name=org.gnome.Mutter.IdleMonitor - --talk-name=org.kde.StatusNotifierWatcher - --talk-name=com.canonical.AppMenu.Registrar @@ -38,8 +36,10 @@ cleanup-commands: - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg - mkdir -p ${FLATPAK_DEST}/lib/webview build-options: - cflags: -DNDEBUG - cxxflags: -DNDEBUG + strip: true + no-debuginfo: true + cflags: -DNDEBUG -g0 + cxxflags: -DNDEBUG -g0 append-path: /usr/lib/sdk/llvm16/bin append-ld-library-path: /usr/lib/sdk/llvm16/lib cleanup: @@ -528,11 +528,6 @@ modules: - name: telegram-desktop buildsystem: cmake-ninja builddir: true - build-options: - arch: - aarch64: - cflags: -g1 - cxxflags: -g1 config-opts: - -DCMAKE_BUILD_TYPE=None - -DTDESKTOP_API_ID=611335 @@ -540,15 +535,8 @@ modules: - -DDESKTOP_APP_USE_PACKAGED_LAZY=ON sources: - type: git - url: https://github.com/telegramdesktop/tdesktop.git - commit: cb065146c2377a16c287d667e35f014956069953 - tag: v4.15.0 - x-checker-data: - type: json - url: https://api.github.com/repos/telegramdesktop/tdesktop/releases - tag-query: first | .tag_name - timestamp-query: first | .published_at - version-query: $tag | sub("^[vV]"; "") + url: https://github.com/AyuGram/AyuGramDesktop.git + commit: bf5337259d7528d0a40a6241eab8134097cf78c7 - type: shell commands: - sed -i '/-Werror/d' Telegram/ThirdParty/dispatch/cmake/modules/DispatchCompilerWarnings.cmake