Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump GitHub Action versions #387

Merged
merged 11 commits into from Apr 21, 2022
Merged

Bump GitHub Action versions #387

merged 11 commits into from Apr 21, 2022

Conversation

domesticmouse
Copy link
Contributor

Pre-launch Checklist

  • I read the Effective Dart: Style recently, and have followed its advice.
  • I signed the CLA.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-devrel channel on Discord.

@domesticmouse
Copy link
Contributor Author

Hey @jmagman, any ideas on how to fix the macOS compilation on beta? I've tried installing rosetta, but it looks like I'm holding it wrong.

@domesticmouse
Copy link
Contributor Author

Hey @mit-mit, looks like we have a CI issue with the Dart included in Flutter 2.13.0-0 on GitHub actions for macOS only.

Context: https://github.com/flutter/codelabs/runs/6050738007?check_suite_focus=true#step:5:10

@mit-mit
Copy link
Member

mit-mit commented Apr 19, 2022

I tought we were adding ARM64 support, so do we still need Rosetta enabled? cc @cbracken

@jmagman
Copy link
Member

jmagman commented Apr 19, 2022

I tought we were adding ARM64 support, so do we still need Rosetta enabled? cc @cbracken

Yes, flutter tooling still requires Rosetta, in particular when a macOS app builds x64 in release mode on arm64 it uses the x64 version of gen_snapshot.

However that Run dart --version ...: Bad CPU type in executableerror means that the x64 version of dart is being downloaded instead of the arm64 version.

Screen Shot 2022-04-19 at 1 15 13 PM

Where is that cache coming from?

@domesticmouse
Copy link
Contributor Author

Hey @jmagman,

If I attempt to enable rosetta on GitHub Actions without an architecture guard it dies, because GitHub Actions is (currently) running on Intel CPUs. I think this PR is worth landing for the future when GitHub gets M1 (or M2) based build bots, but as you can see, adding Rosetta isn't fixing this build failure. So, we need another fix. Halp?

@jmagman
Copy link
Member

jmagman commented Apr 19, 2022

GitHub Actions is (currently) running on Intel CPUs

Oh weird, then maybe it's the opposite, the version of dart being used is arm instead of x64?

@domesticmouse domesticmouse mentioned this pull request Apr 20, 2022
4 tasks
@domesticmouse domesticmouse changed the title Add rosetta to CI Add Rosetta to CI Apr 20, 2022
@mit-mit
Copy link
Member

mit-mit commented Apr 20, 2022

From the CI it's failing with Flutter flutter/2.13.0-0.1.pre-beta/. Looking at https://docs.flutter.dev/development/tools/sdk/releases?tab=macos, that is the first ever release that has both x64 and arm, so I wonder if this is a bug in setup-flutter, that it picks arm when it should be picking x64?

@domesticmouse
Copy link
Contributor Author

domesticmouse commented Apr 20, 2022

@mit-mit whom do we hassle to set up a test to start debugging setup-flutter?

@mit-mit
Copy link
Member

mit-mit commented Apr 20, 2022

I think an issue filed here? https://github.com/subosito/flutter-action/issues

@jmagman
Copy link
Member

jmagman commented Apr 20, 2022

They merged this 2 days ago subosito/flutter-action#147

@jmagman
Copy link
Member

jmagman commented Apr 20, 2022

So this would need to be updated

- uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8

-  - uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
+  - uses: subosito/flutter-action@6a13bd08366a2aafe8605f064f9d5a42107e6f1f

@@ -30,6 +30,15 @@ jobs:
- uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
- uses: subosito/flutter-action@6a13bd08366a2aafe8605f064f9d5a42107e6f1f

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hand applied

.github/workflows/flutter-ci.yml Outdated Show resolved Hide resolved
domesticmouse and others added 2 commits April 21, 2022 10:30
Co-authored-by: Jenn Magder <magder@google.com>
@domesticmouse domesticmouse changed the title Add Rosetta to CI Bump GitHub Action versions Apr 21, 2022
@@ -23,11 +23,12 @@ jobs:
flutter_version: [stable, beta]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3.0.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use hashes here? the one for v3.0.1 is dcd71f646680f2efd8db4afa5ad64fdcba30e748

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3.0.1
- uses: actions/setup-java@v3.1.1
with:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash for this version is 9519cf1382ac8dc61ad461f7f7cb45f033220189

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@godofredoc godofredoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to enable dependabot to automate the dependency updates in the future.

@domesticmouse
Copy link
Contributor Author

We may want to enable dependabot to automate the dependency updates in the future.

How do I enable dependabot to update GitHub actions?

@parlough
Copy link
Member

@godofredoc
Copy link
Contributor

@domesticmouse Here's how flutter/website does so: https://github.com/flutter/website/blob/main/.github/dependabot.yml#L14-L17

You'll need to create a file in .github/dependabot.yml with lines 1-5 and 14-17.

with:
distribution: 'zulu' # See https://github.com/actions/setup-java#supported-distributions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to add this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The distribution is now required for setup-java. There is a choice of java distributions, with zulu being but one. We could alternatively use adopt-hotspot or temurin if that would be more appropriate.

@domesticmouse
Copy link
Contributor Author

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pub"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also recommend to enable the npm ecosystem for packages-lock.json files in in_app_purchases/. It seems like those files also require multiple updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants