From bc0f0b7edb39205be4a6e11e27bbf5edc7c991ee Mon Sep 17 00:00:00 2001 From: razkevich Date: Fri, 27 Nov 2026 11:31:09 +0100 Subject: [PATCH 1/4] ci(repo): run the test and analysis jobs on free standard runners (#1739) Claude-Session: https://claude.ai/code/session_015cLka1Rk3gS2SjhgrUW2MD Co-authored-by: Claude Opus 5.5 --- .github/workflows/legacy_version_analyze.yml | 16 ++++-- .github/workflows/pana.yml | 57 ++++++++++++++------ .github/workflows/sdk_size.yml | 13 +++-- 3 files changed, 63 insertions(+), 23 deletions(-) diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index d0258c623c..2b586af20e 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -38,13 +38,19 @@ jobs: analyze_legacy_version: timeout-minutes: 15 if: github.event.pull_request.draft == false - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: "Git Checkout" - uses: actions/checkout@v7 - with: - fetch-depth: 0 + run: | + git init -q . + git remote add origin "https://github.com/$REPOSITORY" + git fetch -q origin '+refs/heads/*:refs/remotes/origin/*' '+refs/tags/*:refs/tags/*' "$SHA" + git checkout -q --detach "$SHA" + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: "Install Flutter" uses: ./.github/actions/setup-flutter diff --git a/.github/workflows/pana.yml b/.github/workflows/pana.yml index 8a84d11dca..aa0e5ceec8 100644 --- a/.github/workflows/pana.yml +++ b/.github/workflows/pana.yml @@ -19,11 +19,18 @@ permissions: jobs: stream_video: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: 📚 Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: 📊 Verify Pana Score uses: ./.github/actions/pana with: @@ -34,11 +41,16 @@ jobs: min_score: 50 stream_video_flutter: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: 📚 Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: 📊 Verify Pana Score uses: ./.github/actions/pana with: @@ -54,11 +66,16 @@ jobs: min_score: 50 stream_video_push_notification: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: 📚 Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: 📊 Verify Pana Score uses: ./.github/actions/pana with: @@ -73,11 +90,16 @@ jobs: min_score: 55 stream_video_screen_sharing: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: 📚 Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: 📊 Verify Pana Score uses: ./.github/actions/pana with: @@ -88,11 +110,16 @@ jobs: min_score: 135 stream_video_noise_cancellation: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: 📚 Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: 📊 Verify Pana Score uses: ./.github/actions/pana with: diff --git a/.github/workflows/sdk_size.yml b/.github/workflows/sdk_size.yml index a4c1ad0536..996de3e6b7 100644 --- a/.github/workflows/sdk_size.yml +++ b/.github/workflows/sdk_size.yml @@ -32,11 +32,18 @@ jobs: measure-android: if: github.event_name != 'pull_request' || github.event.pull_request.draft == false timeout-minutes: 60 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Install Flutter uses: ./.github/actions/setup-flutter From a32ad351c16c3958746ba11774f62bf9f3222114 Mon Sep 17 00:00:00 2001 From: Rene Floor Date: Fri, 27 Nov 2026 11:41:37 +0100 Subject: [PATCH 2/4] ci(repo): run v2's remaining token-free jobs on free standard runners - analyze, build, both path filter gates, the webrtc analyze and Linux, Android and web builds, and the beta analysis move to standard runners with an anonymous checkout. The gates' filters fetch the base with git, without a token. analyze is pinned to ubuntu-24.04, the image its goldens are rendered on. - update_goldens renders on ubuntu-24.04 and hands the goldens to a commit job on the static-IP runners, which mints the bot token. - The Android release build, the flutter.getstream.io deploy and the PR web build run on standard runners; Google Play and Google Cloud take no GitHub token. Commenting a PR's web build link is a job of its own on the static-IP runners. The gh-pages deploy pushes to the repository and stays. - With 4 cores and 16 GB again, melos runs analyze and the Flutter tests at their old concurrency, analyze gets its 25 minutes back, and the size measurement keeps the template's Gradle settings. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/app-distribute.yml | 26 ++++-- .github/workflows/beta_version_analyze.yml | 16 ++-- .github/workflows/pr_web_build.yml | 41 ++++++++-- .../stream_video_flutter_workflow.yml | 50 ++++++++---- .github/workflows/update_goldens.yml | 60 +++++++++++--- .github/workflows/webrtc.yml | 79 ++++++++++++++----- metrics/sdk_size/tool/measure.dart | 21 ----- pubspec.yaml | 8 +- 8 files changed, 212 insertions(+), 89 deletions(-) diff --git a/.github/workflows/app-distribute.yml b/.github/workflows/app-distribute.yml index a366f2782e..e8bc354ec8 100644 --- a/.github/workflows/app-distribute.yml +++ b/.github/workflows/app-distribute.yml @@ -181,13 +181,20 @@ jobs: build_and_deploy_android: name: Build and Distribute Dogfooding Android - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest timeout-minutes: 30 if: ${{ github.event_name == 'push' || (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'stream-video-v')) || inputs.build_android == true }} steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Checkout code - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Setup Flutter uses: ./.github/actions/setup-flutter @@ -268,8 +275,7 @@ jobs: # remove pull request builds last deployed over 30 days ago. build_and_deploy_web_hosted: name: Build and Deploy Dogfooding Web (flutter.getstream.io) - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest timeout-minutes: 15 if: ${{ github.event_name == 'push' || (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'stream-video-v')) || inputs.build_web == true }} environment: @@ -279,8 +285,16 @@ jobs: contents: read id-token: write steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Checkout code - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Setup Flutter uses: ./.github/actions/setup-flutter diff --git a/.github/workflows/beta_version_analyze.yml b/.github/workflows/beta_version_analyze.yml index 23dd6f5b01..9698e731e2 100644 --- a/.github/workflows/beta_version_analyze.yml +++ b/.github/workflows/beta_version_analyze.yml @@ -13,13 +13,19 @@ jobs: # Does a sanity check on packages for the next beta version so we are not surprised by any breaking changes. analyze_beta_versions: timeout-minutes: 15 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: "Git Checkout" - uses: actions/checkout@v7 - with: - fetch-depth: 0 + run: | + git init -q . + git remote add origin "https://github.com/$REPOSITORY" + git fetch -q origin '+refs/heads/*:refs/remotes/origin/*' '+refs/tags/*:refs/tags/*' "$SHA" + git checkout -q --detach "$SHA" + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: "Install Flutter" uses: ./.github/actions/setup-flutter diff --git a/.github/workflows/pr_web_build.yml b/.github/workflows/pr_web_build.yml index b6f5742ef1..79eec4de3e 100644 --- a/.github/workflows/pr_web_build.yml +++ b/.github/workflows/pr_web_build.yml @@ -27,8 +27,7 @@ jobs: github.event.action != 'unlabeled' && contains(github.event.pull_request.labels.*.name, 'build') && (github.event.action != 'labeled' || github.event.label.name == 'build') - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest timeout-minutes: 15 # On the jobs rather than the workflow, so a run that skips both (another # label added) leaves a running deploy alone. @@ -38,13 +37,22 @@ jobs: environment: name: flutter-web-pr url: ${{ steps.target.outputs.url }} + outputs: + url: ${{ steps.target.outputs.url }} permissions: contents: read id-token: write - pull-requests: write steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Checkout code - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Setup Flutter uses: ./.github/actions/setup-flutter @@ -71,11 +79,21 @@ jobs: service-account: ${{ steps.target.outputs.service-account }} build-dir: dogfooding/build/web + # Commenting needs a token, and so the static-IP runners. + comment: + name: Comment the Link + needs: deploy + runs-on: + group: github-public-amd64 + timeout-minutes: 5 + permissions: + pull-requests: write + steps: - name: Comment the link uses: GetStream/stream-core-flutter/.github/actions/flutter-web-pr-comment@e338514373956150868ee67d325c96efe1c758ec with: app: video - url: ${{ steps.target.outputs.url }} + url: ${{ needs.deploy.outputs.url }} cleanup: name: Remove Build @@ -83,8 +101,7 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository && ((github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'build')) || (github.event.action == 'unlabeled' && github.event.label.name == 'build')) - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest timeout-minutes: 5 # Shares the deploy's group, so it stops a deploy that is still running. concurrency: @@ -94,7 +111,6 @@ jobs: name: flutter-web-pr permissions: id-token: write - pull-requests: write steps: - name: Target id: target @@ -109,6 +125,15 @@ jobs: path: ${{ steps.target.outputs.path }} service-account: ${{ steps.target.outputs.service-account }} + cleanup-comment: + name: Update the Comment + needs: cleanup + runs-on: + group: github-public-amd64 + timeout-minutes: 5 + permissions: + pull-requests: write + steps: - name: Update the comment uses: GetStream/stream-core-flutter/.github/actions/flutter-web-pr-comment@e338514373956150868ee67d325c96efe1c758ec with: diff --git a/.github/workflows/stream_video_flutter_workflow.yml b/.github/workflows/stream_video_flutter_workflow.yml index 28038de8c8..93c7bc828e 100644 --- a/.github/workflows/stream_video_flutter_workflow.yml +++ b/.github/workflows/stream_video_flutter_workflow.yml @@ -31,8 +31,7 @@ jobs: # `push` events to main and v2 always run the full suite, except the native # unit tests, which run only when the native code they build changed. gate: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest outputs: should_run: ${{ github.event_name == 'push' || (steps.filter.outputs.relevant == 'true' && github.event.pull_request.draft != true) }} # The packages whose native unit tests run, as JSON lists. A package's @@ -41,8 +40,17 @@ jobs: android_test_packages: ${{ steps.native_tests.outputs.android }} ios_test_packages: ${{ steps.native_tests.outputs.ios }} steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests. The path + # filters run without a token, so they fetch the base from origin with git, anonymously. - name: "Git Checkout" - uses: actions/checkout@v7 + run: | + git init -q . + git remote add origin "https://github.com/$REPOSITORY" + git fetch -q --depth=1 --no-tags origin "$SHA" + git checkout -q --detach FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: "Detect Path Changes" uses: dorny/paths-filter@v4 @@ -117,21 +125,27 @@ jobs: analyze: needs: gate if: needs.gate.outputs.should_run == 'true' - timeout-minutes: 40 + timeout-minutes: 25 # Goldens compare pixels, so this matches the image update_goldens.yml - # renders them on. - runs-on: - group: github-public-amd64 + # renders them on: pinned, not ubuntu-latest. + runs-on: ubuntu-24.04 permissions: contents: read pull-requests: read # Codecov authenticates the coverage upload with a GitHub OIDC token. id-token: write steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 - with: - fetch-depth: 0 + run: | + git init -q . + git remote add origin "https://github.com/$REPOSITORY" + git fetch -q origin '+refs/heads/*:refs/remotes/origin/*' '+refs/tags/*:refs/tags/*' "$SHA" + git checkout -q --detach "$SHA" + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Install Flutter uses: ./.github/actions/setup-flutter @@ -234,13 +248,19 @@ jobs: needs: gate if: needs.gate.outputs.should_run == 'true' timeout-minutes: 30 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 - with: - fetch-depth: 0 + run: | + git init -q . + git remote add origin "https://github.com/$REPOSITORY" + git fetch -q origin '+refs/heads/*:refs/remotes/origin/*' '+refs/tags/*:refs/tags/*' "$SHA" + git checkout -q --detach "$SHA" + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Install Flutter uses: ./.github/actions/setup-flutter diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index 2f87f26db6..83b54ac0fb 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -6,9 +6,48 @@ permissions: contents: read jobs: - update_goldens: + # Renders on a free standard runner with an anonymous checkout; only the + # commit job below needs a token, and so the static-IP runners. + render: # Keep in sync with the analyze job in stream_video_flutter_workflow.yml, # which compares against the goldens rendered here. + runs-on: ubuntu-24.04 + steps: + - name: 📚 Git Checkout + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} + + - name: 🐦 Install Flutter + uses: ./.github/actions/setup-flutter + + - name: 🛠️ Install Melos + uses: ./.github/actions/setup-melos + + # No codegen step: `update:goldens` only runs in packages that depend on + # alchemist, which is stream_video_flutter alone, and that package has no + # generated sources. Everything build_runner produces elsewhere — the + # OpenAPI models and freezed classes in stream_video — is committed. + - name: 🖼️ Update Goldens + run: melos run update:goldens + + # A tarball keeps each golden's path in the repository. + - name: 📦 Pack Goldens + run: git ls-files -z -co --exclude-standard -- '**/test/**/goldens/**/*.png' | tar -czf goldens.tgz --null -T - + + - name: 📤 Upload Goldens + uses: actions/upload-artifact@v7 + with: + name: goldens + path: goldens.tgz + retention-days: 1 + + commit: + needs: render runs-on: group: github-public-amd64 steps: @@ -24,18 +63,15 @@ jobs: with: persist-credentials: false - - name: 🐦 Install Flutter - uses: ./.github/actions/setup-flutter - - - name: 🛠️ Install Melos - uses: ./.github/actions/setup-melos + - name: 📥 Download Goldens + uses: actions/download-artifact@v8 + with: + name: goldens - # No codegen step: `update:goldens` only runs in packages that depend on - # alchemist, which is stream_video_flutter alone, and that package has no - # generated sources. Everything build_runner produces elsewhere — the - # OpenAPI models and freezed classes in stream_video — is committed. - - name: 🖼️ Update Goldens - run: melos run update:goldens + - name: 📦 Unpack Goldens + run: | + tar -xzf goldens.tgz + rm goldens.tgz - name: 📤 Commit Changes uses: GetStream/stream-core-flutter/.github/actions/bot-commit@68fdf0bf3c779f640dbb10a1ecf7945d872408f7 diff --git a/.github/workflows/webrtc.yml b/.github/workflows/webrtc.yml index 27deb4fd5f..cb09e3d41b 100644 --- a/.github/workflows/webrtc.yml +++ b/.github/workflows/webrtc.yml @@ -34,8 +34,7 @@ jobs: # # `push` events to main and v2 run when the push changed webrtc/. gate: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest outputs: should_run: ${{ steps.filter.outputs.relevant == 'true' && github.event.pull_request.draft != true }} # The native unit tests of a platform run only when native code for it, @@ -44,8 +43,17 @@ jobs: ios_tests: ${{ steps.filter.outputs.ios_tests }} macos_tests: ${{ steps.filter.outputs.macos_tests }} steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests. The path + # filters run without a token, so they fetch the base from origin with git, anonymously. - name: "Git Checkout" - uses: actions/checkout@v7 + run: | + git init -q . + git remote add origin "https://github.com/$REPOSITORY" + git fetch -q --depth=1 --no-tags origin "$SHA" + git checkout -q --detach FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: "Detect Path Changes" uses: dorny/paths-filter@v4 @@ -84,11 +92,18 @@ jobs: needs: gate if: needs.gate.outputs.should_run == 'true' timeout-minutes: 15 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Install Flutter uses: ./.github/actions/setup-flutter @@ -110,11 +125,18 @@ jobs: if: needs.gate.outputs.should_run == 'true' name: Build example (Android) timeout-minutes: 30 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Install Flutter uses: ./.github/actions/setup-flutter @@ -201,11 +223,18 @@ jobs: if: needs.gate.outputs.should_run == 'true' name: Build example (Linux) timeout-minutes: 30 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Install Linux build dependencies run: | @@ -224,11 +253,18 @@ jobs: if: needs.gate.outputs.should_run == 'true' name: Build example (Embedded Linux) timeout-minutes: 30 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Install Linux build dependencies run: | @@ -259,11 +295,18 @@ jobs: if: needs.gate.outputs.should_run == 'true' name: Build example (Web) timeout-minutes: 30 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Install Flutter uses: ./.github/actions/setup-flutter diff --git a/metrics/sdk_size/tool/measure.dart b/metrics/sdk_size/tool/measure.dart index 5f48fa60c1..ab2d6585f9 100644 --- a/metrics/sdk_size/tool/measure.dart +++ b/metrics/sdk_size/tool/measure.dart @@ -143,30 +143,9 @@ Future _createTemplate() async { '--project-name=sdk_size_app', template.path, ]); - _limitGradleMemory(template); return template; } -/// Replaces the template's 8 GB Gradle heap, compiles Kotlin inside Gradle and -/// stops Gradle after each build, so the builds fit on a 2-core runner. -void _limitGradleMemory(Directory app) { - const jvmArgs = - '-Xmx3g -XX:MaxMetaspaceSize=1g -XX:ReservedCodeCacheSize=256m ' - '-XX:+HeapDumpOnOutOfMemoryError'; - final file = File('${app.path}/android/gradle.properties'); - final lines = file.readAsLinesSync().where( - (it) => !it.startsWith('org.gradle.jvmargs='), - ); - file.writeAsStringSync( - '${[ - 'org.gradle.jvmargs=$jvmArgs', - 'org.gradle.daemon=false', - 'kotlin.compiler.execution.strategy=in-process', - ...lines, - ].join('\n')}\n', - ); -} - Future _createApp(Directory template, String variant) async { final app = Directory('${_buildDir.path}/apps/$variant'); if (app.existsSync()) app.deleteSync(recursive: true); diff --git a/pubspec.yaml b/pubspec.yaml index 72db16b5ba..9db081a12d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -99,7 +99,7 @@ melos: analyze: run: | - melos exec -c 2 --ignore="*example*" -- \ + melos exec -c 5 --ignore="*example*" -- \ dart analyze --fatal-infos . description: | Run `dart analyze` in all packages. @@ -107,7 +107,7 @@ melos: analyze:warning: run: | - melos exec -c 2 --ignore="*example*" -- \ + melos exec -c 5 --ignore="*example*" -- \ dart analyze --fatal-warnings . description: | Run `dart analyze` in all packages. @@ -115,7 +115,7 @@ melos: analyze:error: run: | - melos exec -c 2 --ignore="*example*" -- \ + melos exec -c 5 --ignore="*example*" -- \ dart analyze --no-fatal-warnings . description: | Run `dart analyze` in all packages. @@ -221,7 +221,7 @@ melos: dirExists: test test:flutter: - run: melos exec -c 2 --fail-fast -- "flutter test --coverage" + run: melos exec -c 4 --fail-fast -- "flutter test --coverage" description: Run Flutter tests for a specific package in this project. packageFilters: flutter: true From dee87947d296473674b8f7484f6e24884487d0c0 Mon Sep 17 00:00:00 2001 From: Rene Floor Date: Fri, 27 Nov 2026 11:48:50 +0100 Subject: [PATCH 3/4] ci(repo): run the token-free macOS jobs on free standard runners The iOS unit tests, the webrtc iOS and macOS example builds and the SPM build move from Scaleway to the xcode-27 image, and the iOS size measurement, which pins Xcode 26.3, to macos-26, all with an anonymous checkout. The iOS and macOS distribution jobs read the certificates with a token and stay. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ios_pods_spm.yaml | 12 ++++++++-- .github/workflows/sdk_size.yml | 12 ++++++++-- .../stream_video_flutter_workflow.yml | 12 ++++++++-- .github/workflows/webrtc.yml | 24 +++++++++++++++---- 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ios_pods_spm.yaml b/.github/workflows/ios_pods_spm.yaml index 939ccafb11..dc4d5c9876 100644 --- a/.github/workflows/ios_pods_spm.yaml +++ b/.github/workflows/ios_pods_spm.yaml @@ -13,11 +13,19 @@ permissions: jobs: build-ios: name: iOS Build (Dogfooding) - runs-on: { group: scaleway-macos } + runs-on: xcode-27 steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: 🧰 Setup Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: 🍎 Select Xcode uses: ./.github/actions/select-xcode diff --git a/.github/workflows/sdk_size.yml b/.github/workflows/sdk_size.yml index 996de3e6b7..f6ff105761 100644 --- a/.github/workflows/sdk_size.yml +++ b/.github/workflows/sdk_size.yml @@ -77,10 +77,18 @@ jobs: || (startsWith(github.head_ref, 'release/') && github.event.pull_request.draft == false) timeout-minutes: 60 # Pinned, so a runner image update doesn't change the iOS numbers. - runs-on: { group: scaleway-macos } + runs-on: macos-26 steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Select Xcode uses: ./.github/actions/select-xcode diff --git a/.github/workflows/stream_video_flutter_workflow.yml b/.github/workflows/stream_video_flutter_workflow.yml index 93c7bc828e..0d33064d63 100644 --- a/.github/workflows/stream_video_flutter_workflow.yml +++ b/.github/workflows/stream_video_flutter_workflow.yml @@ -300,10 +300,18 @@ jobs: matrix: package: ${{ fromJSON(needs.gate.outputs.ios_test_packages) }} timeout-minutes: 45 - runs-on: { group: scaleway-macos } + runs-on: xcode-27 steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Select Xcode uses: ./.github/actions/select-xcode diff --git a/.github/workflows/webrtc.yml b/.github/workflows/webrtc.yml index cb09e3d41b..ac33048301 100644 --- a/.github/workflows/webrtc.yml +++ b/.github/workflows/webrtc.yml @@ -156,10 +156,18 @@ jobs: if: needs.gate.outputs.should_run == 'true' name: Build example (iOS) timeout-minutes: 45 - runs-on: { group: scaleway-macos } + runs-on: xcode-27 steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Select Xcode uses: ./.github/actions/select-xcode @@ -182,10 +190,18 @@ jobs: if: needs.gate.outputs.should_run == 'true' name: Build example (macOS) timeout-minutes: 45 - runs-on: { group: scaleway-macos } + runs-on: xcode-27 steps: + # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job + # makes no other GitHub call, so it runs on a free standard runner. - name: Git Checkout - uses: actions/checkout@v7 + run: | + git init -q . + git fetch -q --depth=1 --no-tags "https://github.com/$REPOSITORY" "$SHA" + git checkout -q FETCH_HEAD + env: + REPOSITORY: ${{ github.repository }} + SHA: ${{ github.sha }} - name: Select Xcode uses: ./.github/actions/select-xcode From e6e9e4f9a1f32482c240f1ba2dab278ffc5b3acc Mon Sep 17 00:00:00 2001 From: Rene Floor Date: Fri, 27 Nov 2026 11:54:46 +0100 Subject: [PATCH 4/4] ci(repo): measure the iOS size with Xcode 27.1 On the xcode-27 image, pinned to 27.1. The first push to v2 stores a new iOS benchmark. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/sdk_size.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sdk_size.yml b/.github/workflows/sdk_size.yml index f6ff105761..3725f82d1d 100644 --- a/.github/workflows/sdk_size.yml +++ b/.github/workflows/sdk_size.yml @@ -76,8 +76,7 @@ jobs: github.event_name != 'pull_request' || (startsWith(github.head_ref, 'release/') && github.event.pull_request.draft == false) timeout-minutes: 60 - # Pinned, so a runner image update doesn't change the iOS numbers. - runs-on: macos-26 + runs-on: xcode-27 steps: # Anonymous checkout: the org IP allow list refuses only signed-in requests, and this job # makes no other GitHub call, so it runs on a free standard runner. @@ -90,10 +89,11 @@ jobs: REPOSITORY: ${{ github.repository }} SHA: ${{ github.sha }} + # Pinned, so a runner image update doesn't change the iOS numbers. - name: Select Xcode uses: ./.github/actions/select-xcode with: - xcode-version: "26.3.0" + xcode-version: "27.1" - name: Install Flutter uses: ./.github/actions/setup-flutter