From 7fc3198dda1e180d73c58a7660683c02501e298d Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 20 May 2019 14:50:00 +0200 Subject: [PATCH 1/3] ci: add test job using testeth --- circle.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/circle.yml b/circle.yml index b04835c..9353db6 100644 --- a/circle.yml +++ b/circle.yml @@ -4,6 +4,7 @@ jobs: build: docker: - image: rust:1 + working_directory: ~/package steps: - checkout - run: @@ -35,3 +36,47 @@ jobs: chisel run ls -l target/runevm.wasm test -f target/runevm.wasm + test: + docker: + - image: ethereum/cpp-build-env:11 + working_directory: ~/package + steps: + - checkout + - run: + name: Install aleth + command: | + VER=1.6.0 + OS=$(uname | tr '[:upper:]' '[:lower:]') + URL=https://github.com/ethereum/aleth/releases/download/v$VER/aleth-$VER-$OS-x86_64.tar.gz + echo $URL + curl -L $URL | sudo tar xz -C /usr/local + - run: + name: Install hera + command: | + VER=0.2.4 + OS=$(uname | tr '[:upper:]' '[:lower:]') + URL=https://github.com/ewasm/hera/releases/download/v$VER/hera-$VER-$OS-x86_64.tar.gz + echo $URL + curl -L $URL | sudo tar xz -C /usr/local + test -f /usr/local/lib/libhera.so + - run: + name: Fetch tests + command: git clone https://github.com/ethereum/tests -b develop --single-branch --depth 1 + - run: + name: Run state tests + command: | + testeth --version + testeth -t GeneralStateTests/stExample -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=target/runevm.wasm --statediff + # This works, but takes too much time (4 minutes) + # testeth -t GeneralStateTests/stStackTests -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=target/runevm.wasm --statediff + testeth -t GeneralStateTests/stShift -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=target/runevm.wasm --statediff + testeth -t GeneralStateTests/stCodeSizeLimit -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=target/runevm.wasm --statediff + +workflows: + version: 2 + build-test: + jobs: + - build + - test: + requires: + - build From 2ab2cd4b450e201ff02cb05346ac12bfc74a53d6 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 22 May 2019 20:42:37 +0100 Subject: [PATCH 2/3] ci: persists build artifact till tests --- circle.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/circle.yml b/circle.yml index 9353db6..c206303 100644 --- a/circle.yml +++ b/circle.yml @@ -4,7 +4,7 @@ jobs: build: docker: - image: rust:1 - working_directory: ~/package + working_directory: ~/build steps: - checkout - run: @@ -36,12 +36,19 @@ jobs: chisel run ls -l target/runevm.wasm test -f target/runevm.wasm + - persist_to_workspace: + root: ~/build + paths: + - target/runevm.wasm + test: docker: - image: ethereum/cpp-build-env:11 - working_directory: ~/package + working_directory: ~/build steps: - checkout + - attach_workspace: + at: ~/build - run: name: Install aleth command: | @@ -65,12 +72,14 @@ jobs: - run: name: Run state tests command: | + # NOTE: need to use full path as Hera doesn't support resolving ~ + ls -la /home/builder/build/target/runevm.wasm testeth --version - testeth -t GeneralStateTests/stExample -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=target/runevm.wasm --statediff + testeth -t GeneralStateTests/stExample -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=/home/builder/build/target/runevm.wasm --statediff # This works, but takes too much time (4 minutes) - # testeth -t GeneralStateTests/stStackTests -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=target/runevm.wasm --statediff - testeth -t GeneralStateTests/stShift -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=target/runevm.wasm --statediff - testeth -t GeneralStateTests/stCodeSizeLimit -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=target/runevm.wasm --statediff + # testeth -t GeneralStateTests/stStackTests -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=/home/builder/build/target/runevm.wasm --statediff + testeth -t GeneralStateTests/stShift -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=/home/builder/build/target/runevm.wasm --statediff + testeth -t GeneralStateTests/stCodeSizeLimit -- --testpath tests --singlenet Byzantium --vm /usr/local/lib/libhera.so --evmc evm1mode=runevm --evmc sys:runevm=/home/builder/build/target/runevm.wasm --statediff workflows: version: 2 From c75ff8d6bc0830a90123ba90484b989823cbb533 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 29 May 2019 14:46:42 +0100 Subject: [PATCH 3/3] ci: run tests on ewasm's fork of ethereum/tests The main one fails when running Byzantium-only tests. --- circle.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index c206303..d30f84e 100644 --- a/circle.yml +++ b/circle.yml @@ -68,7 +68,9 @@ jobs: test -f /usr/local/lib/libhera.so - run: name: Fetch tests - command: git clone https://github.com/ethereum/tests -b develop --single-branch --depth 1 + command: | + # Using the ewasm fork because the main one has some issues with Byzantium-only execution + git clone https://github.com/ewasm/tests -b wasm-tests --single-branch --depth 1 - run: name: Run state tests command: |