Skip to content

Commit

Permalink
Generate runtime wasm on master and release (#606)
Browse files Browse the repository at this point in the history
* release v0.6.7

* srtool actions

* srtool actions

* try empty string

* try if else

* try if else

* fix wasm build

* cleanup
  • Loading branch information
1xstj authored Apr 12, 2024
1 parent 751b03e commit 8af256e
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/generate-srtool-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Srtool build Wasm

on:
workflow_dispatch:

push:
branches: [main]

jobs:
srtool:
runs-on: ubuntu-latest
strategy:
matrix:
chain: ["testnet", "mainnet"]
steps:

- uses: actions/checkout@v3

- name: Srtool build
if: matrix.chain == 'mainnet'
id: srtool_build
uses: chevdor/[email protected]
with:
chain: ${{ matrix.chain }}
runtime_dir: runtime/${{ matrix.chain }}
package: tangle-runtime

- name: Srtool build testnet
if: matrix.chain == 'testnet'
uses: chevdor/[email protected]
with:
chain: ${{ matrix.chain }}
runtime_dir: runtime/${{ matrix.chain }}
package: tangle-testnet-runtime

- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.chain }}-srtool-digest.json
cat ${{ matrix.chain }}-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
- name: Archive Runtime
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.chain }}-runtime-${{ github.sha }}
path: |
${{ steps.srtool_build.outputs.wasm }}
${{ matrix.chain }}-srtool-digest.json
48 changes: 48 additions & 0 deletions .github/workflows/publish-srtool-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Srtool Wasm Publish

on:
workflow_dispatch:

push:
tags: ["v*.*.*"]

jobs:
srtool:
runs-on: ubuntu-latest
strategy:
matrix:
chain: ["testnet", "mainnet"]
steps:
- uses: actions/checkout@v3

- name: Srtool build
if: matrix.chain == 'mainnet'
id: srtool_build
uses: chevdor/[email protected]
with:
chain: ${{ matrix.chain }}
runtime_dir: runtime/${{ matrix.chain }}
package: tangle-runtime

- name: Srtool build testnet
if: matrix.chain == 'testnet'
uses: chevdor/[email protected]
with:
chain: ${{ matrix.chain }}
runtime_dir: runtime/${{ matrix.chain }}
package: tangle-testnet-runtime

- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.chain }}-srtool-digest.json
cat ${{ matrix.chain }}-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
- name: Upload ${{ matrix.chain }} wasm to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.srtool_build.outputs.wasm }}
asset_name: tangle-${{ matrix.features }}-srtool-wasm
tag: ${{ github.ref }}
overwrite: true
1 change: 1 addition & 0 deletions pallets/dkg/src/misbehavior/dfns_cggmp21/integer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// along with Tangle. If not, see <http://www.gnu.org/licenses/>.

use malachite_base::num::conversion::traits::FromStringBase;
use parity_scale_codec::alloc::vec;
use parity_scale_codec::{Decode, Encode};
use scale_info::TypeInfo;
use sp_core::RuntimeDebug;
Expand Down
1 change: 1 addition & 0 deletions runtime/mainnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ std = [
"pallet-roles/std",
"sp-storage/std",
"pallet-jobs/std",
"pallet-jobs-rpc-runtime-api/std",

# Tangle dependencies
"tangle-primitives/std",
Expand Down

0 comments on commit 8af256e

Please sign in to comment.