Skip to content

Commit 6efa0de

Browse files
Merge branch 'master' into v2.0-stable-merge
2 parents 2b07b3f + 035bdb8 commit 6efa0de

1,276 files changed

Lines changed: 47569 additions & 12343 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.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Install Dependencies"
2+
description: "Installs dependencies for the Conflux project"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: install Linux dependencies
7+
shell: bash
8+
run: |
9+
sudo wget https://apt.llvm.org/llvm.sh && \
10+
sudo chmod u+x llvm.sh && \
11+
sudo ./llvm.sh 18 && \
12+
sudo apt-get install -y libsqlite3-dev pkg-config libssl-dev cmake libc++-18-dev git curl unzip
13+
14+
- name: Set common environment variables
15+
shell: bash
16+
run: |
17+
echo "CC=clang-18" >> $GITHUB_ENV
18+
echo "CXX=clang++-18" >> $GITHUB_ENV
19+
echo "CXXFLAGS=-std=c++11 -stdlib=libc++" >> $GITHUB_ENV
20+
echo "LDFLAGS=-stdlib=libc++" >> $GITHUB_ENV
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: 'Setup Cargo Cache'
2+
description: 'Sets up Cargo registry and git cache'
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Cache Cargo registry and git
8+
uses: actions/cache@v4
9+
with:
10+
path: |
11+
~/.cargo/registry
12+
~/.cargo/git
13+
key: ${{ runner.os }}-cargo-deps-${{ hashFiles('**/Cargo.lock') }}
14+
restore-keys: |
15+
${{ runner.os }}-cargo-deps-

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- 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+
21+
- name: Install Dependencies
22+
uses: ./.github/actions/install-dependencies
23+
24+
- name: Generate documentation
25+
env:
26+
CMAKE_POLICY_VERSION_MINIMUM: 3.5
27+
RUSTDOCFLAGS: '--enable-index-page -Z unstable-options'
28+
run: |
29+
rustup default nightly-2024-04-22 && cargo +nightly-2024-04-22 doc --no-deps
30+
31+
- name: Deploy
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./target/doc

.github/workflows/lint.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Lint
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+
lint:
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 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+
50+
- name: Install Dependencies
51+
uses: ./.github/actions/install-dependencies
52+
53+
- name: Check format and run clippy
54+
run: |
55+
./cargo_fmt.sh --install && ./cargo_fmt.sh -- --check && cargo clippy --release --all -- -A warnings
56+
57+
cargo-deny:
58+
runs-on: ubuntu-24.04
59+
steps:
60+
- uses: actions/checkout@v4
61+
# - uses: EmbarkStudios/cargo-deny-action@v2
62+
- name: cargo-deny
63+
run: |
64+
cargo install --locked cargo-deny --version 0.15.1
65+
cargo deny check

.github/workflows/test.yml

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
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

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
target
2+
*.profraw
23
**/Cargo.lock
34
**/target
45
**/*.rs.bk
@@ -10,11 +11,17 @@ target
1011
.phabricator*
1112
build/
1213
build_clippy/
13-
**/blockchain_db/
14+
**/blockchain_data/
15+
**/pos_db/
1416
**/sqlite_db/
1517
**/net_config/
1618
**/*.log
19+
**/stderr.txt
1720
**/testnet.toml
1821
*~
1922
.DS_Store
2023
tests/artifacts/**/*.dbg.json
24+
venv
25+
.venv
26+
**/node_modules/**
27+
testdata/evm-spec-test/

0 commit comments

Comments
 (0)