-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into pallet-aura
- Loading branch information
Showing
201 changed files
with
4,434 additions
and
2,273 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,66 @@ on: | |
default: "" | ||
|
||
jobs: | ||
prepare-chain-spec-artifacts: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- template: minimal | ||
package_name: 'minimal-template-runtime' | ||
runtime_path: './templates/minimal/runtime' | ||
runtime_wasm_path: minimal-template-runtime/minimal_template_runtime.compact.compressed.wasm | ||
relay_chain: 'dev' | ||
- template: parachain | ||
package_name: 'parachain-template-runtime' | ||
runtime_path: './templates/parachain/runtime' | ||
runtime_wasm_path: parachain-template-runtime/parachain_template_runtime.compact.compressed.wasm | ||
relay_chain: 'rococo-local' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "${{ github.event.inputs.stable_release_branch }}" | ||
|
||
- name: Setup build environment | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y protobuf-compiler | ||
cargo install --git https://github.com/chevdor/srtool-cli --locked | ||
cargo install --path substrate/bin/utils/chain-spec-builder --locked | ||
srtool pull | ||
- name: Build runtime and generate chain spec | ||
run: | | ||
# Prepare directories | ||
sudo mkdir -p ${{ matrix.template.runtime_path }}/target | ||
sudo chmod -R 777 ${{ matrix.template.runtime_path }}/target | ||
# Build runtime | ||
srtool build --package ${{ matrix.template.package_name }} --runtime-dir ${{ matrix.template.runtime_path }} --root | ||
# Generate chain spec | ||
# Note that para-id is set to 1000 for both minimal/parachain templates. | ||
# `parachain-runtime` is hardcoded to use this parachain id. | ||
# `minimal` template isn't using it, but when started with Omni Node, this para id is required (any number can do it, so setting it to 1000 for convenience). | ||
chain-spec-builder -c dev_chain_spec.json create \ | ||
--relay-chain "${{ matrix.template.relay_chain }}" \ | ||
--para-id 1000 \ | ||
--runtime "${{ matrix.template.runtime_path }}/target/srtool/release/wbuild/${{ matrix.template.runtime_wasm_path }}" \ | ||
named-preset development | ||
- name: Prepare upload directory | ||
run: | | ||
mkdir -p artifacts-${{ matrix.template }} | ||
cp dev_chain_spec.json artifacts-${{ matrix.template }}/dev_chain_spec.json | ||
- name: Upload template directory | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifacts-${{ matrix.template }} | ||
path: artifacts-${{ matrix.template }}/dev_chain_spec.json | ||
|
||
sync-templates: | ||
needs: prepare-chain-spec-artifacts | ||
runs-on: ubuntu-latest | ||
environment: master | ||
strategy: | ||
|
@@ -52,6 +111,12 @@ jobs: | |
with: | ||
path: polkadot-sdk | ||
ref: "${{ github.event.inputs.stable_release_branch }}" | ||
- name: Download template artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: artifacts-${{ matrix.template }} | ||
path: templates/${{ matrix.template }}/ | ||
if: matrix.template != 'solochain' | ||
- name: Generate a token for the template repository | ||
id: app_token | ||
uses: actions/[email protected] | ||
|
Oops, something went wrong.