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

CI: Use separate scheduled pipeline for Flutter beta builds #28

Merged
merged 3 commits into from
Oct 23, 2021

Conversation

kuhnroyal
Copy link
Collaborator

Simple approach but should be enough for now.
Hope the caching works with 2.5.x.
This should also speed up the single steps by a lot.

* build PRs and main with fixed stable version to improve build times
@m0nac0
Copy link
Collaborator

m0nac0 commented Oct 20, 2021

@kuhnroyal Just to make sure, you intended this to still be a draft, right?

@kuhnroyal
Copy link
Collaborator Author

This is just an idea, if you think this is a possible solution for now then I can mark it ready.
It would be interesting to see if the check times improve after repeated usage of the same fixed version.

Maybe you can re-run the check a couple times.

@m0nac0
Copy link
Collaborator

m0nac0 commented Oct 20, 2021

Ah, I see. I get the split between stable flutter for PRs and beta flutter on a cron job. But I don't understand why this would improve run times. What is being cached?
I remember setting up caching for flutter in Github Actions in the past, but that involved using the cache action.

@kuhnroyal
Copy link
Collaborator Author

Well the hope is for 2.5.x but I think we probably need to pin it directly. Then the Flutter SDK should be cached automatically.

@m0nac0
Copy link
Collaborator

m0nac0 commented Oct 20, 2021

Ah interesting, was the flutter action updated to support this? I thought it wasn't supported because subosito/flutter-action#16 is still open...

@kuhnroyal
Copy link
Collaborator Author

I see, I mostly use private runners which behave differently here. So this might not work at all :(

Still think we should run the main CI flow on stable and have a cron trigger for beta.
Not sure if it is worth to combine steps to save 50s build time which is run in parallel anyways.
You also lose the direct feedback on what failed and have to look int the logs of the steps instead.

@m0nac0
Copy link
Collaborator

m0nac0 commented Oct 21, 2021

Yeah I agree about having these two separate CI workflows. I've added caching of flutter as a test. For macos this is a noticeable speedup in my experience, ubuntu remains to be seen.

The dilemma here was previously: in the cache-key you need to specify the flutter version, otherwise you could never update flutter, because the old flutter version would always be restored from cache. But there is no (easy) API for retrieving the latest flutter version on a channel. So if you wanted to just use a flutter channel (and not a specific version), you'd first need to always install flutter to find out the latest version. At that point, caching is useless.

If we pin the flutter version, this is not a problem, anymore.

@kuhnroyal
Copy link
Collaborator Author

Sounds good, should probably set it to 2.5.3 then.

@kuhnroyal kuhnroyal marked this pull request as ready for review October 21, 2021 14:06
@m0nac0 m0nac0 merged commit a7681eb into maplibre:main Oct 23, 2021
@kuhnroyal kuhnroyal deleted the feature/ci-improvements branch July 13, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants