Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix (#882) Use correct feature flags with srtool #884

Merged
merged 1 commit into from
Jan 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ jobs:
built-wasm-file-name-prefix: frequency_runtime
release-wasm-file-name-prefix: frequency-rococo_runtime
features: frequency-rococo-testnet
wasm-core-version: frequency-rococo
- network: mainnet
build-profile: production
package: frequency-runtime
runtime-dir: runtime/frequency
built-wasm-file-name-prefix: frequency_runtime
release-wasm-file-name-prefix: frequency_runtime
features: frequency
wasm-core-version: frequency
runs-on: [self-hosted, Linux, X64]
steps:
- name: Set Ubuntu Env Vars
Expand Down Expand Up @@ -189,15 +191,24 @@ jobs:
- name: Build Deterministic WASM
run: |
set -ex
srtool build \
--default-features="on-chain-release-build,no-metadata-docs,${{matrix.features}}" \
RUST_LOG=debug srtool build \
--build-opts="'--features on-chain-release-build,no-metadata-docs,${{matrix.features}}'" \
--profile=${{matrix.build-profile}} \
--package=${{matrix.package}} \
--root
- name: Rename WASM file
run: |
cp -p ./${{env.WASM_DIR}}/${{env.BUILT_WASM_FILENAME}} \
./${{env.WASM_DIR}}/${{env.RELEASE_WASM_FILENAME}}
- name: Install subwasm
run: |
cargo install --locked --git https://github.com/chevdor/subwasm --tag v0.18.0
subwasm --version
- name: Test WASM file
run: |
subwasm info ${{env.WASM_DIR}}/${{env.RELEASE_WASM_FILENAME}}
subwasm info ${{env.WASM_DIR}}/${{env.RELEASE_WASM_FILENAME}} | grep "Core version:.*${{matrix.wasm-core-version}}-${{env.RUNTIME_SPEC_VERSION}}" || \
(echo "ERROR: WASM Core version didn't match ${{matrix.wasm-core-version}}-${{env.RUNTIME_SPEC_VERSION}}" && exit 1)
demisx marked this conversation as resolved.
Show resolved Hide resolved
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand Down