Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add axon sync workflows #1589

Closed
wants to merge 7 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/axon-sync-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Axon sync test

on:
workflow_dispatch:
Simon-Tl marked this conversation as resolved.
Show resolved Hide resolved

jobs:
Build_and_Archive_Axon:
strategy:
matrix:
# Supported GitHub-hosted runners and hardware resources
# see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
os: [ubuntu-22.04]
fail-fast: false
runs-on: ${{ matrix.os }}
Simon-Tl marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v4

- name: Cache of Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build

- name: Build Axon
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build

- name: Archive axon artifacts
uses: actions/upload-artifact@v3
with:
name: axon-dir
path: |
target/debug/axon
devtools/chain/specs/single_node/chain-spec.toml
devtools/chain/default.db-options
devtools/chain/config.toml
devtools/chain/nodes/node_1*
retention-days: 7


Download_and_Start_Axon_Sync:
name: Download_and_Start_Axon_Sync
needs: Build_and_Archive_Axon
runs-on: layer2-runner

steps:
- name: Download Axon Binary for Build_and_Archive_Axon
uses: actions/download-artifact@v3
with:
name: axon-dir
- name: Replacement configuration
run: |
sed -i 's@bls_privkey_file = "bls.key"@bls_privkey_file = "nodes/node_1_bls.key"@g' devtools/chain/config.toml
sed -i 's@net_privkey_file = "net.key"@net_privkey_file = "nodes/node_1_net.key"@g' devtools/chain/config.toml
sed -i 's@multi_address = "/ip4/127.0.0.1/tcp/8001/p2p/QmNk6bBwkLPuqnsrtxpp819XLZY3ymgjs3p1nKtxBVgqxj"@multi_address = "/dns4/axon1.axon-alphanet.svc.cluster.local/tcp/8001/p2p/QmNk6bBwkLPuqnsrtxpp819XLZY3ymgjs3p1nKtxBVgqxj"@' devtools/chain/config.toml
Simon-Tl marked this conversation as resolved.
Show resolved Hide resolved

- name: Start Axon Node
env:
LOG_FILE: ${{ runner.temp }}/layer2-runner-axon-node.log
run: |
chmod +x target/debug/axon
target/debug/axon --version
target/debug/axon init \
--config devtools/chain/config.toml \
--chain-spec devtools/chain/specs/single_node/chain-spec.toml

target/debug/axon run \
--config devtools/chain/config.toml



Loading