diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 3a7ebbe..7c4bc6f 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -57,12 +57,11 @@ jobs: # The flutter-analyze hook shells out to `flutter analyze` in # stronglift_replacement/workout_app. Pin to the version the app is # developed against (Dart SDK ^3.12.2) so CI's analyzer matches local. - - uses: subosito/flutter-action@v2 + - uses: kuhyx/utils/flutter-setup@flutter-setup-v1 if: matrix.group == 'flutter' with: flutter-version: 3.47.6 - channel: stable - cache: true + working-directory: stronglift_replacement/workout_app # analyze needs resolved packages (.dart_tool); the hook runs analyze # only, so fetch deps here first. - name: Resolve Flutter packages diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index b561062..41a1ff6 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -92,13 +92,12 @@ jobs: steps: - uses: actions/checkout@v4 - # cache: true keeps the SDK and ~/.pub-cache between runs; without it - # the SDK download alone was ~57 s. - - uses: subosito/flutter-action@v2 + # The slim cached SDK (utils/flutter-setup): subosito's full-SDK + # cache cost ~38 s to restore even on a hit. + - uses: kuhyx/utils/flutter-setup@flutter-setup-v1 with: flutter-version: 3.47.6 - channel: stable - cache: true + working-directory: stronglift_replacement/workout_app - name: flutter test --coverage, bucket ${{ matrix.shard }} run: bash scripts/check_flutter_coverage.sh --shard "${{ matrix.shard }}/$FLUTTER_SHARDS" diff --git a/.github/workflows/release-apk.yml b/.github/workflows/release-apk.yml index 6d7b400..327bf23 100644 --- a/.github/workflows/release-apk.yml +++ b/.github/workflows/release-apk.yml @@ -3,6 +3,14 @@ name: release-apk on: push: branches: [main] + # A publisher, not a gate: build only when something that ends up in + # the APK changed. versionCode is the commit count, so skipped pushes + # still leave it monotonic. + paths: + - 'stronglift_replacement/workout_app/**' + - '.fvmrc' + - '.versioncode-offset' + - '.github/workflows/release-apk.yml' # Lets a release be rebuilt from the current main without a dummy commit. workflow_dispatch: @@ -47,6 +55,8 @@ jobs: with: distribution: temurin java-version: "17" + # ~/.gradle caches + wrapper, keyed on the Gradle files. + cache: gradle - uses: subosito/flutter-action@v2 with: