Skip to content

Commit a51e5b7

Browse files
Merge branch 'master' into v2.0-stable-merge
2 parents 2398ad3 + cc5b1e7 commit a51e5b7

486 files changed

Lines changed: 25441 additions & 8529 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,39 @@ on:
55
branches:
66
- master
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
SCCACHE_GHA_ENABLED: "true"
14+
RUSTC_WRAPPER: "sccache"
15+
816
jobs:
917
deploy:
1018
permissions:
1119
contents: write
1220
runs-on: ubuntu-24.04
1321
steps:
1422
- uses: actions/checkout@v4
15-
16-
- name: Rust Cache
17-
uses: Swatinem/rust-cache@v2
18-
with:
19-
prefix-key: "nightly-2024-02-04"
20-
23+
24+
- name: Run sccache-cache
25+
uses: mozilla-actions/sccache-action@v0.0.9
26+
2127
- name: Install Dependencies
2228
uses: ./.github/actions/install-dependencies
29+
- name: Setup Cargo Cache
30+
uses: ./.github/actions/setup-cargo-cache
2331

2432
- name: Generate documentation
2533
env:
2634
CMAKE_POLICY_VERSION_MINIMUM: 3.5
27-
RUSTDOCFLAGS: '--enable-index-page -Z unstable-options'
35+
RUSTDOCFLAGS: "--enable-index-page -Z unstable-options"
2836
run: |
2937
rustup default nightly-2024-04-22 && cargo +nightly-2024-04-22 doc --no-deps
3038
3139
- name: Deploy
3240
uses: peaceiris/actions-gh-pages@v3
3341
with:
3442
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
publish_dir: ./target/doc
43+
publish_dir: ./target/doc

.github/workflows/lint.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,42 +24,40 @@ on:
2424
- "cargo_fmt.sh"
2525
- "CODEOWNERS"
2626

27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.ref }}
29+
cancel-in-progress: true
30+
31+
env:
32+
SCCACHE_GHA_ENABLED: "true"
33+
RUSTC_WRAPPER: "sccache"
34+
2735
jobs:
2836
lint:
2937
runs-on: ubuntu-24.04
3038
steps:
3139
- uses: actions/checkout@v4
3240

41+
- name: Run sccache-cache
42+
uses: mozilla-actions/sccache-action@v0.0.9
3343
- name: Setup Cargo Cache
3444
uses: ./.github/actions/setup-cargo-cache
35-
36-
- name: Cache build artifacts
37-
uses: actions/cache@v4
38-
with:
39-
path: |
40-
target/release/deps
41-
target/release/.fingerprint
42-
target/release/build
43-
!target/release/build/**/out
44-
!target/release/incremental
45-
!target/release/.cargo-lock
46-
key: ${{ runner.os }}-build-lint-release-${{ hashFiles('**/Cargo.lock') }}
47-
restore-keys: |
48-
${{ runner.os }}-build-lint-release-
49-
5045
- name: Install Dependencies
5146
uses: ./.github/actions/install-dependencies
5247

5348
- name: Check format and run clippy
5449
run: |
55-
./cargo_fmt.sh --install && ./cargo_fmt.sh -- --check && cargo clippy --release --all -- -A warnings
56-
50+
./cargo_fmt.sh --install && ./cargo_fmt.sh -- --check && ./dev-support/cargo_all.sh clippy --release --all -- -A warnings
5751
cargo-deny:
5852
runs-on: ubuntu-24.04
5953
steps:
6054
- uses: actions/checkout@v4
6155
# - uses: EmbarkStudios/cargo-deny-action@v2
56+
- name: Setup Cargo Cache
57+
uses: ./.github/actions/setup-cargo-cache
58+
- name: Run sccache-cache
59+
uses: mozilla-actions/sccache-action@v0.0.9
6260
- name: cargo-deny
6361
run: |
64-
cargo install --locked cargo-deny --version 0.15.1
65-
cargo deny check
62+
cargo install --locked cargo-deny --version 0.18.3
63+
./dev-support/cargo_all.sh deny check

.github/workflows/test.yml

Lines changed: 74 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Tests
22

3+
env:
4+
RUST_VERSION: 1.86.0
5+
SCCACHE_GHA_ENABLED: "true"
6+
RUSTC_WRAPPER: "sccache"
7+
38
on:
49
push:
510
branches: [master]
@@ -24,33 +29,45 @@ on:
2429
- "cargo_fmt.sh"
2530
- "CODEOWNERS"
2631

32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.ref }}
34+
cancel-in-progress: true
35+
2736
jobs:
28-
check-crates:
37+
check-workspace:
2938
runs-on: ubuntu-24.04
3039
steps:
3140
- uses: actions/checkout@v4
32-
41+
- name: Free up space
42+
run: |
43+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android
3344
- name: Setup Cargo Cache
3445
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-
46+
- name: Run sccache-cache
47+
uses: mozilla-actions/sccache-action@v0.0.9
5048

