-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update ci * update ci name * upload miner config * update log for ci
- Loading branch information
1 parent
d7f8e07
commit 02dc1f7
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: miner integration test | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
- name: download ckb | ||
run: | | ||
# todo change version :117 use latest version | ||
wget https://github.com/nervosnetwork/ckb/releases/download/v0.117.0/ckb_v0.117.0_x86_64-unknown-linux-gnu-portable.tar.gz | ||
tar -zxvf ckb_v0.117.0_x86_64-unknown-linux-gnu-portable.tar.gz | ||
cp ckb_v0.117.0_x86_64-unknown-linux-gnu-portable/ckb test | ||
- name: run ckb | ||
run: | | ||
cargo run --bin ckb-mock-miner-server -- -b 0.0.0.0:3000 -p ./mock.json > mock.log 2>&1 & | ||
- name: miner | ||
run: | | ||
cd test | ||
# todo change 5 for mock.json size ,add timeout | ||
./ckb miner -l 5 | ||
cat ../mock.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Config generated by `ckb init --chain mainnet` | ||
|
||
data_dir = "data" | ||
|
||
[chain] | ||
# Choose the kind of chains to run, possible values: | ||
# - { file = "specs/dev.toml" } | ||
# - { bundled = "specs/testnet.toml" } | ||
# - { bundled = "specs/mainnet.toml" } | ||
spec = { bundled = "specs/mainnet.toml" } | ||
|
||
[logger] | ||
filter = "info" | ||
color = true | ||
log_to_file = true | ||
log_to_stdout = true | ||
|
||
[sentry] | ||
# set to blank to disable sentry error collection | ||
dsn = "" | ||
# if you are willing to help us to improve, | ||
# please leave a way to contact you when we have troubles to reproduce the errors. | ||
# org_contact = "" | ||
|
||
# # **Experimental** Monitor memory changes. | ||
# [memory_tracker] | ||
# # Seconds between checking the process, 0 is disable, default is 0. | ||
# interval = 600 | ||
|
||
[miner.client] | ||
rpc_url = "http://127.0.0.1:3000/" | ||
block_on_submit = true | ||
|
||
# block template polling interval in milliseconds | ||
poll_interval = 1000 | ||
|
||
# enable listen notify mode | ||
# listen = "127.0.0.1:8888" | ||
|
||
[[miner.workers]] | ||
worker_type = "EaglesongSimple" | ||
threads = 1 |