-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
863 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,32 +12,40 @@ jobs: | |
contents: write | ||
strategy: | ||
matrix: | ||
runtime: ["paseo"] | ||
runtime: | ||
- name: "paseo" | ||
path: "relay/paseo" | ||
- name: "asset-hub-paseo" | ||
path: "system-parachains/asset-hub-paseo-runtime" | ||
- name: "bridge-hub-paseo" | ||
path: "system-parachains/bp-bridge-hub-paseo" | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache runtime target dir | ||
uses: actions/cache@v3 | ||
with: | ||
path: "${{ github.workspace }}/runtime/${{ matrix.runtime }}/target" | ||
key: srtool-target-${{ matrix.runtime }}-${{ github.sha }} | ||
path: "${{ github.workspace }}/runtime/${{ matrix.runtime.name }}/target" | ||
key: srtool-target-${{ matrix.runtime.name }}-${{ github.sha }} | ||
restore-keys: | | ||
srtool-target-${{ matrix.runtime }}- | ||
srtool-target-${{ matrix.runtime.name }}- | ||
srtool-target- | ||
- name: Build ${{ matrix.runtime }} runtime | ||
- name: Build ${{ matrix.runtime.name }} runtime | ||
id: srtool_build | ||
uses: chevdor/[email protected] | ||
env: | ||
BUILD_OPTS: "--features on-chain-release-build" | ||
with: | ||
chain: ${{ matrix.runtime }} | ||
package: "paseo-runtime" | ||
runtime_dir: "relay/paseo" | ||
chain: ${{ matrix.runtime.name }} | ||
package: "${{ matrix.runtime.name }}-runtime" | ||
runtime_dir: ${{ matrix.runtime.path }} | ||
profile: "production" | ||
|
||
- name: Store srtool digest to disk | ||
run: | | ||
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.runtime }}-srtool-digest.json | ||
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.runtime.name }}-srtool-digest.json | ||
# Manual trigger: add artifacts to run | ||
- name: Copy artifacts | ||
|
@@ -47,10 +55,10 @@ jobs: | |
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.runtime }}-runtime-${{ github.sha }} | ||
name: ${{ matrix.runtime.name }}-runtime-${{ github.sha }} | ||
path: | | ||
${{ matrix.chain }}*.wasm | ||
${{ matrix.runtime }}-srtool-digest.json | ||
${{ matrix.runtime.name }}*.wasm | ||
${{ matrix.runtime.name }}-srtool-digest.json | ||
# Release published: add artifacts to release | ||
- name: Add artifacts to release | ||
|
@@ -59,7 +67,7 @@ jobs: | |
with: | ||
append_body: true | ||
body: | | ||
## Runtime: `${{ matrix.runtime }}` | ||
## Runtime: `${{ matrix.runtime.name }}` | ||
``` | ||
🏋️ Runtime Size: ${{ fromJSON(steps.srtool_build.outputs.json).runtimes.compressed.subwasm.size }} bytes | ||
🔥 Core Version: ${{ fromJSON(steps.srtool_build.outputs.json).runtimes.compressed.subwasm.core_version.specName }}-${{ fromJSON(steps.srtool_build.outputs.json).runtimes.compressed.subwasm.core_version.specVersion }} | ||
|
@@ -71,4 +79,4 @@ jobs: | |
``` | ||
files: | | ||
${{ steps.srtool_build.outputs.wasm_compressed }} | ||
${{ matrix.runtime }}-srtool-digest.json | ||
${{ matrix.runtime.name }}-srtool-digest.json |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Remote Test Trigger | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
trigger-remote-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger Remote Test Workflow | ||
env: | ||
GH_TOKEN: ${{ secrets.PASEO_RUNTIME_CI_PAT }} | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GH_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/Zondax/paseo-runtime-test/actions/workflows/webhook-pr-trigger.yml/dispatches \ | ||
-d '{ | ||
"ref": "main", | ||
"inputs": { | ||
"target_repo": "https://github.com/${{ github.repository }}", | ||
"target_branch": "${{ github.head_ref }}" | ||
} | ||
}' |
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 |
---|---|---|
|
@@ -38,3 +38,4 @@ substrate.code-workspace | |
target/ | ||
**/tmp_runtime | ||
**/tmp_hub | ||
*.log |
Oops, something went wrong.