fix: getting-started workflow use local templates and workspace builds

- Add PEZKUWI_TEMPLATE_SOURCE env var support to getting-started.sh
  for using local templates instead of cloning from external repos
- Update workflow to build templates within SDK workspace context
  since templates use workspace inheritance
- Add package names to matrix for correct cargo -p targets
- Add SKIP_WASM_BUILD=1 to avoid serde_core wasm32 issues
This commit is contained in:
2026-01-08 12:12:22 +03:00
parent 0f57673c41
commit 949f2f8f24
2 changed files with 40 additions and 12 deletions
+31 -10
View File
@@ -46,25 +46,35 @@ jobs:
- name: ubuntu
container: ubuntu
template: minimal
package: pez-minimal-template-node
shell: bash
- name: debian
container: debian
template: teyrchain
package: teyrchain-template-node
shell: sh
- name: arch
container: archlinux
template: solochain
package: pez-solochain-template-node
shell: sh
- name: fedora
container: fedora
template: teyrchain
package: teyrchain-template-node
shell: sh
- name: opensuse
container: opensuse/tumbleweed
template: solochain
package: pez-solochain-template-node
shell: sh
runs-on: ubuntu-latest
container: ${{ matrix.container }}:latest
env:
# Use local templates from the repo instead of cloning from external repos
PEZKUWI_TEMPLATE_SOURCE: ${{ github.workspace }}/templates
# Skip WASM build due to serde_core compatibility issues
SKIP_WASM_BUILD: 1
steps:
# A minimal amount of prerequisites required before we can run the actual getting-started script,
# which will install the rest of requirements.
@@ -167,18 +177,20 @@ jobs:
'
timeout-minutes: 15
- name: Compile the node outside of the script
# Build the template from within the SDK workspace context
# Templates use workspace inheritance and can't be built standalone
- name: Compile the template node
run: |
. "$HOME/.cargo/env"
cd ${{ matrix.template }}-template
cargo build --release
cd ${{ github.workspace }}
cargo build --release -p ${{ matrix.package }}
timeout-minutes: 120
- name: Check that the binary is executable
run: |
. "$HOME/.cargo/env"
cd ${{ matrix.template }}-template
cargo run --release -- --help
cd ${{ github.workspace }}
cargo run --release -p ${{ matrix.package }} -- --help
timeout-minutes: 5
check-getting-started-macos:
@@ -188,10 +200,17 @@ jobs:
matrix:
include:
- template: teyrchain
package: teyrchain-template-node
shell: sh
- template: solochain
package: pez-solochain-template-node
shell: bash
runs-on: macos-latest
env:
# Use local templates from the repo instead of cloning from external repos
PEZKUWI_TEMPLATE_SOURCE: ${{ github.workspace }}/templates
# Skip WASM build due to serde_core compatibility issues
SKIP_WASM_BUILD: 1
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -285,16 +304,18 @@ jobs:
'
timeout-minutes: 15
- name: Compile the node outside of the script
# Build the template from within the SDK workspace context
# Templates use workspace inheritance and can't be built standalone
- name: Compile the template node
run: |
. "$HOME/.cargo/env"
cd ${{ matrix.template }}-template
cargo build --release
cd ${{ github.workspace }}
cargo build --release -p ${{ matrix.package }}
timeout-minutes: 120
- name: Check that the binary is executable
run: |
. "$HOME/.cargo/env"
cd ${{ matrix.template }}-template
cargo run --release -- --help
cd ${{ github.workspace }}
cargo run --release -p ${{ matrix.package }} -- --help
timeout-minutes: 5
+9 -2
View File
@@ -33,8 +33,15 @@ clone_and_enter_template() {
if [ -d "${template}-template" ]; then
printf "\n✅︎ ${template}-template directory already exists. -> Entering.\n"
else
printf "\n↓ Let's grab the ${template} template from github.\n"
git clone --quiet https://github.com/pezkuwichain/pezkuwi-sdk-${template}-template.git ${template}-template
# PEZKUWI_TEMPLATE_SOURCE can be set to a local path for CI testing
# e.g., PEZKUWI_TEMPLATE_SOURCE="/path/to/pezkuwi-sdk/templates"
if [ -n "$PEZKUWI_TEMPLATE_SOURCE" ] && [ -d "$PEZKUWI_TEMPLATE_SOURCE/${template}" ]; then
printf "\n↓ Copying ${template} template from local source.\n"
cp -r "$PEZKUWI_TEMPLATE_SOURCE/${template}" "${template}-template"
else
printf "\n↓ Let's grab the ${template} template from github.\n"
git clone --quiet https://github.com/pezkuwichain/pezkuwi-sdk-${template}-template.git ${template}-template
fi
fi
cd ${template}-template
}