From 7b106761bec8cef74e917e5aabba3839b8026c2b Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 1 Jun 2020 15:39:19 +0400 Subject: [PATCH] Remove cache from snap action since it works not so good --- .github/workflows/snap.yml | 49 -------------------------------------- snap/snapcraft.yaml | 1 + 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index d39b12966..ac0bbd7d5 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -48,8 +48,6 @@ jobs: env: UPLOAD_ARTIFACT: "false" - ONLY_CACHE: "false" - MANUAL_CACHING: "5" steps: - name: Clone. @@ -63,55 +61,13 @@ jobs: sudo rm -rf /etc/apt/sources.list.d/* sudo apt-get update - sudo apt-get install gcc-8 g++-8 -y sudo snap install --classic snapcraft # Workaround for snapcraft # See https://forum.snapcraft.io/t/13258 sudo chown root:root / - md5() { - md5cache=$(md5sum $1.txt | cut -c -32) - echo ::set-env name=$1::$md5cache - } - keyFor() { - keyName="${1^^}_CACHE_KEY" - awk -v RS="" -v ORS="\n\n" '/^ '"$1"':/' snap/snapcraft.yaml > $keyName.txt - md5 $keyName - } - - snap run snapcraft --version > CACHE_KEY.txt - gcc-8 --version >> CACHE_KEY.txt - echo $MANUAL_CACHING >> CACHE_KEY.txt - md5 CACHE_KEY - - keyFor cmake - keyFor ffmpeg - - - name: CMake cache. - id: cache-cmake - uses: actions/cache@v1 - with: - path: parts/cmake - key: ${{ runner.OS }}-cmake-${{ env.CACHE_KEY }}-${{ env.CMAKE_CACHE_KEY }} - - - name: CMake build. - if: steps.cache-cmake.outputs.cache-hit != 'true' - run: sudo snap run snapcraft build --destructive-mode cmake - - - name: FFmpeg cache. - id: cache-ffmpeg - uses: actions/cache@v1 - with: - path: parts/ffmpeg - key: ${{ runner.OS }}-ffmpeg-${{ env.CACHE_KEY }}-${{ env.FFMPEG_CACHE_KEY }} - - - name: FFmpeg build. - if: steps.cache-ffmpeg.outputs.cache-hit != 'true' - run: sudo snap run snapcraft build --destructive-mode ffmpeg - - name: Telegram Desktop snap build. - if: env.ONLY_CACHE == 'false' run: sudo snap run snapcraft --destructive-mode - name: Move artifact. @@ -129,8 +85,3 @@ jobs: with: name: ${{ env.ARTIFACT_NAME }} path: artifact - - - name: Remove unneeded directories for cache. - run: | - sudo rm -rf parts/*/{build,src,ubuntu} - sudo rm -rf parts/*/state/{stage,prime} diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index fc46da915..82e3643c0 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -117,6 +117,7 @@ parts: - cmake - ffmpeg - openal + - qtwayland telegram-launcher: plugin: dump