Skip to content

Commit

Permalink
Solving conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
hbulgarini committed Jul 24, 2024
2 parents 7550b25 + 71782fd commit 4303b7d
Show file tree
Hide file tree
Showing 11 changed files with 863 additions and 203 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/build-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -71,4 +79,4 @@ jobs:
```
files: |
${{ steps.srtool_build.outputs.wasm_compressed }}
${{ matrix.runtime }}-srtool-digest.json
${{ matrix.runtime.name }}-srtool-digest.json
26 changes: 26 additions & 0 deletions .github/workflows/remote-test.yml
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 }}"
}
}'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ substrate.code-workspace
target/
**/tmp_runtime
**/tmp_hub
*.log
Loading

0 comments on commit 4303b7d

Please sign in to comment.