Skip to content

Commit

Permalink
delete disable-logging and adjust flow to build runtimes only one time
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorPopelyaev committed Jul 31, 2024
1 parent 75720f7 commit cff9c73
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 57 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/release-30_publish_release_draft.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Release - Publish draft

env:
LOGGING_NAME_SUFFIX: "logging"

on:
push:
tags:
Expand Down Expand Up @@ -30,14 +27,6 @@ jobs:
with:
excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template"
build_opts: "--features on-chain-release-build"
name_suffix: ""

build-runtimes-with-logging:
uses: "./.github/workflows/release-srtool.yml"
with:
excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template"
build_opts: ""
name_suffix: "-logging"

build-binaries:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -168,38 +157,6 @@ jobs:
asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm
asset_content_type: application/wasm

publish-runtimes-with-logging:
needs: [ build-runtimes-with-logging, publish-release-draft ]
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.build-runtimes-with-logging.outputs.published_runtimes) }}

steps:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- name: Download artifacts
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4

- name: Get runtime info
env:
JSON: release-notes-context/${{ matrix.chain }}-runtime/${{ matrix.chain }}-srtool-digest.json
run: |
>>$GITHUB_ENV echo ASSET=$(find ${{ matrix.chain }}-runtime-${{ env.LOGGING_NAME_SUFFIX }} -name '*.compact.compressed.wasm')
>>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion)
- name: Upload compressed ${{ matrix.chain }} v${{ env.SPEC }} wasm
if: ${{ matrix.chain != 'rococo-parachain' }}
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }}
asset_path: ${{ env.ASSET }}
asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}-${{ env.LOGGING_NAME_SUFFIX }}.compact.compressed.wasm
asset_content_type: application/wasm

publish-binaries:
needs: [ publish-release-draft, build-binaries ]
continue-on-error: true
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-srtool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
type: string
build_opts:
type: string
name_suffix:
type: string
outputs:
published_runtimes:
value: ${{ jobs.find-runtimes.outputs.runtime }}
Expand Down Expand Up @@ -123,7 +121,7 @@ jobs:
- name: Archive Subwasm results
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ${{ matrix.chain }}-runtime${{ inputs.name_suffix }}
name: ${{ matrix.chain }}-runtime
path: |
${{ matrix.chain }}-info.json
${{ matrix.chain }}-compressed-info.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ metadata-hash = ["substrate-wasm-builder/metadata-hash"]
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["metadata-hash"]
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,4 @@ metadata-hash = ["substrate-wasm-builder/metadata-hash"]
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["metadata-hash"]
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,4 @@ fast-runtime = []
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["sp-api/disable-logging"]
on-chain-release-build = []
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,4 @@ try-runtime = [
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["sp-api/disable-logging"]
on-chain-release-build = []
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@ std = [
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["sp-api/disable-logging"]
on-chain-release-build = []
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,4 @@ try-runtime = [
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["sp-api/disable-logging"]
on-chain-release-build = []
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,4 @@ metadata-hash = ["substrate-wasm-builder/metadata-hash"]
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["metadata-hash"]
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ metadata-hash = ["substrate-wasm-builder/metadata-hash"]
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["metadata-hash"]
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ try-runtime = [
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["sp-api/disable-logging"]
on-chain-release-build = []
2 changes: 1 addition & 1 deletion polkadot/runtime/rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -339,4 +339,4 @@ runtime-metrics = [
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["metadata-hash"]
2 changes: 1 addition & 1 deletion polkadot/runtime/westend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,4 @@ runtime-metrics = [
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["metadata-hash"]

0 comments on commit cff9c73

Please sign in to comment.