Skip to content

Commit c06331a

Browse files
committed
Back Aura API and fix release workflow
1 parent 5128d7a commit c06331a

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,25 @@ jobs:
6666
runs-on: ubuntu-latest
6767
strategy:
6868
matrix:
69-
os: ["ubuntu", "macOS"]
69+
platform: ["unknown-linux-musl", "apple-darwin"]
7070
arch: ["x86_64", "aarch64"]
7171
exclude:
72-
- os: macOS
72+
- platform: apple-darwin
7373
arch: aarch64
7474
steps:
7575
- name: Create download folder
7676
run: |
77-
mkdir -p ${{ matrix.os }}-${{ matrix.arch }}-bin
77+
mkdir -p ${{ matrix.arch }}-${{ matrix.platform }}-bin
7878
7979
- name: Download pre-built collator binary
8080
uses: actions/download-artifact@v4
8181
with:
82-
name: robonomics-${{ matrix.os }}-latest-${{ matrix.arch }}
83-
path: ${{ matrix.os }}-${{ matrix.arch }}-bin
82+
name: robonomics-${{ matrix.arch }}-${{ matrix.platform }}
83+
path: ${{ matrix.arch }}-${{ matrix.platform }}-bin
8484

8585
- name: Make binary executable and tar gzip
8686
run: |
87-
cd ${{ matrix.os }}-${{ matrix.arch }}-bin
87+
cd ${{ matrix.arch }}-${{ matrix.platform }}-bin
8888
chmod +x robonomics
8989
tar zcvf robonomics.tar.gz robonomics
9090
@@ -94,8 +94,8 @@ jobs:
9494
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9595
with:
9696
upload_url: ${{ needs.publish-release-draft.outputs.upload_url }}
97-
asset_path: ${{ matrix.os }}-${{ matrix.arch }}-bin/robonomics.tar.gz
98-
asset_name: robonomics-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
97+
asset_path: ${{ matrix.arch }}-${{ matrix.platform }}-bin/robonomics.tar.gz
98+
asset_name: robonomics-${{ github.ref_name }}-${{ matrix.arch }}-${{ matrix.platform }}.tar.gz
9999
asset_content_type: application/gzip
100100

101101
upload-runtimes:

chains/kusama-parachain.raw.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

runtime/robonomics/src/lib.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,24 @@ impl_runtime_apis! {
855855
}
856856
}
857857

858+
impl cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> for Runtime {
859+
fn can_build_upon(
860+
included_hash: <Block as BlockT>::Hash,
861+
slot: cumulus_primitives_aura::Slot,
862+
) -> bool {
863+
ConsensusHook::can_build_upon(included_hash, slot)
864+
}
865+
}
866+
867+
impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
868+
fn slot_duration() -> sp_consensus_aura::SlotDuration {
869+
sp_consensus_aura::SlotDuration::from_millis(MILLISECS_PER_BLOCK)
870+
}
871+
fn authorities() -> Vec<AuraId> {
872+
pallet_aura::Authorities::<Runtime>::get().into_inner()
873+
}
874+
}
875+
858876
#[cfg(feature = "try-runtime")]
859877
impl frame_try_runtime::TryRuntime<Block> for Runtime {
860878
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {

0 commit comments

Comments
 (0)