-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into bko-extended-ci-tests…
…-pipeline
- Loading branch information
Showing
22 changed files
with
881 additions
and
309 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[ | ||
{ "name": "polkadot", "package": "polkadot-runtime", "path": "relay/polkadot" }, | ||
{ "name": "kusama", "package": "staging-kusama-runtime", "path": "relay/kusama" }, | ||
{ "name": "glutton-kusama", "package": "glutton-kusama-runtime", "path": "system-parachains/gluttons/glutton-kusama" }, | ||
{ "name": "asset-hub-kusama", "package": "asset-hub-kusama-runtime", "path": "system-parachains/asset-hubs/asset-hub-kusama" }, | ||
{ "name": "asset-hub-polkadot", "package": "asset-hub-polkadot-runtime", "path": "system-parachains/asset-hubs/asset-hub-polkadot" }, | ||
{ "name": "bridge-hub-kusama", "package": "bridge-hub-kusama-runtime", "path": "system-parachains/bridge-hubs/bridge-hub-kusama" }, | ||
{ "name": "bridge-hub-polkadot", "package": "bridge-hub-polkadot-runtime", "path": "system-parachains/bridge-hubs/bridge-hub-polkadot" }, | ||
{ "name": "collectives-polkadot", "package": "collectives-polkadot-runtime", "path": "system-parachains/collectives/collectives-polkadot" } | ||
] |
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 |
---|---|---|
|
@@ -2,78 +2,73 @@ name: Create Draft Release | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- CHANGELOG.md | ||
branches: [ "main" ] | ||
paths: [ "CHANGELOG.md" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
enumerate: | ||
runtime-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
runtime: ${{ steps.generate-matrix.outputs.runtime }} | ||
runtime: ${{ steps.runtime.outputs.runtime }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Generate runtime matrix | ||
id: generate-matrix | ||
- uses: actions/checkout@v2 | ||
- id: runtime | ||
run: | | ||
>>$GITHUB_OUTPUT echo runtime="[$(find * -name "lib.rs" -not -path "*/common/*" -not -path "*/constants/*" | awk -F/ '{sub("/src/lib.rs",""); print "[\"" gensub("/" $NF "$", "", "g") "\",\"" $NF "\"],"}' | tr -d $'\n')]" | ||
TASKS=$(echo $(cat .github/workflows/release-matrix.json) | sed 's/ //g' ) | ||
echo $TASKS | ||
echo "runtime=$TASKS" >> $GITHUB_OUTPUT | ||
build-runtimes: | ||
needs: [ runtime-matrix ] | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
needs: | ||
- enumerate | ||
strategy: | ||
matrix: | ||
runtime: ${{ fromJSON(needs.enumerate.outputs.runtime) }} | ||
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache target dir | ||
uses: actions/cache@v3 | ||
with: | ||
path: "${{ github.workspace }}/${{ matrix.runtime[0] }}/${{ matrix.runtime[1] }}/target" | ||
key: srtool-target-${{ matrix.runtime[0] }}-${{ matrix.runtime[1] }}-${{ github.sha }} | ||
path: "${{ github.workspace }}/${{ matrix.runtime.path }}/target" | ||
key: srtool-target-${{ matrix.runtime.path }}-${{ matrix.runtime.name }}-${{ github.sha }} | ||
restore-keys: | | ||
srtool-target-${{ matrix.runtime[0] }}-${{ matrix.runtime[1] }}- | ||
srtool-target-${{ matrix.runtime[0] }}- | ||
srtool-target-${{ matrix.runtime.path }}-${{ matrix.runtime.name }}- | ||
srtool-target-${{ matrix.runtime.path }}- | ||
- name: Build ${{ matrix.runtime[1] }} | ||
- name: Build ${{ matrix.runtime.name }} | ||
id: srtool_build | ||
uses: chevdor/[email protected] | ||
env: | ||
BUILD_OPTS: "--features on-chain-release-build" | ||
with: | ||
chain: ${{ matrix.runtime[1] }} | ||
runtime_dir: "${{ matrix.runtime[0] }}/${{ matrix.runtime[1] }}" | ||
chain: ${{ matrix.runtime.name }} | ||
package: ${{ matrix.runtime.package }} | ||
runtime_dir: ${{ matrix.runtime.path }} | ||
profile: "production" | ||
|
||
- name: Store ${{ matrix.runtime[1] }} srtool digest to disk | ||
- name: Store ${{ matrix.runtime.name }} srtool digest to disk | ||
run: | | ||
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime[1] }}_srtool_output.json | ||
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime.name }}_srtool_output.json | ||
- name: Upload ${{ matrix.runtime[1] }} srtool json | ||
- name: Upload ${{ matrix.runtime.name }} srtool json | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.runtime[1] }}-srtool-json | ||
path: ${{ matrix.runtime[1] }}_srtool_output.json | ||
name: ${{ matrix.runtime.name }}-srtool-json | ||
path: ${{ matrix.runtime.name }}_srtool_output.json | ||
|
||
- name: Upload ${{ matrix.runtime[1] }} | ||
- name: Upload ${{ matrix.runtime.name }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.runtime[1] }} | ||
name: ${{ matrix.runtime.name }} | ||
path: | | ||
${{ steps.srtool_build.outputs.wasm_compressed }} | ||
publish-draft-release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-runtimes | ||
needs: [ build-runtimes ] | ||
outputs: | ||
release_url: ${{ steps.create-release.outputs.html_url }} | ||
asset_upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
|
@@ -99,7 +94,7 @@ jobs: | |
tee -a DRAFT <<-EOF | ||
## Changelog | ||
EOF | ||
tee -a DRAFT <CHANGELOG | ||
tee -a DRAFT <CHANGELOG.md | ||
tee -a DRAFT <<-EOF | ||
## Runtime info | ||
*These runtimes were built with **$(SRTOOL rustc)** using **[$(SRTOOL gen)](https://github.com/paritytech/srtool)*** | ||
|
@@ -132,16 +127,14 @@ jobs: | |
draft: true | ||
|
||
publish-runtimes: | ||
needs: [ runtime-matrix, publish-draft-release ] | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
env: | ||
RUNTIME_DIR: runtime | ||
needs: | ||
- publish-draft-release | ||
- enumerate | ||
strategy: | ||
matrix: | ||
runtime: ${{ fromJSON(needs.enumerate.outputs.runtime) }} | ||
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
@@ -151,18 +144,18 @@ jobs: | |
|
||
- name: Get runtime info | ||
env: | ||
JSON: release-notes-context/${{ matrix.runtime[1] }}-srtool-json/${{ matrix.runtime[1] }}_srtool_output.json | ||
JSON: release-notes-context/${{ matrix.runtime.name }}-srtool-json/${{ matrix.runtime.name }}_srtool_output.json | ||
run: | | ||
>>$GITHUB_ENV echo ASSET=$(find ${{ matrix.runtime[1] }} -name '*.compact.compressed.wasm') | ||
>>$GITHUB_ENV echo ASSET=$(find ${{ matrix.runtime.name }} -name '*.compact.compressed.wasm') | ||
>>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion) | ||
>>$GITHUB_ENV echo TXVER=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.transactionVersion) | ||
- name: Upload compressed ${{ matrix.runtime[1] }} v${{ env.SPEC }} tx${{ env.TXVER }} wasm | ||
- name: Upload compressed ${{ matrix.runtime.name }} v${{ env.SPEC }} tx${{ env.TXVER }} wasm | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.publish-draft-release.outputs.asset_upload_url }} | ||
asset_path: ${{ env.ASSET }} | ||
asset_name: ${{ matrix.runtime[1] }}_runtime-v${{ env.SPEC }}.tx${{ env.TXVER }}.compact.compressed.wasm | ||
asset_name: ${{ matrix.runtime.name }}_runtime-v${{ env.SPEC }}.tx${{ env.TXVER }}.compact.compressed.wasm | ||
asset_content_type: application/wasm |
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 |
---|---|---|
@@ -1,12 +1,39 @@ | ||
**/target/ | ||
**/*.rs.bk | ||
*.swp | ||
.wasm-binaries | ||
runtime/wasm/target/ | ||
**/._* | ||
!polkadot.service | ||
.cargo-remote.toml | ||
.direnv/ | ||
.DS_Store | ||
.env* | ||
.idea | ||
.local | ||
.vscode | ||
.wasm-binaries | ||
*.adoc | ||
*.bin | ||
*.iml | ||
*.orig | ||
*.rej | ||
*.swp | ||
**/._* | ||
**/.criterion/ | ||
**/*.rs.bk | ||
**/chains/ | ||
**/hfuzz_target/ | ||
**/hfuzz_workspace/ | ||
**/node_modules | ||
**/target/ | ||
**/wip/*.stderr | ||
/.cargo/config | ||
/.envrc | ||
artifacts | ||
bin/node-template/Cargo.lock | ||
nohup.out | ||
polkadot_argument_parsing | ||
polkadot.* | ||
!polkadot.service | ||
.DS_Store | ||
.env | ||
pwasm-alloc/Cargo.lock | ||
pwasm-libc/Cargo.lock | ||
release-artifacts | ||
release.json | ||
rls*.log | ||
runtime/wasm/target/ | ||
substrate.code-workspace | ||
target/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[workspace.package] | ||
authors = ["Parity Technologies <[email protected]>"] | ||
version = "1.0.0" | ||
authors = ["Polkadot Fellowship"] | ||
edition = "2021" | ||
repository = "https://github.com/polkadot-fellows/runtimes.git" | ||
license = "GPL-3.0-only" # TODO <https://github.com/polkadot-fellows/runtimes/issues/29> | ||
|
Oops, something went wrong.