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

scripts: restore install_build_tools.sh #4457

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

MaxMustermann2
Copy link
Contributor

With #4427, the protofiles are generated using a Docker image and thus protoc related binaries are not required. However, mockgen and golangci-lint are still being used by our Travis build. This change restores the file that installs them, and removes protoc related files from the list of installations.

With harmony-one#4427, the protofiles are generated using a Docker image and thus
`protoc` related binaries are not required. However, `mockgen` and
`golangci-lint` are still being used by our Travis build. This change
restores the file that installs them, and removes `protoc` related files
from the list of installations.
@MaxMustermann2
Copy link
Contributor Author

The Dockerfile that runs in our Travis CI clones the main branch of this repo. Since the script in question has been removed from that branch, the Travis CI fails with error 127 (which indicates file not found).

To test this change, I locally modified the Dockerfile to clone my fork of harmony and checkout the branch restore-build-tools. With this change, the Travis RPC test passes.

diff --git a/localnet/Dockerfile b/localnet/Dockerfile
index cac0b75..5796c12 100644
--- a/localnet/Dockerfile
+++ b/localnet/Dockerfile
@@ -12,7 +12,7 @@ RUN apt upgrade -y > /dev/null 2>1
 RUN apt update -y > /dev/null 2>1
 RUN apt install -y unzip libgmp-dev libssl-dev curl git jq make gcc g++ bash sudo python3 python3-pip > /dev/null 2>1
 
-RUN git clone https://github.com/harmony-one/harmony.git > /dev/null 2>1 \
+RUN git clone https://github.com/MaxMustermann2/harmony.git > /dev/null 2>1 \
     && git clone https://github.com/harmony-one/bls.git > /dev/null 2>1 \
     && git clone https://github.com/harmony-one/mcl.git > /dev/null 2>1
 
@@ -23,7 +23,7 @@ RUN git config --global --add safe.directory $GOPATH/src/github.com/harmony-one/
     && git config --global --add safe.directory $GOPATH/src/github.com/harmony-one/mcl > /dev/null 2>1
 
 # Build to fetch all dependencies for faster test builds
-RUN cd harmony > /dev/null 2>1 && go mod tidy > /dev/null 2>1 && go get github.com/pborman/uuid > /dev/null 2>1 && go get github.com/rjeczalik/notify > /dev/null 2>1 \
+RUN cd harmony > /dev/null 2>1 && git checkout restore-build-tools && go mod tidy > /dev/null 2>1 && go get github.com/pborman/uuid > /dev/null 2>1 && go get github.com/rjeczalik/notify > /dev/null 2>1 \
     && go get github.com/cespare/cp > /dev/null 2>1 && go get github.com/libp2p/go-libp2p-crypto > /dev/null 2>1 && go get github.com/kr/pretty > /dev/null 2>1 \
     && go get github.com/kr/text > /dev/null 2>1 && go get gopkg.in/check.v1 > /dev/null 2>1 && bash scripts/install_build_tools.sh > /dev/null 2>1 && make > /dev/null 2>1
 RUN rm -rf harmony

As a reminder the > /dev/null 2>1 is added after each command to pacify the log length limits imposed by Travis.

The RPC check then passes:

=========================== short test summary info ============================
SKIPPED [1] rpc_tests/test_staking.py:933: This test is flaky and needs to be fixed
SKIPPED [1] rpc_tests/test_staking.py:1210: This test is flaky and needs to be fixed
SKIPPED [1] rpc_tests/test_staking.py:1249: This test is flaky and needs to be fixed
================== 84 passed, 3 skipped in 132.51s (0:02:12) ===================

=== FINISHED RPC TESTS ===

Passed RPC tests

@ONECasey
Copy link
Contributor

Lets get this PR and the hard fork data into the next push to main.

@ONECasey ONECasey merged commit 9df6215 into harmony-one:dev Jun 28, 2023
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