From 7f7f95f1c597b145cab6a42e5611c60af7edef0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20K=C3=B6rber?= <56073945+jakobkoerber@users.noreply.github.com> Date: Sat, 13 Jun 2026 15:33:10 +0100 Subject: [PATCH 1/4] Improve speed of iOS and Android builds by adding caching, fix iOS pipeline --- .github/workflows/deploy_beta.yml | 42 ++++++++++++++++++++++++++----- android/Gemfile | 2 +- ios/Gemfile | 2 +- ios/fastlane/Fastfile | 3 ++- 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy_beta.yml b/.github/workflows/deploy_beta.yml index f05bf23e..bf6b053b 100644 --- a/.github/workflows/deploy_beta.yml +++ b/.github/workflows/deploy_beta.yml @@ -10,26 +10,56 @@ permissions: jobs: deploy: - runs-on: macos-26 + runs-on: ${{ matrix.os }} strategy: matrix: - platform: [ ios, android ] + include: + - platform: ios + os: macos-26 + - platform: android + os: ubuntu-24.04-arm fail-fast: false steps: - uses: actions/checkout@v4 + - name: Setup Ruby and install gems + uses: ruby/setup-ruby@v1 + with: + working-directory: ${{ matrix.platform }} + bundler-cache: true + - if: matrix.platform == 'android' uses: actions/setup-java@v3 with: distribution: 'corretto' java-version: '21' + cache: 'gradle' - name: Setup Flutter uses: subosito/flutter-action@v2 with: channel: stable + cache: true + + - if: matrix.platform == 'ios' + name: Cache CocoaPods + uses: actions/cache@v4 + with: + path: | + ios/Pods + ~/.cocoapods + key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} + restore-keys: ${{ runner.os }}-pods- + + - if: matrix.platform == 'ios' + name: Cache Xcode DerivedData (SPM + compiled pods) + uses: actions/cache@v4 + with: + path: ios/DerivedData + key: ${{ runner.os }}-deriveddata-${{ hashFiles('ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'ios/Podfile.lock') }} + restore-keys: ${{ runner.os }}-deriveddata- - name: Install Flutter Packages run: | @@ -54,7 +84,7 @@ jobs: name: Build and Deploy With Release Notes to TestFlight run: | cd ./ios - fastlane ios_beta + bundle exec fastlane ios_beta env: APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }} APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} @@ -68,7 +98,7 @@ jobs: name: Build and Deploy to TestFlight run: | cd ./ios - fastlane ios_beta + bundle exec fastlane ios_beta env: APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }} APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} @@ -87,7 +117,7 @@ jobs: name: Deploy to Google Play Store run: | cd ./android - fastlane android_beta + bundle exec fastlane android_beta env: GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }} ANDROID_KEYSTORE_FILE: ./upload-keystore @@ -99,7 +129,7 @@ jobs: name: Build Release APK run: | cd ./android - fastlane android_apk + bundle exec fastlane android_apk env: GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }} ANDROID_KEYSTORE_FILE: ./upload-keystore diff --git a/android/Gemfile b/android/Gemfile index 7a118b49..3f18de4a 100644 --- a/android/Gemfile +++ b/android/Gemfile @@ -1,3 +1,3 @@ source "https://rubygems.org" -gem "fastlane" +gem "fastlane", ">= 2.236.1" diff --git a/ios/Gemfile b/ios/Gemfile index adc90d98..b12843e1 100644 --- a/ios/Gemfile +++ b/ios/Gemfile @@ -1,3 +1,3 @@ source "https://rubygems.org" -gem "fastlane" \ No newline at end of file +gem "fastlane", ">= 2.236.1" \ No newline at end of file diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 1d756b49..bcd5df95 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -52,7 +52,8 @@ platform :ios do scheme: "Runner", workspace: "Runner.xcworkspace", export_method: "app-store", - skip_package_dependencies_resolution: true + skip_package_dependencies_resolution: true, + derived_data_path: "DerivedData" ) upload_to_testflight( From 5607760ea125d004941f22cfdf00e7de49c445fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20K=C3=B6rber?= <56073945+jakobkoerber@users.noreply.github.com> Date: Sat, 13 Jun 2026 15:49:00 +0100 Subject: [PATCH 2/4] pin ruby-version for setup-ruby step --- .github/workflows/deploy_beta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_beta.yml b/.github/workflows/deploy_beta.yml index bf6b053b..36a041a9 100644 --- a/.github/workflows/deploy_beta.yml +++ b/.github/workflows/deploy_beta.yml @@ -27,6 +27,7 @@ jobs: - name: Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: + ruby-version: '3.3' working-directory: ${{ matrix.platform }} bundler-cache: true From d86882bad61f007e060f239452f4f195e2a96df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20K=C3=B6rber?= <56073945+jakobkoerber@users.noreply.github.com> Date: Sat, 13 Jun 2026 15:54:59 +0100 Subject: [PATCH 3/4] correct setup-ruby and android runner config --- .github/workflows/deploy_beta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_beta.yml b/.github/workflows/deploy_beta.yml index 36a041a9..7151f2c9 100644 --- a/.github/workflows/deploy_beta.yml +++ b/.github/workflows/deploy_beta.yml @@ -18,7 +18,7 @@ jobs: - platform: ios os: macos-26 - platform: android - os: ubuntu-24.04-arm + os: ubuntu-latest fail-fast: false steps: From a11c8b35199637fcdadbbd10e2e0a2afb2eb0459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20K=C3=B6rber?= <56073945+jakobkoerber@users.noreply.github.com> Date: Mon, 15 Jun 2026 21:16:38 +0100 Subject: [PATCH 4/4] parallelize jobs and add caching for linting, testing, building --- .github/workflows/lint_test_build.yml | 57 ++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lint_test_build.yml b/.github/workflows/lint_test_build.yml index e58a8d4c..a14d52b6 100644 --- a/.github/workflows/lint_test_build.yml +++ b/.github/workflows/lint_test_build.yml @@ -4,8 +4,8 @@ on: pull_request: jobs: - build: - runs-on: macos-26 + analyze_and_test: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -14,6 +14,7 @@ jobs: uses: subosito/flutter-action@v2 with: channel: stable + cache: true - name: Install Flutter Packages run: flutter pub get @@ -24,20 +25,56 @@ jobs: - name: Run Tests run: flutter test - - name: Install CocoaPods - run: cd ./ios && pod install + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + include: + - platform: ios + os: macos-26 + - platform: android + os: ubuntu-latest + fail-fast: false + + steps: + - uses: actions/checkout@v4 - - name: Install Java SDK + - if: matrix.platform == 'android' + name: Install Java SDK uses: actions/setup-java@v3 with: distribution: 'corretto' java-version: '21' + cache: 'gradle' + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + + - name: Install Flutter Packages + run: flutter pub get - - name: Build iOS + - if: matrix.platform == 'ios' + name: Cache CocoaPods + uses: actions/cache@v4 + with: + path: | + ios/Pods + ~/.cocoapods + key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} + restore-keys: ${{ runner.os }}-pods- + + - if: matrix.platform == 'ios' + name: Install CocoaPods + run: cd ./ios && pod install + + - if: matrix.platform == 'ios' + name: Build iOS run: flutter build ipa --no-codesign - - name: Build Android + - if: matrix.platform == 'android' + name: Build Android run: flutter build apk - - #- name: Build Website - # run: flutter build web --base-href /