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

chore: moved android e2e to ubuntu #2196

Merged
merged 18 commits into from
Jun 21, 2024
Merged

Conversation

alduzy
Copy link
Member

@alduzy alduzy commented Jun 19, 2024

Description

This PR intents to move android e2e test to ubuntu to avoid random crashes. Inspired by changes made by @kirillzyusko in react-native-keyboard-controller.

Changes

  • Changed workflow's runs-on
  • Bump deps
  • Added necessary extra steps

Test code and steps to reproduce

Checklist

  • Ensured that CI passes

@kirillzyusko
Copy link
Contributor

One thing I want to warn you in advance is that you will need to use clean-diskspace action (don't remember precise name).

Otherwise CI will fail due to insufficient memory heap (it may work in this PR, but after merging it may also start to fail randomly - at least that's what I had in my repository).

And also I don't see enabling KVM action - without KVM emulator will not run as far as I remember (but maybe KVM is already enabled by default in newest GH runners 🤷‍♂️).

@alduzy
Copy link
Member Author

alduzy commented Jun 19, 2024

@kirillzyusko thanks! I saw that you added such step (Free Disk Space (Ubuntu) from: https://github.com/marketplace/actions/free-disk-space-ubuntu). I am going to add it later on, just curious to see how the workflow behaves without it 😄 .

Well I have to admit I did not know what is the purpose of enabling KVM step and wanted to try without it as well, but it looks like it's necessary indeed.

@kirillzyusko
Copy link
Contributor

@alduzy I see that workflow is constantly failing - you may want to try to change target to default 👀 At least it's the only difference that I see that could cause CI failures 🤔

I think I was the person who changed it to aosp_atd in RNS repository, but maybe on linux machine it should be again default 🤷‍♂️

@alduzy alduzy marked this pull request as ready for review June 21, 2024 10:53
@alduzy
Copy link
Member Author

alduzy commented Jun 21, 2024

Looks like the workflow is running stable after merging fixes from main branch.

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

This looks really promising. Let's trigger the CI few times in a row by hand, so we can see whether it is more stable or not.

One thing I noticed is that you didn't setup AVD cache? Why don't we want this? Won't it speedup the CI?

Comment on lines +60 to +64
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
Copy link
Member

Choose a reason for hiding this comment

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

It would be best to understand why kvm is needed here and what do we do here 😄

But if it works I guess we're just fine w/o it 🤷🏻‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

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

Testing the workflow without it right now 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

It is used by android-emulator-runner and it's necessary. I'm bringing it back

Copy link
Member

Choose a reason for hiding this comment

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

Great find!

Copy link
Member

Choose a reason for hiding this comment

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

What about the caches I asked in the main message?

Copy link
Contributor

Choose a reason for hiding this comment

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

In my case AVD cache helped to shave off 1-2 minutes when I boot the emulator. Curious to see the result in your project 👀

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

Not gonna lie, 13 minutes seems awesome & it looks quite stable.

@alduzy alduzy merged commit 8d9a278 into main Jun 21, 2024
2 checks passed
@alduzy alduzy deleted the @alduzy/move-android-e2e-to-ubuntu branch June 21, 2024 14:24
alduzy added a commit that referenced this pull request Jun 28, 2024
## Description

This PR intents to move android e2e test to ubuntu to avoid random
crashes. Inspired by changes made by @kirillzyusko in
[react-native-keyboard-controller](https://github.com/kirillzyusko/react-native-keyboard-controller).

## Changes

- Changed workflow's `runs-on`
- Bump deps
- Added necessary extra steps

<!--

## Screenshots / GIFs

Here you can add screenshots / GIFs documenting your change.

You can add before / after section if you're changing some behavior.

### Before

### After

-->

## Test code and steps to reproduce

<!--
Please include code that can be used to test this change and short
description how this example should work.
This snippet should be as minimal as possible and ready to be pasted
into editor (don't exclude exports or remove "not important" parts of
reproduction example)
-->

## Checklist

- [x] Ensured that CI passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants