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

Add GitHub actions workflow #2290

Closed
wants to merge 1 commit into from
Closed

Conversation

anuraaga
Copy link
Collaborator

@anuraaga anuraaga commented Dec 2, 2019

This is a strawman's proposal to add a GitHub actions-based build for Armeria. I have been playing with it, mostly to get used to the syntax. I wasn't so interested in merging it in without finding a significant advantage to the current build - then we had the breakage on MacOS X :) My CI runs were broken on Mac at the time but since I was experimenting with the scripts still, I assumed it was a problem with the CI, not the code. It made me think that it'd be good to have continuous build running on Mac - GitHub Actions makes it easy to run on Linux, Windows, and Mac.

Pros:

  • Adds MacOS X build
  • Fairly simple YAML syntax. In particular, support for caching removes a lot of boilerplate we have related to it
  • Builds viewable directly in GitHub UI. In particular, it's nice that artifacts are available from the UI instead of finding the file.io link.
  • No tricks to use cache, all OS's support it out of the box
  • Can retry builds from UI

Cons:

  • Slower machines, 2CPU vs I think we currently use 4CPU ones. The number of parallel builds is generous, so with many of them we could claim lots of resources, but in general I guess builds are slower. This build with cache hits took ~25M. Most time is spent on the coverage build. https://github.com/anuraaga/armeria/commit/6a9a9e76d79a1aca3a32397bedf46c00b765766d/checks?check_suite_id=337250391
  • Vastly slower Windows machine. Everyone seems to be finding the Windows machine to be much slower than Appveyor's. This doesn't hurt us so much in terms of build time since the reduced build commands means it still finishes earlier than others. But many more test flakes become apparent due to timing issues at the seconds-level. Admittedly, this could be considered an issue with the tests and not the CI.
  • No great support for codecov right now (Is there a way to make this work with a PR from a fork codecov/codecov-action#29). That being said, I'm not sure there's a huge danger to embedding CODECOV_TOKEN as a non-secret.

Options:

  • Only use GitHub Actions for MacOS X build. We avoid the slow machines issue but pay the price of maintaining two different build configs. We used to do it for Windows so maybe not a big deal.
  • Add the full GitHub Actions workflow without removing AppVeyor. Since we don't pay for resources, it doesn't really hurt to keep it in action (pun intended) and allows monitoring it's build performance. But duplicate builds can confuse users
  • Remove Appveyor and only use GitHub Actions. We get all the cons above, and would need to expose a codecov token publically (or not have coverage on pull requests which is probably worse)
  • Don't use GitHub Actions. Actually since I started on this, it seems that Appveyor supports Mac OS X too now on request, so maybe don't need GitHub Actions. https://www.appveyor.com/blog/2019/11/20/build-macos-projects-with-appveyor/

Note :the GitHub Actions build will mostly fail until #2284

@anuraaga
Copy link
Collaborator Author

anuraaga commented Dec 2, 2019

Actually just noticed, it seems since LINE is a paid organization, actions don't work even though the repo is open source... I suspect it should be allowed though so maybe need to ask support if going through with the idea.

image

@ikhoon ikhoon added the cleanup label Dec 2, 2019
@syleeeee
Copy link
Member

syleeeee commented Dec 2, 2019

it seems since LINE is a paid organization, actions don't work even though the repo is open source

Yes, LINE is a paid org but stays in the old plan.
GitHub Actions can be used in the user-based-plan(which is the new plan). We are in the middle of the discussion to move forward to use the new plan. But cannot confirm when. Sorry. 😭

I'll let you know when we change the plan.

@codecov
Copy link

codecov bot commented Dec 2, 2019

Codecov Report

Merging #2290 into master will increase coverage by 0.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2290      +/-   ##
============================================
+ Coverage     73.71%   73.72%   +0.01%     
- Complexity     9897     9906       +9     
============================================
  Files           871      872       +1     
  Lines         37981    37987       +6     
  Branches       4655     4655              
============================================
+ Hits          27996    28006      +10     
+ Misses         7607     7604       -3     
+ Partials       2378     2377       -1
Impacted Files Coverage Δ Complexity Δ
...eria/testing/internal/FailureLoggingExtension.java 33.33% <33.33%> (ø) 2 <2> (?)
...inecorp/armeria/server/grpc/ArmeriaServerCall.java 88.67% <0%> (+0.39%) 86% <0%> (+1%) ⬆️
...linecorp/armeria/client/HttpRequestSubscriber.java 72.32% <0%> (+0.62%) 35% <0%> (+1%) ⬆️
.../linecorp/armeria/client/Http2ResponseDecoder.java 64.16% <0%> (+0.83%) 34% <0%> (+1%) ⬆️
...rp/armeria/common/stream/DefaultStreamMessage.java 92.14% <0%> (+1.42%) 55% <0%> (+1%) ⬆️
...om/linecorp/armeria/client/HttpSessionHandler.java 72.03% <0%> (+2.54%) 33% <0%> (+2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa64d66...67d7a97. Read the comment docs.

@anuraaga
Copy link
Collaborator Author

anuraaga commented Dec 2, 2019

@syleeeee Thanks for clarifying, I didn't know they had such a plan migration. Wish they didn't show the tab in that case ;)

Guess not currently supported is the biggest con in that list then 😭

@anuraaga
Copy link
Collaborator Author

anuraaga commented Dec 3, 2019

As it'll take some time to even be able to try this will go ahead and close - would be good to get feedback on whether this seems like an ok idea in general though.

@anuraaga anuraaga closed this Dec 3, 2019
@trustin
Copy link
Member

trustin commented Dec 3, 2019

We're definitely interested and would be awesome if we can automate most of the release process using GitHub actions. 👍

@anuraaga
Copy link
Collaborator Author

anuraaga commented Dec 3, 2019

Thanks for the comment - in that case look forwarding to bringing this back soon :)

@anuraaga
Copy link
Collaborator Author

anuraaga commented Dec 4, 2019

Just to record so not forgotten, I forgot one great pro of anything non-Appveyor is much easier to retry flaky builds.

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

Successfully merging this pull request may close these issues.

4 participants