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

Set up presubmit tests #12

Closed
ahumesky opened this issue Sep 9, 2022 · 8 comments
Closed

Set up presubmit tests #12

ahumesky opened this issue Sep 9, 2022 · 8 comments
Assignees
Labels
enhancement New feature or request P1

Comments

@ahumesky
Copy link
Collaborator

ahumesky commented Sep 9, 2022

At minimum they should build the example app (https://github.com/bazelbuild/rules_android_ndk/tree/main/examples/basic) and ideally the resulting apk would be tested on an emulator / virtual device.

See also
#7
bazelbuild/continuous-integration#1425

This might be useful as inspiration too:
https://github.com/DanAlbert/ndk-app-template/blob/main/.github/workflows/build.yml

@ahumesky ahumesky added enhancement New feature or request P1 labels Sep 9, 2022
@ahumesky ahumesky self-assigned this Sep 9, 2022
@keith
Copy link
Member

keith commented Sep 9, 2022

The terraform changes in bazelbuild/continuous-integration#1425 should solve this, it will create a pipeline for this, someone will have to hook up webhooks though

@meteorcloudy
Copy link
Member

meteorcloudy commented Sep 9, 2022

I have set up the webhook, the presubmit is available for PRs now, see #13 and https://buildkite.com/bazel/rules-android-ndk/builds/2

But there are some failures, it looks like you are trying to put a BUILD file in the Android SDK installation directory? On Bazel CI, that directory is mounted in the docker container from the host VM, so it's not writable. Is there a way to avoid doing that?

See https://github.com/bazelbuild/continuous-integration/blob/d0accaf7a76e9f4f58f4773dcccb5233882e9b97/buildkite/terraform/bazel/pipeline.yml.tpl#L32

meteorcloudy added a commit to bazelbuild/continuous-integration that referenced this issue Sep 9, 2022
meteorcloudy added a commit to bazelbuild/continuous-integration that referenced this issue Sep 9, 2022
@ahumesky
Copy link
Collaborator Author

That the rule is incidentally creating build files in the real NDK directory is a known issue: #3

I'll work on solving that next

@ahumesky
Copy link
Collaborator Author

Looks like we'll also need to update the version of the NDK on CI:
#13 (comment)

@ahumesky
Copy link
Collaborator Author

Presubmit should now work for linux:
#14 (comment)

It may take some time for mac to be set up

Some commits in the course of setting this up:
40e17b3
9caf964
254cb3b
2a3c13b

@keith
Copy link
Member

keith commented Sep 21, 2022

I think we're all good here

@ahumesky
Copy link
Collaborator Author

it would be good to also run the apk that's built on an emulator, to make sure the artifact actually works, something like what's done here:
https://github.com/DanAlbert/ndk-app-template/blob/f1558c77f4ac563ccfc1dbd41222d4616900b5ba/.github/workflows/build.yml#L63

but that can be its own issue

@ahumesky
Copy link
Collaborator Author

#23

fmeum pushed a commit to fmeum/continuous-integration that referenced this issue Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1
Projects
None yet
Development

No branches or pull requests

3 participants