nim-lang / RFCs

A repository for your Nim proposals.
136 stars 23 forks source link

add android and iOS to CI #363

Open timotheecour opened 3 years ago

timotheecour commented 3 years ago

proposal

improve nim support for android and ios by testing for those platforms in CI.

These are important platforms, at least compared to netbsd, freebsd, openbsd.

android

nim docs

approach 1: docker

one approach could be docker, eg https://andresand.medium.com/android-emulator-on-docker-container-f20c49b129ef (see also https://github.com/nim-lang/Nim/pull/17424 which aims to run some pipelines via docker in our CI). This might be easier to test locally.

https://hub.docker.com/r/thyrlian/android-sdk/ See also https://github.com/budtmo/docker-android

approach 2: azure pipelines

see https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops

option 3: github actions

see https://medium.com/google-developer-experts/github-actions-for-android-developers-6b54c8a32f55

ios

nim docs

option 1: docker

apparently, it's still possible:

option 2: azure pipelines

option 3: github actions

see https://engineering.talkdesk.com/test-and-deploy-an-ios-app-with-github-actions-44de9a7dcef6 example: https://github.com/Apple-Actions/Example-iOS

somewhat related links

help welcome @treeform, @alaviss etc

EchoPouet commented 3 years ago

I agree that the CI should test more CPU architectures and we should already start with ARM32 and ARM64. Currently only AMD64 architecture is tested in the CI and now we can see that ARM processors become certainly the new standard for laptops (hello Apple M1 and Chromebook) but also lot of micro PC like Raspberry Pi.

If it is technically and financially possible (I don't know if it's expensive to use VM on ARM with Azure or another else) we should add the following platforms to the CI:

Furthermore, the next releases could be offered not only for AMD64 but for all these platforms.

timotheecour commented 3 years ago

CI for a given platform doesn't need to run on each PR push, nor even on each merge, that can be easily customized on a per-platform basis; the tricky part is to supporting a given platform in CI in the 1st place, the scaling aspect can be dealt with easily.

EchoPouet commented 3 years ago

Yes, others platforms can be tested in CI in the pre-release stage for example. Run CI for all platforms for every commit will be very long without any real benefit.

alaviss commented 3 years ago

ARM32/64 Linux

I already have that setup actually: https://github.com/nim-lang/Nim/pull/16396

Let me know if there is interest in getting this updated. It's just sitting there right now because I don't see any interest for it in the community.

Araq commented 3 years ago

I'm interested but I don't review "Drafts", there are too many of them. Please un-draft it.