russhwolf / multiplatform-settings

A Kotlin Multiplatform library for saving simple key-value data
Apache License 2.0
1.7k stars 67 forks source link

First cut of a Github Actions based CI #30

Closed eskatos closed 4 years ago

eskatos commented 5 years ago

See https://github.com/russhwolf/multiplatform-settings/issues/21

It simply runs ./gradlew build on linux and macos agents.

I think you'd need to signup for the Github Actions beta at https://github.com/features/actions for it to be enabled on this repository.

You can see the results on my fork at https://github.com/eskatos/multiplatform-settings/actions

I had to disable the windows agents because the tests obviously fail. It's simple to add back, see https://github.com/russhwolf/multiplatform-settings/commit/03f6ef16e03616f9af3a7d8a25df9c3b80ddee99

I had to skip the iosTest tasks on non mac-machines because they can't run on linux nor windows but also skip them on CI on mac because there's no simulator available out of the box.

Feel free to discard if you want to use a different CI environment.

russhwolf commented 5 years ago

Thanks for this! I was actually going to look into setting something up on Azure at some point, but maybe Github Actions is sufficient. My priority is just to make sure it's possible to build to all native platforms so that CI isn't a blocker to expanding to Linux/Windows.

Some thoughts:

I don't love losing iosTest if I can help it. Although if push comes to shove I could maybe be convinced that macosTest is sufficient since it's using the same implementation.

Looking at the Windows issue, I'm guessing it's this Robolectric issue and will be resolved by upgrading to the most recent version, but I've only ever built this codebase on Mac so I can't say for sure.

I'd like to also build and test the sample as a sanity check (and to ensure it stays consistent). It reads from mavenLocal() first so hopefully it would be sufficient to do ./gradlew publishToMavenLocal and then run the sample tests.

I've been getting an update ready and don't expect this PR to make the cut, but would love to get CI added soon after.

russhwolf commented 4 years ago

I have a Azure configuration almost ready now, so I'm going to close this out in favor of that.