Skip to content

ci: chainspec sync check#537

Merged
x3c41a merged 7 commits into
mainfrom
ndk/chainspec-sync-ci
May 15, 2026
Merged

ci: chainspec sync check#537
x3c41a merged 7 commits into
mainfrom
ndk/chainspec-sync-ci

Conversation

@x3c41a
Copy link
Copy Markdown
Contributor

@x3c41a x3c41a commented May 14, 2026

Summary

  • Add CI workflow that boots polkadot-omni-node for each chainspec in chainspecs/ and waits until it imports a few blocks
  • polkadot-omni-node version (and SHA256) is pinned in the workflow itself
  • Matrix runs Polkadot, Westend, Paseo Next, and Paseo Next v2 in parallel, each against a public relay-chain RPC

Triggers

  • Pushes/PRs that touch chainspecs/ or the workflow itself
  • workflow_dispatch

Follow-up to

@x3c41a x3c41a force-pushed the ndk/chainspec-sync-ci branch from 4159d46 to 5885523 Compare May 14, 2026 14:31
Comment on lines +50 to +65
- name: Cache polkadot-omni-node
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: omni-node-cache
with:
path: ${{ env.OMNI_NODE_BIN_DIR }}
key: omni-node-${{ env.OMNI_NODE_VERSION }}

- name: Download polkadot-omni-node
if: steps.omni-node-cache.outputs.cache-hit != 'true'
run: |
mkdir -p "$OMNI_NODE_BIN_DIR"
cd "$OMNI_NODE_BIN_DIR"
curl -fL -o polkadot-omni-node \
"https://github.com/paritytech/polkadot-sdk/releases/download/${OMNI_NODE_VERSION}/polkadot-omni-node"
echo "${OMNI_NODE_SHA256} polkadot-omni-node" | sha256sum -c -
chmod +x polkadot-omni-node
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the same download mechanism:

- name: Restore binary cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
${{ env.POLKADOT_BINARIES_DIR }}/polkadot-node
${{ env.POLKADOT_BINARIES_DIR }}/chain-spec-builder
${{ env.POLKADOT_BINARIES_DIR }}/zombienet
key: polkadot-binaries-${{ runner.os }}-${{ env.POLKADOT_NODE_VERSION }}-${{ env.CHAIN_SPEC_BUILDER_VERSION }}-${{ env.ZOMBIENET_VERSION }}
fail-on-cache-miss: true
- name: Resolve binary directories + add to PATH
run: |
POLKADOT_DIR="$(just binaries-polkadot)"
CSB_DIR="$(just binaries-chain-spec-builder)"
ZN_DIR="$(just binaries-zombienet)"
echo "$POLKADOT_DIR" >> "$GITHUB_PATH"
echo "$CSB_DIR" >> "$GITHUB_PATH"
echo "$ZN_DIR" >> "$GITHUB_PATH"

@karolk91 not sure if just ${{ env.POLKADOT_BINARIES_DIR }}/polkadot-omni-node works

Suggested change
- name: Cache polkadot-omni-node
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: omni-node-cache
with:
path: ${{ env.OMNI_NODE_BIN_DIR }}
key: omni-node-${{ env.OMNI_NODE_VERSION }}
- name: Download polkadot-omni-node
if: steps.omni-node-cache.outputs.cache-hit != 'true'
run: |
mkdir -p "$OMNI_NODE_BIN_DIR"
cd "$OMNI_NODE_BIN_DIR"
curl -fL -o polkadot-omni-node \
"https://github.com/paritytech/polkadot-sdk/releases/download/${OMNI_NODE_VERSION}/polkadot-omni-node"
echo "${OMNI_NODE_SHA256} polkadot-omni-node" | sha256sum -c -
chmod +x polkadot-omni-node

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread .github/workflows/chainspec-sync-check.yml Outdated

- uses: ./.github/actions/install-just

- name: Cache polkadot-node binaries
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@x3c41a @karolk91 I think we need to run "setup" before matrix job, because all took 16min:
https://github.com/paritytech/polkadot-bulletin-chain/actions/runs/25871727728/job/76028482209?pr=537#step:6:32
https://github.com/paritytech/polkadot-bulletin-chain/actions/runs/25871727728/job/76028482294?pr=537#step:6:32

Cache not found for input keys: polkadot-node-Linux-d6a4f5977b39bf5e5152e2f2bb6719ea92b992ea

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was also looking at this. Here is some attempt to make it easier to handle these binaries+caches: #540. If we merge that then this job would need to do something like:

  1. Outside of matrix job - to be run only by single runner, so if we need to recompile for some reason, then it will be only done on a single runner
      - name: Set up Polkadot binaries
        uses: ./.github/actions/use-polkadot-binaries
        with:
          groups: polkadot-node
          mode: prepare
  1. Then inside a matrix job:
      - name: Set up Polkadot binaries
        uses: ./.github/actions/use-polkadot-binaries
        with:
          groups: polkadot-node
          mode: consume

Comment thread .github/workflows/chainspec-sync-check.yml Outdated
@x3c41a x3c41a merged commit 353421b into main May 15, 2026
51 of 52 checks passed
@x3c41a x3c41a deleted the ndk/chainspec-sync-ci branch May 15, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants