Merge branch 'main' into refactor/impl_apis_runtime_is_not_macro #1889
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: Build | |
# Controls when the action will run. | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Check | |
run: | | |
cargo check --all-targets --release --features runtime-benchmarks --features try-runtime --features fast-runtime | |
build_and_push: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Build | |
run: | | |
cargo build --release | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2.1.0 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Push Laos Node Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./docker/laos-node.local.Dockerfile | |
push: true | |
tags: freeverseio/laos-node:${{ github.sha }} | |
lint: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: lint | |
- name: install nightly | |
run: | | |
rustup toolchain install nightly | |
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu | |
- name: check format | |
run: | | |
cargo +nightly fmt --all --check | |
- name: install clippy | |
run: | | |
rustup component add clippy | |
- name: Check clippy | |
run: | | |
cargo clippy --all-targets --workspace --features runtime-benchmarks --features try-runtime | |
test: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: test | |
- name: Test | |
run: | | |
SKIP_WASM_BUILD=1 cargo test | |
try-runtime-klaos: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: try_runtime | |
- name: Build | |
run: | | |
cargo build --release --package laos --features=try-runtime | |
- name: Try Runtime for Klaos | |
run: | | |
RUST_LOG=try-runtime ./target/release/laos try-runtime --chain klaos-dev --runtime ./target/release/wbuild/klaos-runtime/klaos_runtime.wasm on-runtime-upgrade --checks=pre-and-post live --uri ws://159.223.241.90:9944 | |
e2e-tests: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Build | |
run: | | |
cargo build --release | |
- name: Copy polkadot relay chain binary | |
run: | | |
wget https://github.com/paritytech/polkadot/releases/download/v0.9.42/polkadot | |
chmod +x ./polkadot | |
- name: Copy Astar parachain binary | |
run: | | |
wget https://github.com/AstarNetwork/Astar/releases/download/v5.23.0/astar-collator-v5.23.0-ubuntu-x86_64.tar.gz | |
tar xf astar-collator-v5.23.0-ubuntu-x86_64.tar.gz | |
chmod +x ./astar-collator | |
- name: Copy zombienet binary | |
run: | | |
wget https://github.com/paritytech/zombienet/releases/download/v1.3.55/zombienet-linux-x64 | |
chmod +x ./zombienet-linux-x64 | |
- name: Run zombienet | |
run: | | |
export ZOMBIENET_RELAYCHAIN_COMMAND=./polkadot | |
export ZOMBIENET_LAOS_COMMAND=./target/release/laos | |
export ZOMBIENET_ASTAR_COMMAND=./astar-collator | |
./zombienet-linux-x64 spawn ./zombienet/native.toml -p native & | |
echo "Zombienet started" | |
- name: Wait for zombienet | |
run: | | |
timeout 36 sh -c 'until nc -z $0 $1; do echo -n .; sleep 1; done' localhost 9999 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm install | |
working-directory: ./e2e-tests | |
- name: Run tests | |
run: | | |
npm run build && npm run test:laos | |
working-directory: ./e2e-tests | |
e2e-tests-klaos: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Build | |
run: | | |
cargo build --release | |
- name: Copy polkadot relay chain binary | |
run: | | |
wget https://github.com/paritytech/polkadot/releases/download/v0.9.42/polkadot | |
chmod +x ./polkadot | |
- name: Copy Astar parachain binary | |
run: | | |
wget https://github.com/AstarNetwork/Astar/releases/download/v5.23.0/astar-collator-v5.23.0-ubuntu-x86_64.tar.gz | |
tar xf astar-collator-v5.23.0-ubuntu-x86_64.tar.gz | |
chmod +x ./astar-collator | |
- name: Copy zombienet binary | |
run: | | |
wget https://github.com/paritytech/zombienet/releases/download/v1.3.55/zombienet-linux-x64 | |
chmod +x ./zombienet-linux-x64 | |
- name: Run zombienet | |
run: | | |
export ZOMBIENET_RELAYCHAIN_COMMAND=./polkadot | |
export ZOMBIENET_LAOS_COMMAND=./target/release/laos | |
export ZOMBIENET_ASTAR_COMMAND=./astar-collator | |
./zombienet-linux-x64 spawn ./zombienet/native.klaos.toml -p native & | |
echo "Zombienet started" | |
- name: Wait for zombienet | |
run: | | |
timeout 36 sh -c 'until nc -z $0 $1; do echo -n .; sleep 1; done' localhost 9999 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm install | |
working-directory: ./e2e-tests | |
- name: Run tests | |
run: | | |
npm run build && npm run test | |
working-directory: ./e2e-tests |