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

Android release binaries #6480

Closed

Conversation

martindevans
Copy link
Contributor

As discussed here. This adds Android targets to the build matrix (Android aarch64 and x86_64) and adds Android to the docs in "tier3". This will make wasmtime more convenient to use on Android devices.

I'm not very familiar with Github actions, so it's very possible that this isn't correct. Unfortunately I wasn't able to work out how to run this action in my fork to test it. If anyone can offer guidance on how to do that it would be much appreciated!

@github-actions github-actions bot added the wasmtime:docs Issues related to Wasmtime's documentation label May 30, 2023
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Can you add a commit to this PR which has "prtest:full" in its commit message somewhere? That way this PR's CI will run the build step which can help weed out issues and ensure everything looks good too.

Comment on lines 732 to 733
- run: rustup target add aarch64-linux-android
- run: rustup target add x86_64-linux-android
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two lines can be omitted due to the step just above these

.github/workflows/main.yml Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
@martindevans
Copy link
Contributor Author

Thanks for the feedback.

I just added prtest:full into the latest commit. Once that's finished I'll look into the other comments in more detail and then ping you :)

 - Added some conditions to skip android steps in on-android targets
@martindevans
Copy link
Contributor Author

From the look of the failure message:

Run ./.github/actions/binary-compatible-builds
unable to prepare context: path "/home/runner/work/wasmtime/wasmtime/ci/docker/aarch64-android" not found

It looks like there should be two new dockerfiles, x86_64-android and aarch64-android. I just want to check if that sounds right before I try to do that?

@alexcrichton
Copy link
Member

Ah yes non-Windows and non-macos builds currently all go through Docker. Given though that cargo ndk is being used here with GitHub Actions I think it's reasonable to skip docker for these builds. You can add some more special cases here to skip the CENTOS business for android builds.

@martindevans
Copy link
Contributor Author

Unfortunately I had to abandon this work. I don't know Rust build systems or GitHub actions very well, and this wasn't a good way to learn! 😆

alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 12, 2024
This commit is inspired by bytecodealliance#6480 and historical asks for Android
binaries. This does the bare minimum necessary to configure C compilers
such that we can produce binaries but I'll admit that I'm no Android
developer myself so I have no idea if these are actually suitable for
use anywhere. Otherwise though this build subsumes the preexisting check
in CI that the build works for Android, so that part is removed too.

This additionally changes how the NDK is managed from before. Previously
a GitHub Action was used to download Java and the NDK and additionally
used the `cargo ndk` subcommand. That's all removed now in favor of
configuring C compilers directly with a pre-installed version of the NDK
which should help reduce the CI dependencies a bit.
github-merge-queue bot pushed a commit that referenced this pull request May 13, 2024
* Add Android release binaries to CI

This commit is inspired by #6480 and historical asks for Android
binaries. This does the bare minimum necessary to configure C compilers
such that we can produce binaries but I'll admit that I'm no Android
developer myself so I have no idea if these are actually suitable for
use anywhere. Otherwise though this build subsumes the preexisting check
in CI that the build works for Android, so that part is removed too.

This additionally changes how the NDK is managed from before. Previously
a GitHub Action was used to download Java and the NDK and additionally
used the `cargo ndk` subcommand. That's all removed now in favor of
configuring C compilers directly with a pre-installed version of the NDK
which should help reduce the CI dependencies a bit.

* Review comments

* List Android as tier 3 target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:docs Issues related to Wasmtime's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants