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

Support Android Native targets #122

Closed
elizarov opened this issue Feb 17, 2020 · 9 comments
Closed

Support Android Native targets #122

elizarov opened this issue Feb 17, 2020 · 9 comments

Comments

@elizarov
Copy link
Contributor

This is needed for Kotlin/kotlinx.coroutines#812
See also Kotlin/kotlinx.coroutines#1808

@elizarov
Copy link
Contributor Author

This shoud be as easy as adding the following lines to atomicfu/build.gradle:

            addTarget(presets.androidNativeArm32)
            addTarget(presets.androidNativeArm64)
            addTarget(presets.androidNativeX86)
            addTarget(presets.androidNativeX64)

It builds successfully. But we need to test it somehow.

@piiertho
Copy link

piiertho commented Feb 20, 2020

Hi @elizarov !

I guess I will try to compile it and use it on the kotlin wrapper for Godot in a first time.
Then I'll see if I have an idea to make test and run them in CI.

You talked about infrastructure limitation to do the test, can you give some insight about those limitations ?

@elizarov
Copy link
Contributor Author

elizarov commented Mar 13, 2020

We have not explored yet how to set up a test for the Android/Native code that is compiled that way. Probably, it needed to be run under Android emulator and we have not looked yet at how we can make it happen on our CI via Gradle.

@piiertho
Copy link

piiertho commented Mar 13, 2020

We have not explored yet how to set up a test for the Android/Native code that is compiled that way. Probably, it needed to be run under Android emulator and we have not looked yet at how we can make it happen on our CI via Gradle.

That was my first thinking. I'll try it as soon as I d'une the time to do it :)

@natario1
Copy link

natario1 commented Sep 3, 2020

Is there any progress on this issue? Are you using your own internal CI? How can one contribute exactly?

@elizarov
Copy link
Contributor Author

We don't have resources to work on it at the moment.

@glootjofo
Copy link

I think a lot of people want to help on this, but seeing your CI pipeline is closed, could you perhaps either make it possible for people to contribute to it, or just swap to github actions? There is a lot of will, but we can't help you guys, and it sucks.

@natario1
Copy link

I released a Gradle Plugin that does all the steps needed to test androidNative* binaries (long list - install android command line tools, download needed components, workaround different bugs, select and launch the emulator, ...) and soon android JVM.

I'll open a PR here just in case. I cannot contribute to the team city config, but I think you could add ./gradlew runAllAndroidNativeTests somewhere. There is a single requirement to use the plugin (hardware acceleration) which should not be so hard to meet - the plugin repo tests itself on Github Actions and CirrusCI.

I have tested the atomicfu suite and tests pass for all androidNative* targets, with the exception of arm32 (spotted the bug and fixed it in Jetbrains/Kotlin). That is the least useful arch so we could definitely ship without it. And if we do, I can do the same for coroutines Kotlin/kotlinx.coroutines#812 .

What do you think @elizarov ? I know that you are working on a formal classification of targets to mark some of them as untested, but since we now have a test tool, it would be nice to use it? For example, I discovered KT-49348 thanks to running atomicfu tests and it will help non-android targets too.

@mvicsokolova
Copy link
Collaborator

We are working internally on guarantees that we are ready to provide for each individual target (as well as the overall understanding which targets we are going to support) and as soon as the public guarantees are published, we'll add each supported target to all our libraries at once

qwwdfsad added a commit that referenced this issue Feb 21, 2023
mvicsokolova pushed a commit that referenced this issue Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants