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/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/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/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/sdk_size.yml b/.github/workflows/sdk_size.yml index a4c1ad0536..3725f82d1d 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 @@ -69,16 +76,24 @@ 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: { 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 }} + + # 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 diff --git a/.github/workflows/stream_video_flutter_workflow.yml b/.github/workflows/stream_video_flutter_workflow.yml index 28038de8c8..0d33064d63 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 @@ -280,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/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..ac33048301 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 @@ -134,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 @@ -160,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 @@ -201,11 +239,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 +269,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 +311,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