-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (55 loc) · 1.91 KB
/
run_node_devnet.yml
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
name: Run Kari Node
on:
push:
branches: [ "main" ]
tags: "v*"
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
MNEMONIC_LENGTH: 24 # Set fixed mnemonic length
NETWORK_TYPE: devnet
RPC_PORT: 3031
NETWORK_DOMAIN: devnet.kari.network
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive' # Add this to fetch submodules
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Release
run: cargo build --release
- name: Generate Wallet
run: |
echo "24" | cargo run --release --bin kari keytool generate
- name: Run Kari Node
timeout-minutes: 15 # Prevent infinite running
continue-on-error: true # Allow workflow to continue even if node exits
run: |
# Start Kari node with input parameters
# 1: Node type
# 3031: Port number
# devnet.kanari.network: Network address
(echo "1" && echo "3031" && echo "devnet.kanari.network") | cargo run --release --bin kari start &
# Store process ID
KARI_PID=$!
# Wait for node to initialize (30 seconds)
sleep 30
# Kill the process
kill $KARI_PID || true