1+ name : Tests
2+
3+ on :
4+ push :
5+ branches : [master]
6+ paths-ignore :
7+ - " *.md"
8+ - " *.json"
9+ - " *.sol"
10+ - " docs/**"
11+ - " .gitignore"
12+ - " .travis.yml"
13+ - " cargo_fmt.sh"
14+ - " CODEOWNERS"
15+ pull_request :
16+ branches : [master]
17+ paths-ignore :
18+ - " *.md"
19+ - " *.json"
20+ - " *.sol"
21+ - " docs/**"
22+ - " .gitignore"
23+ - " .travis.yml"
24+ - " cargo_fmt.sh"
25+ - " CODEOWNERS"
26+
27+ jobs :
28+ check-crates :
29+ runs-on : ubuntu-24.04
30+ steps :
31+ - uses : actions/checkout@v4
32+
33+ - name : Setup Cargo Cache
34+ uses : ./.github/actions/setup-cargo-cache
35+
36+ - name : Cache debug build artifacts
37+ uses : actions/cache@v4
38+ with :
39+ path : |
40+ target/debug/deps
41+ target/debug/.fingerprint
42+ target/debug/build
43+ !target/debug/build/**/out
44+ !target/debug/deps/librust_verify*
45+ !target/debug/incremental
46+ !target/debug/.cargo-lock
47+ key : ${{ runner.os }}-build-crates-debug-${{ hashFiles('**/Cargo.lock') }}
48+ restore-keys : |
49+ ${{ runner.os }}-build-crates-debug-
50+
51+ - name : Install Dependencies
52+ uses : ./.github/actions/install-dependencies
53+
54+ - name : Check individual crates
55+ run : |
56+ ./dev-support/check-crates.sh
57+
58+ workspace-tests :
59+ runs-on : ubuntu-24.04
60+ steps :
61+ - uses : actions/checkout@v4
62+ - name : Free up space
63+ run : |
64+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android
65+
66+ - name : Setup Cargo Cache
67+ uses : ./.github/actions/setup-cargo-cache
68+
69+ - name : Cache build artifacts
70+ uses : actions/cache@v4
71+ with :
72+ path : |
73+ target/release/deps
74+ target/release/.fingerprint
75+ target/release/build
76+ !target/release/build/**/out
77+ !target/release/incremental
78+ !target/release/.cargo-lock
79+ key : ${{ runner.os }}-build-workspace-release-${{ hashFiles('**/Cargo.lock') }}
80+ restore-keys : |
81+ ${{ runner.os }}-build-workspace-release-
82+
83+ - name : Install Dependencies
84+ uses : ./.github/actions/install-dependencies
85+
86+ - name : Run build bench
87+ run : |
88+ cargo bench --all --no-run
89+
90+ - name : Run workspace tests
91+ run : |
92+ cargo install cargo-nextest --version "0.9.85" --locked
93+ cargo nextest run --no-fail-fast --release --workspace
94+
95+ cfx-addr-tests :
96+ runs-on : ubuntu-24.04
97+ steps :
98+ - uses : actions/checkout@v4
99+ - name : Free up space
100+ run : |
101+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android
102+
103+ - name : Setup Cargo Cache
104+ uses : ./.github/actions/setup-cargo-cache
105+
106+ - name : Cache debug build artifacts
107+ uses : actions/cache@v4
108+ with :
109+ path : |
110+ target/debug/deps
111+ target/debug/.fingerprint
112+ target/debug/build
113+ !target/debug/build/**/out
114+ !target/debug/deps/librust_verify*
115+ !target/debug/incremental
116+ !target/debug/.cargo-lock
117+ key : ${{ runner.os }}-build-addr-debug-${{ hashFiles('**/Cargo.lock') }}
118+ restore-keys : |
119+ ${{ runner.os }}-build-addr-debug-
120+
121+ - name : Install Dependencies
122+ uses : ./.github/actions/install-dependencies
123+
124+ - name : Run cfx-addr
125+ run : |
126+ cargo install cargo-nextest --version "0.9.85" --locked
127+ cargo nextest run --no-fail-fast -p cfx-addr --no-default-features
128+
129+ build-documentation :
130+ runs-on : ubuntu-24.04
131+ steps :
132+ - uses : actions/checkout@v4
133+
134+ - name : Setup Cargo Cache
135+ uses : ./.github/actions/setup-cargo-cache
136+
137+ - name : Install Dependencies
138+ uses : ./.github/actions/install-dependencies
139+
140+ - name : Run build documentation
141+ env :
142+ CMAKE_POLICY_VERSION_MINIMUM : 3.5
143+ run : |
144+ cargo doc --document-private-items
145+
146+ evm-spec-tests :
147+ runs-on : ubuntu-24.04
148+ steps :
149+ - uses : actions/checkout@v4
150+
151+ - name : Free up space
152+ run : |
153+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android
154+
155+ - name : Setup Cargo Cache
156+ uses : ./.github/actions/setup-cargo-cache
157+
158+ - name : Cache release artifacts
159+ uses : actions/cache@v4
160+ with :
161+ path : |
162+ target/release/deps
163+ target/release/.fingerprint
164+ target/release/build
165+ !target/release/build/**/out
166+ !target/release/incremental
167+ !target/release/.cargo-lock
168+ key : ${{ runner.os }}-build-evm-spec-tester-${{ hashFiles('**/Cargo.lock') }}
169+ restore-keys : |
170+ ${{ runner.os }}-build-evm-spec-tester-
171+
172+ - name : Install Dependencies
173+ uses : ./.github/actions/install-dependencies
174+
175+ - name : Install zstd
176+ run : sudo apt-get install -y zstd
177+
178+ - name : Extract test data
179+ working-directory : ./testdata
180+ run : tar --use-compress-program="zstd --long=31" -xvf evm-spec-test.tar.zst
181+
182+ - name : Build in release mode
183+ run : cargo build --release --bin evm-spec-tester
184+
185+ - name : Run EVM spec tests
186+ run : cargo run --release --bin evm-spec-tester -- testdata/evm-spec-test
0 commit comments