-
Notifications
You must be signed in to change notification settings - Fork 719
109 lines (89 loc) · 3.16 KB
/
_rust-tests.yml
File metadata and controls
109 lines (89 loc) · 3.16 KB
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
---
name: nitro-rust
on:
workflow_call:
jobs:
rust:
name: Run Rust tests
runs-on: arbitrator-ci
env:
RUST_BACKTRACE: 1
# RUSTFLAGS: -Dwarnings # TODO: re-enable after wasmer upgrade
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Setup CI
uses: ./.github/actions/ci-setup
- name: Install custom go-ethereum
run: |
cd /tmp
git clone --branch v1.16.2 --depth 1 https://github.com/ethereum/go-ethereum.git
cd go-ethereum
go build -o /usr/local/bin/geth ./cmd/geth
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
# Make sure to set a version number!
version: 3.1.6
# This is the name of the cache folder.
# The cache folder will be placed in the build directory,
# so make sure it doesn't conflict with anything!
no-cache: true
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: nextest@0.9
- name: Create minimal nextest.toml config file
run: |
cat << EOF > nextest.toml
[profile.ci.junit]
path = "junit.xml"
EOF
- name: Make arbitrator libraries
run: make -j wasm-ci-build
- name: Prepare replay.wasm env
run: make build-replay-env
- name: Clippy check
run: cargo clippy --workspace --exclude stylus-compiler-program --exclude stylus-compiler-runner -- -D warnings -A static_mut_refs
- name: Run rust tests
id: run-rust-tests
continue-on-error: true
run: >-
cargo nextest run -p arbutil -p prover -p jit -p stylus -p validator --release
--profile ci --config-file nextest.toml
- name: Upload rust test results
if: always()
uses: actions/upload-artifact@v6
with:
name: junit-reports-rust
path: ./target/nextest/ci/junit.xml
- name: Fail if rust tests failed
if: steps.run-rust-tests.outcome == 'failure'
run: |
echo "Rust tests failed. Failing the workflow as required."
exit 1
- name: Check stylus_bechmark
run: cargo check --manifest-path crates/tools/stylus_benchmark/Cargo.toml
- name: Install nightly rustfmt
run: rustup toolchain install nightly --component rustfmt --profile minimal
- name: Rustfmt
run: cargo +nightly fmt -- --check
- name: Rustfmt - tools/stylus_benchmark
run: cargo +nightly fmt --manifest-path crates/tools/stylus_benchmark/Cargo.toml -- --check
- name: Make proofs from test cases
run: make -j test-gen-proofs
- name: Start geth server
run: |
geth --dev --http --http.port 8545 &
sleep 2
- name: Run proof validation tests
run: |
npm install --global yarn
cd contracts-legacy
cp -r ../contracts/test/prover/proofs/* ./test/prover/proofs
yarn install
yarn build
yarn build:forge:yul
yarn hardhat --network localhost test test/prover/*.ts