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

CI to Build and Unit Test Various Components on Pull Requests #242

Closed
spoonincode opened this issue Nov 22, 2022 · 2 comments
Closed

CI to Build and Unit Test Various Components on Pull Requests #242

spoonincode opened this issue Nov 22, 2022 · 2 comments
Assignees
Labels
CICD Continuous integration, continuous deployment - build and test system

Comments

@spoonincode
Copy link
Member

spoonincode commented Nov 22, 2022

Add a CI workflow that builds and runs unit tests on each pull request. TrustEVM is somewhat of a "monorepo" -- it contains multiple projects that are built independently of each other. To start with, we should build and run unit tests for the following three components (anyone feel free to chime in with more that are good in the initial scope). What we don't want in this initial CI scope is a full integration test that deploys all the components, stands up a chain, etc. That might be a good thing to have (eventually) but this ticket is not it.

  1. The TrustEVM node
    This ought to be buildable with effectively a cmake && make in the root directory. Exact dependencies required are unknown to me (I believe it's expected to compile on ubuntu 20 at least? There is no README yet making stuff like this clear). Also unknown to me if there are any unit tests.
  2. Contract & Contract Unit Tests
    The contract is in contract/ and needs to be built with cdt, and the unit tests are in contract/tests which use the Native Contract Unit Tester. These are two separate cmake projects and be aware the tests assume where the contract build directory was placed in. Most likely this should leverage the same pattern as eos-system-contracts to fetch cdt & leap-dev.deb.
  3. Gateway Proxy & Tests
    This is in peripherals/gateway_proxy. The gateway proxy "driver" is Javascript requiring node16(+?) & nginx, but the tests are in C++ and require C++20 & boost 1.75+. Even Ubuntu 22.10 is still stuck on boost 1.74 so Ubuntu will not be usable here unless you build boost.

It's possible this all ends up as one workflow with a bunch of jobs. Or separate workflows for each component. Or even one root workflow activated on a PR that then calls other separate "reusable" workflows for each project. Left to the implementer to decide best approach.

Due to the repo being private, and the reportedly long build and/or test times, we may want to consider using ENF runners until the repo is public. However, the ENF runner fleet has stringent maximum run times (lowtier being the longest at 60 minutes) so we may need adjustments to the fleet.

See Also

@spoonincode spoonincode assigned kj4ezj and unassigned kj4ezj Nov 22, 2022
@kj4ezj kj4ezj self-assigned this Dec 5, 2022
@kj4ezj kj4ezj changed the title basic CI that builds and unit tests various components on pull request CI to Build and Unit Test Various Components on Pull Requests Dec 7, 2022
@kj4ezj kj4ezj added the CICD Continuous integration, continuous deployment - build and test system label Dec 22, 2022
This was referenced Dec 23, 2022
@spoonincode
Copy link
Member Author

The Gateway Proxy has been removed from the project, and #283 has already removed it from the repo. No need for that piece in CI now.

@heifner
Copy link
Member

heifner commented Feb 3, 2023

Please add running of: tests/leap/nodeos_trust_evm_test.py. The directions for running it can be found in the comment at the top of the python file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CICD Continuous integration, continuous deployment - build and test system
Projects
Status: Done
Development

No branches or pull requests

3 participants