mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-09-06 12:03:41 +02:00
add cache
This commit is contained in:
parent
4c926115ad
commit
ba3fc3fcf4
1 changed files with 22 additions and 20 deletions
42
.github/workflows/flatpak-build.yml
vendored
42
.github/workflows/flatpak-build.yml
vendored
|
@ -106,27 +106,29 @@ jobs:
|
||||||
|
|
||||||
- name: Build AyuGram binary
|
- 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 }}
|
||||||
CCACHE_DIR: /ccache
|
|
||||||
CCACHE_MAXSIZE: 3G
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p .ccache
|
mkdir -p .ccache
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
--cpus="3" \
|
--cpus="3" \
|
||||||
-u $(id -u):$(id -g) \
|
-u root \
|
||||||
-v "$PWD:/usr/src/tdesktop" \
|
-v "$PWD:/usr/src/tdesktop" \
|
||||||
-v "$PWD/.ccache:/ccache" \
|
-v "$PWD/.ccache:/ccache" \
|
||||||
-e CCACHE_DIR \
|
ghcr.io/telegramdesktop/tdesktop/centos_env:latest \
|
||||||
-e CCACHE_MAXSIZE \
|
/bin/bash -c "\
|
||||||
ghcr.io/telegramdesktop/tdesktop/centos_env:latest \
|
# Установка ccache
|
||||||
/bin/bash -c "\
|
dnf install -y ccache && \
|
||||||
set -ex && \
|
# Настройка окружения для сборки
|
||||||
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
|
export CCACHE_DIR=/ccache && \
|
||||||
-D TDESKTOP_API_ID=${TDESKTOP_API_ID} \
|
export CCACHE_MAXSIZE=2G && \
|
||||||
-D TDESKTOP_API_HASH=${TDESKTOP_API_HASH} \
|
# Запуск сборки с поддержкой ccache
|
||||||
-D USE_CCACHE=ON && \
|
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
|
||||||
ccache -s" # Отображение статистики использования кеша
|
-D TDESKTOP_API_ID=${TDESKTOP_API_ID} \
|
||||||
|
-D TDESKTOP_API_HASH=${TDESKTOP_API_HASH} \
|
||||||
|
-D USE_CCACHE=ON && \
|
||||||
|
# Проверка статистики кеша
|
||||||
|
ccache -s"
|
||||||
|
|
||||||
- name: Prepare Flatpak build directory
|
- name: Prepare Flatpak build directory
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Reference in a new issue