From f573eda657c866a01d2a6237dd3f024adea13586 Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Mon, 4 May 2026 13:23:23 +0200 Subject: [PATCH] ci: fix build dependency cache --- .github/workflows/build.yml | 42 +++++++++++++------------------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7fc87cd2..17419c7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,9 +37,7 @@ jobs: with: path: | ~/.pub-cache - key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - ${{ runner.os }}-pub- + key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} - name: Cache Gradle uses: actions/cache@v4 @@ -52,7 +50,7 @@ jobs: ${{ runner.os }}-gradle- - name: Install dependencies - run: flutter pub get + run: flutter pub get --enforce-lockfile --no-example - name: Configure Android signing run: | @@ -147,9 +145,7 @@ jobs: with: path: | ~/.pub-cache - key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - ${{ runner.os }}-pub- + key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} - name: Cache CocoaPods uses: actions/cache@v4 @@ -163,7 +159,7 @@ jobs: ${{ runner.os }}-pods- - name: Install dependencies - run: flutter pub get + run: flutter pub get --enforce-lockfile --no-example - name: Build iOS (no codesign) run: flutter build ios --release --no-codesign --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/ios @@ -238,9 +234,7 @@ jobs: with: path: | ~/.pub-cache - key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - ${{ runner.os }}-pub- + key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} - name: Cache CocoaPods uses: actions/cache@v4 @@ -254,7 +248,7 @@ jobs: ${{ runner.os }}-macos-pods- - name: Install dependencies - run: flutter pub get + run: flutter pub get --enforce-lockfile --no-example - name: Build macOS run: flutter build macos --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/macos @@ -433,9 +427,7 @@ jobs: with: path: | ~\AppData\Local\Pub\Cache - key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - ${{ runner.os }}-pub- + key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} - name: Cache Windows native dependencies uses: actions/cache@v4 @@ -444,7 +436,7 @@ jobs: key: windows-native-x64-${{ hashFiles('windows/CMakeLists.txt') }} - name: Install dependencies - run: flutter pub get + run: flutter pub get --enforce-lockfile --no-example - name: Build Windows x64 run: flutter build windows --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/windows-x64 @@ -527,12 +519,10 @@ jobs: with: path: | ~\AppData\Local\Pub\Cache - key: ${{ runner.os }}-arm64-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - ${{ runner.os }}-arm64-pub- + key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} - name: Install dependencies - run: flutter pub get + run: flutter pub get --no-example - name: Build Windows arm64 run: flutter build windows --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/windows-arm64 @@ -687,9 +677,7 @@ jobs: with: path: | ~/.pub-cache - key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - ${{ runner.os }}-pub- + key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} - name: Cache APT packages uses: awalsh128/cache-apt-pkgs-action@latest @@ -717,7 +705,7 @@ jobs: run: sudo gem install fpm - name: Install dependencies - run: flutter pub get + run: flutter pub get --enforce-lockfile --no-example - name: Build Linux x64 run: flutter build linux --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/linux-x64 @@ -828,9 +816,7 @@ jobs: with: path: | ~/.pub-cache - key: ${{ runner.os }}-arm64-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: | - ${{ runner.os }}-arm64-pub- + key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} - name: Cache APT packages uses: awalsh128/cache-apt-pkgs-action@latest @@ -858,7 +844,7 @@ jobs: run: sudo gem install fpm - name: Install dependencies - run: flutter pub get + run: flutter pub get --no-example - name: Build Linux arm64 run: flutter build linux --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/linux-arm64