Skip to content

Commit

Permalink
Reactivate try-runtime within the CI (#49)
Browse files Browse the repository at this point in the history
* add try-runtime step

* Fix spec name

---------

Co-authored-by: Dastan <[email protected]>
  • Loading branch information
magecnion and dastanbeksamatov authored Oct 11, 2023
1 parent 2b43f09 commit 3aa95ea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 34 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ jobs:
run: |
SKIP_WASM_BUILD=1 cargo test
# try-runtime:
# runs-on:
# group: laos
# labels: ubuntu-16-cores
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/setup
# - uses: ./.github/actions/cache
# with:
# cache-key: try_runtime
# - name: Build
# run: |
# cargo build --release --package laos-ownership --features=try-runtime
# - name: Try Runtime
# run: |
# RUST_LOG=try-runtime ./target/release/laos-ownership try-runtime --runtime ./target/release/wbuild/laos-ownership-runtime/laos_ownership_runtime.wasm on-runtime-upgrade --checks=pre-and-post live --uri ws://143.198.251.52:9944
try-runtime:
runs-on:
group: laos
labels: ubuntu-16-cores
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache
with:
cache-key: try_runtime
- name: Build
run: |
cargo build --release --package laos-ownership --features=try-runtime
- name: Try Runtime
run: |
RUST_LOG=try-runtime ./target/release/laos-ownership try-runtime --runtime ./target/release/wbuild/laos-ownership-runtime/laos_ownership_runtime.wasm on-runtime-upgrade --checks=pre-and-post live --uri ws://161.35.247.178:9944
18 changes: 0 additions & 18 deletions ownership-chain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,28 +204,10 @@ impl_opaque_keys! {
}
}

/// `laos-parachain` is an original spec name of the parachain. `try-runtime` fails when
/// `spec_name` does not match. So we use `laos-parachain` as a spec name to please CI.
///
/// See [this issue](https://github.com/freeverseio/laos/issues/30)
#[cfg(feature = "try-runtime")]
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("laos-parachain"),
impl_name: create_runtime_str!("laos-parachain"),
authoring_version: 1,
spec_version: 7,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
state_version: 1,
};

/// Polkadot.js explorer does not support `laos-parachain` as an ethereum chain, therefore we
/// use `frontier-template` as a spec name to make explorer work.
///
/// See [this issue](https://github.com/freeverseio/laos/issues/30)
#[cfg(not(feature = "try-runtime"))]
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("frontier-template"),
Expand Down

0 comments on commit 3aa95ea

Please sign in to comment.