From 4bea0111ebb9859ae2fda144e1997a3695082dcb Mon Sep 17 00:00:00 2001 From: Aleksandr Sobolev Date: Thu, 6 Jun 2019 14:19:59 +0600 Subject: [PATCH 1/8] Run tool-based integration tests --- .circleci/config.yml | 57 +++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 46a67785..3b2bb35d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,44 +78,39 @@ jobs: # command: if [ -z "$CIRCLE_PR_NUMBER" ]; then ./run-integration-tests.sh; fi # working_directory: /home - - run: - name: Call webhook - command: | - curl -I -X POST -H -d "https://circleci.com/api/v1/project/${ORGANIZATION}/${WEBHOOK_PROJECT}/tree/master?circle-token=${CIRCLE_TOKEN}" | head -n 1 | cut -d$' ' -f2 - integration_tests: docker: - - image: mythril/mythx-ci - working_directory: /home + - image: circleci/python:3.6.4 + working_directory: ~/project steps: - - checkout: - path: /home/mythril-classic + - checkout + - setup_remote_docker - run: - name: Builds `mythril-classic` - command: cd mythril-classic && python3 setup.py install + name: Clone Mythril + command: git clone https://github.com/Consensys/mythril - run: - name: Installs other MythX components - command: | - ./install-mythx-components.sh pythx edelweiss harvey-cli \ - harvey-tyro maestro maru maru-tyro mythril-api \ - mythril-tyro tyro + name: Clone Edelweiss + command: git clone --recurse-submodules https://$GIT_TOKEN@github.com/Consensys/Edelweiss.git - run: - background: true - name: Launches MythX platform - command: ./launch-mythx.sh + name: Update SWC-registry + working_directory: ~/project/Edelweiss + command: git submodule update --recursive --remote - run: - name: Waits for MythX to spin-up - command: sleep 15s + name: Build Edelweiss + command: | + docker build \ + --build-arg AWS_ACCESS_KEY_ID=$S3_AWS_ACCESS_KEY_ID \ + --build-arg AWS_SECRET_ACCESS_KEY=$S3_AWS_SECRET_ACCESS_KEY \ + --build-arg AWS_DEFAULT_REGION=us-east-1 --rm -t "edelweiss-mythril:latest" . -f Edelweiss/dockerfiles/mythril/Dockerfile - run: - name: Quick Edelweiss test - command: /home/run-edelweiss-test.sh CircleCI/latest.quick.csv 5 - - # TODO: Temporary disabled - # - run: - # name: Full Edelweiss test - # environment: - # MYTHX_API_FULL_MODE: true - # command: /home/run-edelweiss-test.sh CircleCI/latest.full.csv + name: Run Edelweiss + command: | + docker run --rm edelweiss-mythril:latest \ + --timeout 10 \ + --output-dir /opt/edelweiss \ + --plugin-dir /opt/mythril \ + --s3 \ + --circle-ci CircleCI/mythril.csv pypi_release: <<: *defaults @@ -172,6 +167,8 @@ workflows: only: - develop - master + # TODO: remove after merge. For checking PR only. + - improvement/tool-based-integration-tests tags: only: /v[0-9]+(\.[0-9]+)*/ requires: From b4e684f244b726693b9a817271826a2f9a70ef23 Mon Sep 17 00:00:00 2001 From: Aleksandr Sobolev Date: Thu, 6 Jun 2019 15:28:29 +0600 Subject: [PATCH 2/8] Remove mythril clone step --- .circleci/config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3b2bb35d..f645af41 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,9 +85,6 @@ jobs: steps: - checkout - setup_remote_docker - - run: - name: Clone Mythril - command: git clone https://github.com/Consensys/mythril - run: name: Clone Edelweiss command: git clone --recurse-submodules https://$GIT_TOKEN@github.com/Consensys/Edelweiss.git @@ -171,8 +168,8 @@ workflows: - improvement/tool-based-integration-tests tags: only: /v[0-9]+(\.[0-9]+)*/ - requires: - - test + # requires: + # - test - pypi_release: filters: branches: From 7a5a3cf38afd4b5b16b01d6e027b1bb363d35943 Mon Sep 17 00:00:00 2001 From: Aleksandr Sobolev Date: Thu, 6 Jun 2019 15:41:45 +0600 Subject: [PATCH 3/8] Change env name --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f645af41..08e9607c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,7 +87,7 @@ jobs: - setup_remote_docker - run: name: Clone Edelweiss - command: git clone --recurse-submodules https://$GIT_TOKEN@github.com/Consensys/Edelweiss.git + command: git clone --recurse-submodules https://$GITHUB_TOKEN@github.com/Consensys/Edelweiss.git - run: name: Update SWC-registry working_directory: ~/project/Edelweiss From b490009d28eb5302a805d9824482dd1a2e5903bb Mon Sep 17 00:00:00 2001 From: Aleksandr Sobolev Date: Thu, 6 Jun 2019 16:56:56 +0600 Subject: [PATCH 4/8] Prevent installing unsupported version of eth-account --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3cabe805..148b9b7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ configparser>=3.5.0 coverage py_ecc==1.4.2 eth_abi==1.3.0 -eth-account>=0.1.0a2,<=0.3.0 +eth-account>=0.1.0a2,<0.3.0 ethereum>=2.3.2 ethereum-input-decoder>=0.2.2 eth-hash>=0.1.0 From d2d380f420c33878f467184854f7fc1802363778 Mon Sep 17 00:00:00 2001 From: Aleksandr Sobolev Date: Thu, 6 Jun 2019 17:02:03 +0600 Subject: [PATCH 5/8] Prevent installing unsupported version of eth-account --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 148b9b7f..6812f634 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,12 +3,12 @@ configparser>=3.5.0 coverage py_ecc==1.4.2 eth_abi==1.3.0 -eth-account>=0.1.0a2,<0.3.0 +eth-account>=0.1.0a2,<=0.3.0 ethereum>=2.3.2 ethereum-input-decoder>=0.2.2 eth-hash>=0.1.0 eth-keyfile>=0.5.1 -eth-keys>=0.2.0b3 +eth-keys>=0.2.0b3<0.3.0 eth-rlp>=0.1.0 eth-tester==0.1.0b32 eth-typing>=2.0.0 From 2ed8084d8ce179e2225b6fa4283cda7555fa150d Mon Sep 17 00:00:00 2001 From: Aleksandr Sobolev Date: Thu, 6 Jun 2019 17:07:24 +0600 Subject: [PATCH 6/8] Update eth-keys version conditions --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6812f634..1b49350c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ ethereum>=2.3.2 ethereum-input-decoder>=0.2.2 eth-hash>=0.1.0 eth-keyfile>=0.5.1 -eth-keys>=0.2.0b3<0.3.0 +eth-keys>=0.2.0b3,<0.3.0 eth-rlp>=0.1.0 eth-tester==0.1.0b32 eth-typing>=2.0.0 From 72066c8f82aa62ff6ad10335c2e3e628651760e4 Mon Sep 17 00:00:00 2001 From: Aleksandr Sobolev Date: Fri, 7 Jun 2019 09:34:06 +0600 Subject: [PATCH 7/8] Increase timeout param --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 08e9607c..21551fb7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -103,7 +103,7 @@ jobs: name: Run Edelweiss command: | docker run --rm edelweiss-mythril:latest \ - --timeout 10 \ + --timeout 90 \ --output-dir /opt/edelweiss \ --plugin-dir /opt/mythril \ --s3 \ From bae7eac1cd9da57f28a01b135c661a75106316c7 Mon Sep 17 00:00:00 2001 From: Aleksandr Sobolev Date: Fri, 7 Jun 2019 14:22:45 +0600 Subject: [PATCH 8/8] Remove branch from circle ci workflow --- .circleci/config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 21551fb7..89cfd337 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -164,12 +164,10 @@ workflows: only: - develop - master - # TODO: remove after merge. For checking PR only. - - improvement/tool-based-integration-tests tags: only: /v[0-9]+(\.[0-9]+)*/ - # requires: - # - test + requires: + - test - pypi_release: filters: branches: