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

Build macOS and iOS versions in CI #88

Closed
garyp opened this issue Sep 11, 2020 · 7 comments · Fixed by #163
Closed

Build macOS and iOS versions in CI #88

garyp opened this issue Sep 11, 2020 · 7 comments · Fixed by #163
Labels
bug Something isn't working
Milestone

Comments

@garyp
Copy link
Collaborator

garyp commented Sep 11, 2020

Our GitHub Actions build currently runs in a Linux VM, so it doesn't build nor publish the macOS and iOS variants of pbandk. We need to add CI jobs that run on a macOS VM. See https://medium.com/bumble-tech/continuous-delivery-for-your-kotlin-multiplatform-library-3ab5ad5cba59 for an example of how to make the gradle builds conditional on the platform they're running on, and https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners for details on platforms available for GitHub Actions jobs.

@garyp garyp added the bug Something isn't working label Sep 11, 2020
@garyp garyp added this to the 1.0 milestone Sep 11, 2020
@itegulov
Copy link
Contributor

@garyp my team is interested in this. So far we have had to publish and use our own artifacts of pbandk on iOS, but ideally we would like to use the mainstream ones of course.

So, as an initial step I have taken a look at the GitHub workflow you have right now and I have a couple of questions:

  1. Do you want to run Kotlin/Native tests and native conformance tests on macOS as well as on Linux? In other words, do you want to set up two different jobs that essentially do the same thing but on two different platforms?
  2. Do you want to run macOS tests both for PRs and for releases?

In general, I don't know what kind of limitation Github Actions has in terms of for how long you can use macOS machines for your jobs. If you know any specific numbers and/or think I should be aware of some other limitation, please let me know.

@garyp
Copy link
Collaborator Author

garyp commented Jun 29, 2021

@garyp my team is interested in this. So far we have had to publish and use our own artifacts of pbandk on iOS, but ideally we would like to use the mainstream ones of course.

Hi @itegulov. That would be very appreciated!

So, as an initial step I have taken a look at the GitHub workflow you have right now and I have a couple of questions:

  1. Do you want to run Kotlin/Native tests and native conformance tests on macOS as well as on Linux? In other words, do you want to set up two different jobs that essentially do the same thing but on two different platforms?

Yep exactly. The job that runs on macOS should run unit tests and conformance tests for macOS, iOS, etc. The job that runs on Linux should run the tests for Linux, JVM, JS, etc. You can avoid defining two separate jobs by using matrix jobs in GitHub Workflows to define a single job that runs across multiple platforms.

  1. Do you want to run macOS tests both for PRs and for releases?

Yep. Same as the existing jobs.

In general, I don't know what kind of limitation Github Actions has in terms of for how long you can use macOS machines for your jobs. If you know any specific numbers and/or think I should be aware of some other limitation, please let me know.

The main limitation with macOS machines on GitHub is just that they're quite expensive. So we should only use them for builds that can't be run on non-macOS hardware. Any builds/tests/etc. that can run on Linux should not be run on the macOS machines.

I'd recommend starting out with having macOS run all the same jobs we run on Linux (PR tests, release tests, release publishing, etc.). If that ends up being too expensive or make PR tests take too long then we can look into running some of the macOS jobs less often.

@Sonicskater
Copy link

Our team is also interested in this issue, if another hand would be helpful I can try to support this issue as well, although it looks like the work is just pending review.

@garyp garyp modified the milestones: 1.0, 0.11.0 Aug 6, 2021
@garyp
Copy link
Collaborator Author

garyp commented Sep 22, 2021

The PR from @itegulov looks good so far. I apologize it took me a bit of time to review initially. It needs more work to be completed and I haven't heard back from @itegulov in a few weeks. @Sonicskater if you wanted to pick up the PR and finish it up, that would be great.

@itegulov
Copy link
Contributor

@garyp sorry, indeed I did not have much free time lately and it does not seem like I will get it anytime soon. So if anyone wants to overtake my PR, please feel free to do so.

@garyp garyp modified the milestones: 0.11.0, 0.12.0 Sep 24, 2021
@garyp
Copy link
Collaborator Author

garyp commented Oct 28, 2021

@itegulov @Sonicskater @ATN82 This is now merged! Snapshot builds should be available in about 30 minutes if you'd like to try them out. This will be released in v0.12.0 of pbandk, which should happen in the next couple weeks.

@ATN82
Copy link

ATN82 commented Oct 28, 2021

Wonderful. Looking forward to the v0.12.0. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants