-
Notifications
You must be signed in to change notification settings - Fork 982
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
WIP: Update dockerisation #3477
Conversation
Co-authored-by: Hsiao-Wei Wang <[email protected]>
Do you need any additional help on this PR? This is semi-blocking for me as I would like to write some tests for consensus-spec and this would make my work much easier :). |
Sorry I haven't had much time to look into the topic since the initial commits. I'll try and assign some time next week to close up the topic. |
Happy to help and save you time any way I can. Just let me know! |
…n' into update-dockerisation
cc @hwwhww @dapplion @mrthankyou Sorry for the delay on this PR, let me know what you think and how it works for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parithosh Tested locally and LGTM! 👏
p.s. It's probably better to squash merge it
would it make sense to add a small usage/installation guide in the main README as well? |
Maybe add tutorial in a |
This PR adds a script to run the tests inside a Docker container. Ideally we can move to using a containerized environment for all the tests in the future, but the script is a good first step at gathering user feedback.
The PR adds a standalone
Dockerfile
, this file just sets up the dependencies required to run the tool and can be used independently. The docker image can be locally built with:docker build ./ -t $IMAGE_NAME -f ./docker/Dockerfile
will build the docker containerdocker run -it $IMAGE_NAME /bin/sh
will give you a shell inside the docker container to manually run any testsdocker run $IMAGE_NAME make citest
will run themake citest
command inside the docker containerThere is additionally a
scripts/build_run_docker_tests.sh
script which covers most regular usecases. The script allows the user to configure thefork
(altair/bellatrix/capella..),image_name
(specifies the container to use),number of cores
,preset type
(mainnet/minimal) andtest all forks
flags. Ideally this is the main way that users interact with the spec tests, instead of running it locally.E.g:
./build_run_test.sh --p mainnet --n 16
will run the mainnet preset tests with 16 threads./build_run_test.sh --a
will run all the tests across all the forks./build_run_test.sh --f deneb --n 16
will only run deneb tests on 16 threadsResults are always placed in a folder called
./testResults
. The results are.xml
files and contain the fork they represent and the date/time they were run at.