-
Notifications
You must be signed in to change notification settings - Fork 4
120 lines (95 loc) · 3.22 KB
/
makefile.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Compile CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master", "*" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetches all history so that you can switch branches
# Cache Solidity & Wasm tools
- name: Cache solidity and wasm tools
uses: actions/cache@v2
with:
path: |
/usr/bin/solc
/usr/bin/wabt
key: ${{ runner.os }}-solidity-wasm-tools
- name: Install solidity & wasm tools
run: |
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install -y wabt solc
# Cache Rustup toolchain and targets
- name: Cache rustup toolchain and targets
uses: actions/cache@v2
with:
path: |
~/.rustup
~/.cargo/bin
key: ${{ runner.os }}-rustup-toolchain-targets-${{ hashFiles('**/rust-toolchain') }}
- name: Install Rust toolchain
if: steps.cache-rustup-toolchain-targets.outputs.cache-hit != 'true'
run: rustup self update
- name: Add wasi target
if: steps.cache-rustup-toolchain-targets.outputs.cache-hit != 'true'
run: rustup target add wasm32-wasi
- name: Add unknown target
if: steps.cache-rustup-toolchain-targets.outputs.cache-hit != 'true'
run: rustup target add wasm32-unknown-unknown
# Cache Rust dependencies
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo target
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependecies
run: cargo fetch
- name: Build
run: make
- name: Run unit tests
run: make check
- name: Install dependencies for lints
run: |
rustup component add rustfmt --toolchain nightly-2022-09-07-x86_64-unknown-linux-gnu
rustup component add clippy --toolchain nightly-2022-09-07-x86_64-unknown-linux-gnu
- name: Lints
run: |
cargo fmt --check
cargo clippy --workspace -- -D warnings
- name: Install Wasmtime & Run tests
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
export WASMTIME_HOME="$HOME/.wasmtime"
export PATH="$WASMTIME_HOME/bin:$PATH"SELENIUM_JAR_PATH=/usr/share/java/selenium-server.jar
bash -c "python3 tools/tests.py"
- name: Install pandas
run: pip3 install pandas
- name: Run benchmark
run: python3 tools/bench.py
# - name: Some debug
# run: |
# env
# git log
# - name: Checkout gh-pages branch
# run: |
# git fetch origin gh-pages
# git checkout gh-pages
# - name: Copy generated CSV files
# run: cp -r tools/benchmark/csvs/* csvs/
# - name: Commit and push changes to gh-pages
# run: |
# git config user.name "MCJOHN974"
# git config user.email "[email protected]"
# git add csvs/
# git commit -m "Benchmark workflow"
# git push origin gh-pages