Update protocol/src/types/block.rs #649
Workflow file for this run
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
name: Axon start test | |
on: | |
push: | |
pull_request: | |
merge_group: | |
workflow_dispatch: | |
jobs: | |
# Build Axon and cache the binary | |
build-axon: | |
uses: ./.github/workflows/build.yml | |
# Start a single Axon node | |
single-node: | |
needs: build-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 }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache of the axon binary | |
id: axon-bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
target/debug/axon | |
target/release/axon | |
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-axon-${{ github.sha }} | |
- name: Start a single Axon node | |
env: | |
LOG_FILE: ${{ runner.temp }}/${{ matrix.os }}-single-axon-node.log | |
run: | | |
target/debug/axon --version | tee ${{ env.LOG_FILE }} | |
target/debug/axon init \ | |
--config devtools/chain/config.toml \ | |
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \ | |
--key-file devtools/chain/debug.key \ | |
| tee -a ${{ env.LOG_FILE }} | |
target/debug/axon run \ | |
--config devtools/chain/config.toml \ | |
| tee -a ${{ env.LOG_FILE }} & | |
sleep 10 | |
npx zx <<'EOF' | |
import { waitXBlocksPassed } from './devtools/ci/scripts/helper.js' | |
await waitXBlocksPassed('http://127.0.0.1:8000', 2); | |
EOF | |
timeout-minutes: 1 | |
- name: Archive logs | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: single-axon-node-logs | |
path: | | |
${{ runner.temp }}/${{ matrix.os }}-single-axon-node.log | |
multi-nodes: | |
needs: build-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 }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache of the axon binary | |
id: axon-bin-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
target/debug/axon | |
target/release/axon | |
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-axon-${{ github.sha }} | |
- name: Start multiple Axon nodes | |
env: | |
LOG_PATH: ${{ runner.temp }}/${{ matrix.os }}/multi-axon-nodes | |
run: | | |
mkdir -p ${{ env.LOG_PATH }} | |
target/debug/axon --version | |
for id in 1 2 3 4; do | |
target/debug/axon init \ | |
--config devtools/chain/nodes/node_${id}.toml \ | |
--chain-spec devtools/chain/specs/multi_nodes_short_epoch_len/chain-spec.toml \ | |
--key-file devtools/chain/debug.key \ | |
> ${{ env.LOG_PATH }}/node_${id}.log | |
done | |
for id in 1 2 3 4; do | |
target/debug/axon run \ | |
--config devtools/chain/nodes/node_${id}.toml \ | |
>> ${{ env.LOG_PATH }}/node_${id}.log & | |
done | |
npx zx <<'EOF' | |
import { waitXBlocksPassed } from './devtools/ci/scripts/helper.js' | |
await Promise.all([ | |
waitXBlocksPassed('http://127.0.0.1:8001', 4), | |
waitXBlocksPassed('http://127.0.0.1:8002', 4), | |
waitXBlocksPassed('http://127.0.0.1:8003', 4), | |
waitXBlocksPassed('http://127.0.0.1:8004', 4), | |
]) | |
EOF | |
timeout-minutes: 1 | |
- name: Archive logs | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: multi-axon-nodes-logs | |
path: | | |
${{ runner.temp }}/${{ matrix.os }}/multi-axon-nodes/ |