-
Notifications
You must be signed in to change notification settings - Fork 8
84 lines (77 loc) · 2.69 KB
/
emerald.yml
File metadata and controls
84 lines (77 loc) · 2.69 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
name: Emerald
on:
merge_group:
pull_request:
push:
branches: [main]
permissions:
contents: read
packages: read
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR.
# Ensures that we don't waste CI time, and returns results quicker.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_RELEASE_DEBUG: 1
RUST_BACKTRACE: short
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
jobs:
emerald-block-production:
name: Block Production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
code:
- '**/.rs'
- 'Makefile'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/.sh'
- '*/workflows/emerald.yml'
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-nextest
uses: taiki-e/install-action@cargo-nextest
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run Forge build
run: forge build
if: steps.filter.outputs.code == 'true'
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run emerald
run: |
./scripts/generate_testnet_config.sh --nodes 4 --testnet-config-dir .testnet --fee-recipient 0x0000000000000000000000000000000000000042
cargo run --bin emerald -- testnet --home nodes --testnet-config .testnet/testnet_config.toml
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin emerald show-pubkey {} > nodes/validator_public_keys.txt
cargo run --bin emerald-utils genesis --public-keys-file ./nodes/validator_public_keys.txt --devnet
docker compose up -d reth0 reth1 reth2 reth3 prometheus grafana otterscan
./scripts/add_peers.sh --nodes 4
bash scripts/spawn.bash --nodes 4 --home nodes --no-delay --no-wait
if: steps.filter.outputs.code == 'true'
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v5
with:
name: emerald-test-logs
path: nodes/**/logs/*.log