5149
- name: Install Dependencies
5250
uses: ./.github/actions/install-dependencies
51+
- name: Check workspace
52+
env:
53+
RUSTFLAGS: -D warnings
54+
run: |
55+
cargo check --all --locked
5356
57+
check-individual-crates:
58+
runs-on: ubuntu-24.04
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Free up space
62+
run: |
63+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android
64+
- name: Setup Cargo Cache
65+
uses: ./.github/actions/setup-cargo-cache
66+
- name: Run sccache-cache
67+
uses: mozilla-actions/sccache-action@v0.0.9
68+
69+
- name: Install Dependencies
70+
uses: ./.github/actions/install-dependencies
5471
- name: Check individual crates
5572
run: |
5673
./dev-support/check-crates.sh
@@ -62,32 +79,22 @@ jobs:
6279
- name: Free up space
6380
run: |
6481
sudo rm -rf /usr/share/dotnet /usr/local/lib/android
65-
6682
- name: Setup Cargo Cache
6783
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-
84+
- name: Run sccache-cache
85+
uses: mozilla-actions/sccache-action@v0.0.9
8386
- name: Install Dependencies
8487
uses: ./.github/actions/install-dependencies
8588

8689
- name: Run build bench
90+
env:
91+
RUSTFLAGS: -D warnings
8792
run: |
8893
cargo bench --all --no-run
8994
9095
- name: Run workspace tests
96+
env:
97+
RUSTFLAGS: -D warnings
9198
run: |
9299
cargo install cargo-nextest --version "0.9.85" --locked
93100
cargo nextest run --no-fail-fast --release --workspace
@@ -99,29 +106,16 @@ jobs:
99106
- name: Free up space
100107
run: |
101108
sudo rm -rf /usr/share/dotnet /usr/local/lib/android
102-
103109
- name: Setup Cargo Cache
104110
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-
111+
- name: Run sccache-cache
112+
uses: mozilla-actions/sccache-action@v0.0.9
121113
- name: Install Dependencies
122114
uses: ./.github/actions/install-dependencies
123115

124116
- name: Run cfx-addr
117+
env:
118+
RUSTFLAGS: -D warnings
125119
run: |
126120
cargo install cargo-nextest --version "0.9.85" --locked
127121
cargo nextest run --no-fail-fast -p cfx-addr --no-default-features
@@ -130,9 +124,10 @@ jobs:
130124
runs-on: ubuntu-24.04
131125
steps:
132126
- uses: actions/checkout@v4
133-
134127
- name: Setup Cargo Cache
135128
uses: ./.github/actions/setup-cargo-cache
129+
- name: Run sccache-cache
130+
uses: mozilla-actions/sccache-action@v0.0.9
136131

137132
- name: Install Dependencies
138133
uses: ./.github/actions/install-dependencies
@@ -151,24 +146,10 @@ jobs:
151146
- name: Free up space
152147
run: |
153148
sudo rm -rf /usr/share/dotnet /usr/local/lib/android
154-
155149
- name: Setup Cargo Cache
156150
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-
151+
- name: Run sccache-cache
152+
uses: mozilla-actions/sccache-action@v0.0.9
172153
- name: Install Dependencies
173154
uses: ./.github/actions/install-dependencies
174155

@@ -180,7 +161,30 @@ jobs:
180161
run: tar --use-compress-program="zstd --long=31" -xvf evm-spec-test.tar.zst
181162

182163
- name: Build in release mode
183-
run: cargo build --release --bin evm-spec-tester
164+
working-directory: ./tools/evm-spec-tester
165+
env:
166+
RUSTFLAGS: -D warnings
167+
run: cargo run --release --locked -- statetest ../../testdata/evm-spec-test
168+
169+
consensus-bench-test:
170+
runs-on: ubuntu-24.04
171+
steps:
172+
- uses: actions/checkout@v4
173+
174+
- name: Free up space
175+
run: |
176+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android
177+
- name: Setup Cargo Cache
178+
uses: ./.github/actions/setup-cargo-cache
179+
- name: Run sccache-cache
180+
uses: mozilla-actions/sccache-action@v0.0.9
181+
182+
- name: Install Dependencies
183+
uses: ./.github/actions/install-dependencies
184184

185-
- name: Run EVM spec tests
186-
run: cargo run --release --bin evm-spec-tester -- testdata/evm-spec-test
185+
- name: Run build
186+
working-directory: ./tools/consensus_bench
187+
env:
188+
RUSTFLAGS: -D warnings
189+
run: |
190+
cargo check --locked

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
target
22
*.profraw
33
**/Cargo.lock
4+
!tools/*/Cargo.lock
45
**/target
56
**/*.rs.bk
67
**/__pycache__

0 commit comments

Comments
 (0)