diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08f259d..7911f93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -242,6 +242,21 @@ jobs: CARGO_INCREMENTAL: "0" SCCACHE_CACHE_SIZE: "100GB" steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@v1.3.0 + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: false + docker-images: true + swap-storage: true - name: Checkout uses: actions/checkout@v3 with: diff --git a/pallets/maintenance-mode/src/types.rs b/pallets/maintenance-mode/src/types.rs index 2a3b523..0cf4c9c 100644 --- a/pallets/maintenance-mode/src/types.rs +++ b/pallets/maintenance-mode/src/types.rs @@ -23,9 +23,9 @@ use frame_support::{ weights::Weight, }; use frame_system::pallet_prelude::BlockNumberFor as BlockNumberOf; -use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] -use sp_std::vec::Vec; +use sp_runtime::TryRuntimeError; +use sp_std::marker::PhantomData; pub struct ExecutiveHooks(PhantomData); @@ -94,20 +94,11 @@ where } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::DispatchError> { - if Pallet::::maintenance_mode() { - T::MaintenanceExecutiveHooks::pre_upgrade() - } else { - T::NormalExecutiveHooks::pre_upgrade() - } - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), sp_runtime::DispatchError> { + fn try_on_runtime_upgrade(checks: bool) -> Result { if Pallet::::maintenance_mode() { - T::MaintenanceExecutiveHooks::post_upgrade(state) + T::MaintenanceExecutiveHooks::try_on_runtime_upgrade(checks) } else { - T::NormalExecutiveHooks::post_upgrade(state) + T::NormalExecutiveHooks::try_on_runtime_upgrade(checks) } } }