remove trash

This commit is contained in:
0FL01 2025-07-22 07:45:13 +03:00
parent aa537b8d9d
commit a709a197f3

View file

@ -1,4 +1,4 @@
name: Build AyuGram Flatpak with Git Cache name: Build AyuGram Flatpak
on: on:
workflow_dispatch: workflow_dispatch:
@ -9,31 +9,11 @@ jobs:
runs-on: self-hosted runs-on: self-hosted
steps: steps:
- name: Manual cleanup with sudo - name: Checkout repository with submodules
run: |
cd /home/runner/actions-runner/_work/AyuGramDesktop-flatpak/AyuGramDesktop-flatpak || true
if [ -d "git-cache" ]; then
echo "Fixing permissions for git-cache..."
sudo find git-cache -type d -exec chmod 755 {} \; || true
sudo find git-cache -type f -exec chmod 644 {} \; || true
sudo chown -R $(id -u):$(id -g) git-cache || true
echo "Removing git-cache..."
rm -rf git-cache || sudo rm -rf git-cache || true
fi
# Clean everything else
sudo find . -mindepth 1 -maxdepth 1 ! -name 'git-cache' -exec rm -rf {} \; || true
- name: Checkout main repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
clean: false submodules: 'recursive'
clean: true
- name: Cache Git dependencies
id: cache-git-repos
uses: actions/cache@v4
with:
path: ./git-cache
key: ${{ runner.os }}-git-deps-${{ hashFiles('**/dependencies.txt') }}
- name: Verify that required secrets are set - name: Verify that required secrets are set
run: | run: |
@ -48,16 +28,25 @@ jobs:
- name: Install dependencies and Flatpak SDK - name: Install dependencies and Flatpak SDK
run: | run: |
sudo dnf install -y flatpak flatpak-builder python3-pip sudo dnf install -y flatpak flatpak-builder python3-pip
pip3 install poetry pip3 install --user poetry
echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.local/bin" >> $GITHUB_PATH
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y --noninteractive org.gnome.Sdk//48 flatpak install --user -y --noninteractive org.gnome.Sdk//48
flatpak install --user -y --noninteractive org.gnome.Platform//48 flatpak install --user -y --noninteractive org.gnome.Platform//48
- name: Cache TDesktop Dependencies
id: cache-tdesktop-deps
uses: actions/cache@v4
with:
path: Telegram/ThirdParty
key: ${{ runner.os }}-tdeps-${{ hashFiles('Telegram/build/prepare/dependencies.txt') }}
- name: Prepare libraries - name: Prepare libraries
run: ./Telegram/build/prepare/linux.sh run: ./Telegram/build/prepare/linux.sh
- name: Build AyuGram binary without ccache - name: Build AyuGram binary
env: env:
TDESKTOP_API_ID: ${{ secrets.TDESKTOP_API_ID }} TDESKTOP_API_ID: ${{ secrets.TDESKTOP_API_ID }}
TDESKTOP_API_HASH: ${{ secrets.TDESKTOP_API_HASH }} TDESKTOP_API_HASH: ${{ secrets.TDESKTOP_API_HASH }}
@ -66,68 +55,14 @@ jobs:
--cpus="3" \ --cpus="3" \
-u $(id -u):$(id -g) \ -u $(id -u):$(id -g) \
-v "$PWD:/usr/src/tdesktop" \ -v "$PWD:/usr/src/tdesktop" \
-v "$PWD/git-cache/Implib.so:/usr/src/Implib.so" \
-v "$PWD/git-cache/patches:/usr/src/patches" \
-v "$PWD/git-cache/zlib:/usr/src/zlib" \
-v "$PWD/git-cache/xz:/usr/src/xz" \
-v "$PWD/git-cache/protobuf:/usr/src/protobuf" \
-v "$PWD/git-cache/Little-CMS:/usr/src/Little-CMS" \
-v "$PWD/git-cache/brotli:/usr/src/brotli" \
-v "$PWD/git-cache/highway:/usr/src/highway" \
-v "$PWD/git-cache/opus:/usr/src/opus" \
-v "$PWD/git-cache/dav1d:/usr/src/dav1d" \
-v "$PWD/git-cache/openh264:/usr/src/openh264" \
-v "$PWD/git-cache/libde265:/usr/src/libde265" \
-v "$PWD/git-cache/libvpx:/usr/src/libvpx" \
-v "$PWD/git-cache/libwebp:/usr/src/libwebp" \
-v "$PWD/git-cache/libavif:/usr/src/libavif" \
-v "$PWD/git-cache/libheif:/usr/src/libheif" \
-v "$PWD/git-cache/libjxl:/usr/src/libjxl" \
-v "$PWD/git-cache/rnnoise:/usr/src/rnnoise" \
-v "$PWD/git-cache/xcbproto:/usr/src/xcbproto" \
-v "$PWD/git-cache/libxcb:/usr/src/libxcb" \
-v "$PWD/git-cache/libxcb-wm:/usr/src/libxcb-wm" \
-v "$PWD/git-cache/libxcb-util:/usr/src/libxcb-util" \
-v "$PWD/git-cache/libxcb-image:/usr/src/libxcb-image" \
-v "$PWD/git-cache/libxcb-keysyms:/usr/src/libxcb-keysyms" \
-v "$PWD/git-cache/libxcb-render-util:/usr/src/libxcb-render-util" \
-v "$PWD/git-cache/libxcb-cursor:/usr/src/libxcb-cursor" \
-v "$PWD/git-cache/libxext:/usr/src/libxext" \
-v "$PWD/git-cache/libxtst:/usr/src/libxtst" \
-v "$PWD/git-cache/libxfixes:/usr/src/libxfixes" \
-v "$PWD/git-cache/libxv:/usr/src/libxv" \
-v "$PWD/git-cache/libxrandr:/usr/src/libxrandr" \
-v "$PWD/git-cache/libxrender:/usr/src/libxrender" \
-v "$PWD/git-cache/libxdamage:/usr/src/libxdamage" \
-v "$PWD/git-cache/libxcomposite:/usr/src/libxcomposite" \
-v "$PWD/git-cache/wayland:/usr/src/wayland" \
-v "$PWD/git-cache/nv-codec-headers:/usr/src/nv-codec-headers" \
-v "$PWD/git-cache/FFmpeg:/usr/src/FFmpeg" \
-v "$PWD/git-cache/pipewire:/usr/src/pipewire" \
-v "$PWD/git-cache/openal-soft:/usr/src/openal-soft" \
-v "$PWD/git-cache/openssl:/usr/src/openssl" \
-v "$PWD/git-cache/libxkbcommon:/usr/src/libxkbcommon" \
-v "$PWD/git-cache/qt5:/usr/src/qt5" \
-v "$PWD/git-cache/breakpad:/usr/src/breakpad" \
-v "$PWD/git-cache/tg_owt:/usr/src/tg_owt" \
-v "$PWD/git-cache/ada:/usr/src/ada" \
-v "$PWD/git-cache/tde2e:/usr/src/tde2e" \
ghcr.io/telegramdesktop/tdesktop/centos_env:latest \ ghcr.io/telegramdesktop/tdesktop/centos_env:latest \
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \ /usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
-D TDESKTOP_API_ID=${TDESKTOP_API_ID} \ -D TDESKTOP_API_ID=${TDESKTOP_API_ID} \
-D TDESKTOP_API_HASH=${TDESKTOP_API_HASH} -D TDESKTOP_API_HASH=${TDESKTOP_API_HASH}
- name: Fix git-cache permissions after Docker
run: |
if [ -d "./git-cache" ]; then
sudo find ./git-cache -type d -exec chmod 755 {} \;
sudo find ./git-cache -type f -exec chmod 644 {} \;
sudo chown -R $(id -u):$(id -g) ./git-cache
fi
- name: Prepare Flatpak build directory - name: Prepare Flatpak build directory
run: | run: |
mkdir ayugram-flatpak-build mkdir -p ayugram-flatpak-build
cp out/Release/AyuGram ayugram-flatpak-build/ cp out/Release/AyuGram ayugram-flatpak-build/
cp -r docs/assets/flatpak-files/* ayugram-flatpak-build/ cp -r docs/assets/flatpak-files/* ayugram-flatpak-build/
@ -136,7 +71,7 @@ jobs:
run: | run: |
APP_VERSION=$(grep '<release version=' docs/assets/flatpak-files/usr/share/metainfo/com.ayugram.desktop.metainfo.xml | sed -n 's/.*version="\([^"]*\)".*/\1/p') APP_VERSION=$(grep '<release version=' docs/assets/flatpak-files/usr/share/metainfo/com.ayugram.desktop.metainfo.xml | sed -n 's/.*version="\([^"]*\)".*/\1/p')
echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_ENV echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_ENV
echo "Found version: ${APP_VERSION}" echo "Найдена версия: ${APP_VERSION}"
- name: Build Flatpak package - name: Build Flatpak package
working-directory: ./ayugram-flatpak-build working-directory: ./ayugram-flatpak-build