From 34f6ff508b9955e43ac47e1705a5c9e22a6ddbc4 Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 5 Sep 2023 14:48:18 +0200 Subject: [PATCH] ci: Add caching for flutter setup --- .github/workflows/integrate.yaml | 5 +++++ .github/workflows/main_deploy.yaml | 2 ++ .github/workflows/release.yaml | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index 00a6e5f0..a4a85d25 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -13,6 +13,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - run: flutter pub get - name: Check formatting run: dart format lib/ test/ --set-exit-if-changed @@ -35,6 +36,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - run: flutter pub get - run: flutter build apk --debug @@ -46,6 +48,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - run: flutter pub get - name: Prepare web run: ./scripts/prepare-web.sh @@ -59,6 +62,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - name: Install dependencies run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 -y - run: flutter pub get @@ -72,6 +76,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - name: Setup Xcode version uses: maxim-lobanov/setup-xcode@v1.5.1 - run: flutter pub get diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml index f5cdd4c3..f8603f30 100644 --- a/.github/workflows/main_deploy.yaml +++ b/.github/workflows/main_deploy.yaml @@ -18,6 +18,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - name: Install dependencies run: sudo apt-get update && sudo apt-get install nodejs -y - run: flutter pub get @@ -50,6 +51,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ae76207c..2329ad9c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - name: Install dependencies run: sudo apt-get update && sudo apt-get install nodejs -y - run: flutter pub get @@ -53,6 +54,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - name: Apply Google Services Patch run: git apply ./scripts/enable-android-google-services.patch - run: flutter pub get @@ -81,6 +83,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - name: Install dependencies run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 -y - run: flutter pub get @@ -108,6 +111,7 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -167,4 +171,4 @@ jobs: " else snapcraft promote fluffychat --from-channel candidate --to-channel stable --yes - fi \ No newline at end of file + fi