mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 22:17:58 +00:00
Build Polkadot Nodes in CI - fixes artifact generation (#1410)
* new workflow and adjust node builder * fix examples by fixing artifacts script * use-nodes instead of use-substrate * update yamls * build polkadot * remove the on-push trigger again, now that polkadot built in the CI * add default implementation again
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# use-nodes
|
||||
|
||||
This action downloads the substrate and polkadot binaries produced from the `build-nodes` workflow and puts them into the `$PATH`.
|
||||
@@ -0,0 +1,33 @@
|
||||
name: Use substrate and polkadot binaries
|
||||
description: Downloads and configures the substrate and polkadot binaries built with `build-nodes`
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Download substrate-node binary
|
||||
id: download-substrate-binary
|
||||
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
|
||||
with:
|
||||
workflow: build-nodes.yml
|
||||
name: nightly-substrate-binary
|
||||
|
||||
- name: Download polkadot binary
|
||||
id: download-polkadot-binary
|
||||
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
|
||||
with:
|
||||
workflow: build-nodes.yml
|
||||
name: nightly-polkadot-binary
|
||||
|
||||
- name: Prepare binaries
|
||||
shell: bash
|
||||
run: |
|
||||
chmod u+x ./substrate-node
|
||||
chmod u+x ./polkadot
|
||||
chmod u+x ./polkadot-execute-worker
|
||||
chmod u+x ./polkadot-prepare-worker
|
||||
./substrate-node --version
|
||||
./polkadot --version
|
||||
mkdir -p ~/.local/bin
|
||||
cp ./substrate-node ~/.local/bin
|
||||
cp ./polkadot ~/.local/bin
|
||||
cp ./polkadot-execute-worker ~/.local/bin
|
||||
cp ./polkadot-prepare-worker ~/.local/bin
|
||||
@@ -1,3 +0,0 @@
|
||||
# use-substrate
|
||||
|
||||
This action downloads the substrate binary produced from the `build-substrate` workflow and puts it into the `$PATH`.
|
||||
@@ -1,19 +0,0 @@
|
||||
name: Use substrate binary
|
||||
description: Downloads and configures the substrate binary built with build-substrate
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Download substrate-node binary
|
||||
id: download-artifact
|
||||
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
|
||||
with:
|
||||
workflow: build-substrate.yml
|
||||
name: nightly-substrate-binary
|
||||
|
||||
- name: Prepare substrate-node binary
|
||||
shell: bash
|
||||
run: |
|
||||
chmod u+x ./substrate-node
|
||||
./substrate-node --version
|
||||
mkdir -p ~/.local/bin
|
||||
cp ./substrate-node ~/.local/bin
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Build Substrate Binary
|
||||
name: Build Substrate and Polkadot Binaries
|
||||
|
||||
on:
|
||||
# Allow it to be manually ran to rebuild binary when needed:
|
||||
@@ -9,7 +9,7 @@ on:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: Build Substrate
|
||||
name: Build Substrate and Polkadot Binaries
|
||||
runs-on: ubuntu-latest-16-cores
|
||||
steps:
|
||||
- name: checkout polkadot-sdk
|
||||
@@ -42,3 +42,20 @@ jobs:
|
||||
path: target/release/substrate-node
|
||||
retention-days: 2
|
||||
if-no-files-found: error
|
||||
|
||||
- name: build polkadot binary
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release --manifest-path polkadot/Cargo.toml
|
||||
|
||||
- name: upload polkadot binary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nightly-polkadot-binary
|
||||
path: |
|
||||
target/release/polkadot
|
||||
target/release/polkadot-execute-worker
|
||||
target/release/polkadot-prepare-worker
|
||||
retention-days: 2
|
||||
if-no-files-found: error
|
||||
@@ -16,8 +16,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
||||
+18
-18
@@ -56,8 +56,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -88,8 +88,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -120,8 +120,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -151,8 +151,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -240,8 +240,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -274,8 +274,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -308,8 +308,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -342,8 +342,8 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -388,8 +388,8 @@ jobs:
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
|
||||
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Run subxt WASM tests
|
||||
run: |
|
||||
|
||||
@@ -21,8 +21,8 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# We run this (up-to-date) node locally to fetch metadata from it for the artifacts
|
||||
- name: Use substrate-node binary
|
||||
uses: ./.github/workflows/actions/use-substrate
|
||||
- name: Use substrate and polkadot node binaries
|
||||
uses: ./.github/workflows/actions/use-nodes
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
||||
Reference in New Issue
Block a user