Skip to content

Conversation

@robandpdx
Copy link

@robandpdx robandpdx commented Feb 8, 2024

Summary

This pull request converts the CircleCI workflows to GitHub actions workflows.

Errors

The linux job fails with the following unit test failure...

Error
-- Testing: 1976 tests, 4 threads --
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 
FAIL: Hermes-Unit :: VMRuntime/./HermesVMRuntimeTests/GCReturnUnusedMemoryTest.CollectReturnsFreeMemory (1808 of 1976)
******************** TEST 'Hermes-Unit :: VMRuntime/./HermesVMRuntimeTests/GCReturnUnusedMemoryTest.CollectReturnsFreeMemory' FAILED ********************
Note: Google Test filter = GCReturnUnusedMemoryTest.CollectReturnsFreeMemory
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from GCReturnUnusedMemoryTest
[ RUN      ] GCReturnUnusedMemoryTest.CollectReturnsFreeMemory
/home/runner/work/hermes/hermes/hermes/unittests/VMRuntime/GCReturnUnusedMemoryTest.cpp:68: Failure
Expected: (*before) < (*touched), actual: 3009 vs 3009
[  FAILED  ] GCReturnUnusedMemoryTest.CollectReturnsFreeMemory (5 ms)
[----------] 1 test from GCReturnUnusedMemoryTest (5 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (5 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] GCReturnUnusedMemoryTest.CollectReturnsFreeMemory

 1 FAILED TEST

********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Testing Time: 13.21s
********************
Failing Tests (1):
    Hermes-Unit :: VMRuntime/./HermesVMRuntimeTests/GCReturnUnusedMemoryTest.CollectReturnsFreeMemory

  Expected Passes    : 1848
  Unsupported Tests  : 127
  Unexpected Failures: 1

Test Plan

The workflows was tested in my fork. Here is the latest workflow run in my fork.

https://fburl.com/workplace/f6mz6tmw

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 8, 2024
@mattbfb
Copy link
Contributor

mattbfb commented Feb 9, 2024

Thanks for putting this together! I think the windows failures are unrelated and will have fix landing shortly. I am curious about what we could do for the android test cases that don't currently seem to be included.

@robandpdx
Copy link
Author

I am curious about what we could do for the android test cases that don't currently seem to be included.

If we can identify a suitable docker image for the android jobs, I'd be happy to make another PR for these. Let me know please.

@mattbfb
Copy link
Contributor

mattbfb commented Mar 6, 2024

@robandpdx I think we want to do largely the same as React Native here for the android tests. I see their PR is coming along as well (facebook/react-native#42931), but it's not obvious to me how to answer the question of which docker image is being used. I think their android tests are being invoked here.

@robandpdx
Copy link
Author

robandpdx commented Mar 7, 2024

@mattbfb Are the android tests being run in circleci currently? Can you point me to the circleci config please?

@mattbfb
Copy link
Contributor

mattbfb commented Mar 7, 2024

@robandpdx
Copy link
Author

@mattbfb Thanks! I'll add that. Any idea what this error is with the linux job in my fork? Fresh rebase today.

@mattbfb
Copy link
Contributor

mattbfb commented Mar 11, 2024

@robandpdx Hm, I'm not sure. Is there any way we can debug these as they run in GitHub actions?

@robandpdx
Copy link
Author

@robandpdx Hm, I'm not sure. Is there any way we can debug these as they run in GitHub actions?

@mattbfb The best way to debug this is probably to run the commands from the workflow in a fresh ubuntu 20.04 linux vm.

@robandpdx
Copy link
Author


The test-e2e-intl job fails with the following error.

Error
FAILURE: Build failed with an exception.

* Where:
Build file '/__w/hermes/hermes/hermes/android/build.gradle' line: 35

* What went wrong:
A problem occurred evaluating root project 'Hermes'.
> Hermes host build not found. Expression: (hermesC != ). Values: hermesC = 

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Error: Process completed with exit code 1.

The test-e2e job fails with the following error.

Error
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':packages:rn-tester:android:app:installHermesRelease'.
> com.android.builder.testing.api.DeviceException: No connected devices!

@mattbfb
Copy link
Contributor

mattbfb commented Mar 28, 2024

@robandpdx I did some digging through the build; the first error appears to be because the testing step expects Hermes to be cloned and built from the directory contained in the HERMES_WS_DIR environment variable. I'm not familiar with actions/checkout, but I'm guessing it's just a matter of adjusting the path where it checks out the repo (and possibly changing the current directory into that directory before running the build).

The second error appears to be a lack of a running android instance. Does the image being used contain (and launch) an Android simulator? The CircleCI version used an image that had an android simulator, and launched it using the start-emulator-and-run-tests command. (https://circleci.com/developer/orbs/orb/circleci/android)

@robandpdx
Copy link
Author

the testing step expects Hermes to be cloned and built from the directory contained in the HERMES_WS_DIR environment variable. I'm not familiar with actions/checkout, but I'm guessing it's just a matter of adjusting the path where it checks out the repo (and possibly changing the current directory into that directory before running the build).

@mattbfb Thank you for the help here. I'll see if I adjust the HERMES_WS_DIR environment variable to make this work.

The second error appears to be a lack of a running android instance. Does the image being used contain (and launch) an Android simulator? The CircleCI version used an image that had an android simulator, and launched it using the start-emulator-and-run-tests command. (https://circleci.com/developer/orbs/orb/circleci/android)

The test-e2e job is running inside the reactnativecommunity/react-native-android:latest container on ubuntu-20.04. On the host, I don't believe any android simulator exists. Would the android simulator be provided by the container, perhaps? Sorry for my ignorance here. Android development is not my forté.

@mattbfb
Copy link
Contributor

mattbfb commented Apr 22, 2024

@robandpdx I think that's all correct, and I see tests now appear to be passing!

@facebook-github-bot
Copy link
Contributor

@mattbfb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mattbfb
Copy link
Contributor

mattbfb commented May 13, 2024

@robandpdx This one is looking good and on its way to land. Thanks!

Can you perform the same porting for the "Static Hermes" project (https://github.com/facebook/hermes/tree/static_h)? It has a CircleCI build in the same location, but with a much simpler implementation (https://github.com/facebook/hermes/blob/static_h/.circleci/config.yml)

@robandpdx
Copy link
Author

robandpdx commented May 20, 2024

Can you perform the same porting for the "Static Hermes" project (https://github.com/facebook/hermes/tree/static_h)? It has a CircleCI build in the same location, but with a much simpler implementation (https://github.com/facebook/hermes/blob/static_h/.circleci/config.yml)

@mattbfb I can. I'm in a holding pattern currently because our engagement has run out of hours. I believe more hours will be allocated to this effort in the not so distant future. When/if that happens, I'll get it done.

@facebook-github-bot
Copy link
Contributor

@mattbfb merged this pull request in 0c838a1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants