-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcircle.yml
93 lines (90 loc) · 3.58 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: 2
jobs:
build:
docker:
- image: rust:1
working_directory: ~/build
steps:
- checkout
- run:
name: Update submodules
command: |
# Need to remove the rewrite CircleCI add, because Parity has disabled ssh access for non-committers
git config --global --unset url."ssh://git@github.com".insteadOf "https://github.com"
git submodule update --init
git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true
- run:
name: Update rustc
command: |
rustup target add wasm32-unknown-unknown
rustup component add rustfmt
rustup update
- run:
name: Check formatting
command: |
rustfmt --version
cargo fmt --all -- --check
- run:
name: Install dependencies
command: |
cargo install chisel
- run:
name: Build
command: |
cargo build --release --target wasm32-unknown-unknown
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: ~/build
steps:
- checkout
- attach_workspace:
at: ~/build
- 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: |
# 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: |
# 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=/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=/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
build-test:
jobs:
- build
- test:
requires:
- build