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: refactor build pipeline #94

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

chore: refactor build pipeline #94

wants to merge 2 commits into from

Conversation

GCdePaula
Copy link
Collaborator

chore(prt-tests): remove --platform from Dockerfile

@GCdePaula
Copy link
Collaborator Author

GCdePaula commented Dec 22, 2024

So far I've:

  • introduced just and rewrote many makefiles into justfiles;
  • created a single cargo workspace, and put all crates in repo under this workspace;
  • reorganized directories (minor);
  • built a development Dockerfile with nice caching and all dependencies (including the current branch of the Cartesi machine, which it builds), as well as building Dave.

One possible next step is removing the usage of docker in our make/just targets. Currently, we have a Dockerfile that installs all dependencies, builds the repo and run tests. Our make targets invokes docker (docker build then docker run).

I think a better workflow just invokes the intended commands, without docker, and assumes all dependencies are there (i.e. the target just test directly runs our test scripts; it assumes all the dependencies are there). Then we also provide a docker image which has these dependencies in case the developer doesn't have these dependencies installed in their system (docker run dave:dev just test).

@GCdePaula GCdePaula changed the title (chore): refactor build pipeline chore: refactor build pipeline Dec 22, 2024
chore(prt-tests): remove `--platform` from Dockerfile
@GCdePaula GCdePaula force-pushed the feature/cleanup branch 2 times, most recently from 0efcad3 to d21df14 Compare December 26, 2024 20:50
@GCdePaula
Copy link
Collaborator Author

  • Implemented anvil deployments as a state dump and load, as explained here.
  • Changed time from timestamps to block number, and fixed tests (vm.warp -> vm.roll). I think this is the most critical part of the PR. We'd planned on changing this; I didn't intend to change it now, but thew previous item required it.
  • Rewrote the way we build Cartesi "programs". So far, only echo is using this new pipeline (check test/programs).
  • Made node state directory configurable.
  • Running integration tests outside docker on my machine:
just bind && just -f test/programs/justfile build-echo && just -f prt/tests/rollups/justfile test-echo

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.

1 participant