Skip to content

Commit

Permalink
Merge branch 'master' into ab/collator-selection
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Jun 4, 2024
2 parents fd5309e + 7e9a1c2 commit f9a89c4
Show file tree
Hide file tree
Showing 15 changed files with 133 additions and 115 deletions.
1 change: 1 addition & 0 deletions .github/env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RUST_NIGHTLY_VERSION=2024-04-14
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-dev*'
pull_request:
branches: [master]
branches: [ master ]
workflow_dispatch:
inputs:
verbose:
Expand Down Expand Up @@ -49,9 +49,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
rust: [stable]
binary: [release]
os: [ ubuntu-22.04 ]
rust: [ stable ]
binary: [ release ]
env:
RUST_BACKTRACE: full
RUSTV: ${{ matrix.rust }}
Expand All @@ -76,8 +76,8 @@ jobs:

- name: Install protobuf
run: |
sudo apt update
sudo apt install --assume-yes protobuf-compiler
sudo apt update
sudo apt install --assume-yes protobuf-compiler
- name: Release
if: ${{ matrix.binary == 'release' }}
Expand All @@ -104,9 +104,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
rust: [stable]
binary: [release]
os: [ ubuntu-22.04 ]
rust: [ stable ]
binary: [ release ]
env:
RUST_BACKTRACE: full
RUSTV: ${{ matrix.rust }}
Expand Down Expand Up @@ -162,11 +162,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable]
rust-target: [x86_64-unknown-linux-gnu]
# check: [fmt --all -- --check, clippy -- -D warnings]
check: [fmt --all -- --check, check --features runtime-benchmarks] # skip clippy for now
os: [ ubuntu-latest ]
rust: [ nightly-2024-04-14 ]
rust-target: [ x86_64-unknown-linux-gnu ]
# check: [fmt --all -- --check, clippy -- -D warnings]
check: [ check --features runtime-benchmarks ] # skip clippy for now
env:
RUST_BACKTRACE: full
RUSTV: ${{ matrix.rust }}
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
runtime: ["shell", "integritee"]
runtime: [ "shell", "integritee" ]
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -285,12 +285,12 @@ jobs:
subwasm meta ${{ steps.srtool_build.outputs.wasm }}
subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime }}-metadata.json
# This is unsupported it wants to diff the metadata with a running chain. i.e. wss://kusama-<matrix.chain>-rpc.parity.io
# - name: Check the metadata diff
# shell: bash
# run: |
# subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} > ${{ matrix.chain }}-diff.txt
# cat ${{ matrix.chain }}-diff.txt
# This is unsupported it wants to diff the metadata with a running chain. i.e. wss://kusama-<matrix.chain>-rpc.parity.io
# - name: Check the metadata diff
# shell: bash
# run: |
# subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} > ${{ matrix.chain }}-diff.txt
# cat ${{ matrix.chain }}-diff.txt

- name: Archive Subwasm results
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
Expand Down Expand Up @@ -320,8 +320,8 @@ jobs:
strategy:
fail-fast: false
matrix:
chain: [integritee]
config: [rococo, westend, kusama, polkadot, moonbase, paseo]
chain: [ integritee ]
config: [ rococo, westend, kusama, polkadot, moonbase, paseo ]
include:
- chain: shell
config: kusama-lease2
Expand Down Expand Up @@ -368,7 +368,7 @@ jobs:
name: Draft Release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [create_artifacts, build_primary_binaries, check]
needs: [ create_artifacts, build_primary_binaries, check ]
outputs:
release_url: ${{ steps.create-release.outputs.html_url }}
asset_upload_url: ${{ steps.create-release.outputs.upload_url }}
Expand Down Expand Up @@ -415,10 +415,10 @@ jobs:
publish-runtimes:
name: Publish Runtimes
runs-on: ubuntu-latest
needs: ["release"]
needs: [ "release" ]
strategy:
matrix:
runtime: ["shell", "integritee"]
runtime: [ "shell", "integritee" ]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/clippy-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Clippy-Runtime

on:
pull_request:
branches: [ master ]
paths:
- 'polkadot-parachains/integritee-runtime/**'

# cancel previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Fetch cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0
with:
shared-key: "parachain-cache-clippy"
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path polkadot-parachains/integritee-runtime/Cargo.toml
env:
# RUSTFLAGS: "-D warnings" # FAIL-CI
SKIP_WASM_BUILD: 1
34 changes: 34 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Rustfmt (check)"

on:
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-dev*'
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
verbose:
description: "Set --verbose to get verbose build output"
required: false
default: 'true'

jobs:
rustfmt:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV

- name: Install nightly toolchain
run: rustup toolchain install "nightly-$RUST_NIGHTLY_VERSION" --profile minimal --component rustfmt

- name: Rustfmt (check)
run: cargo +nightly-$RUST_NIGHTLY_VERSION fmt --all -- --check
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions polkadot-parachains/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "integritee-collator"
description = "The Integritee parachain collator binary"
# align major.minor revision with the runtimes. bump patch revision ad lib. make this the github release tag
version = "1.9.5"
# align major.minor revision with polkadot SDK. bump patch revision ad lib. make this the github release tag
version = "1.10.0"
authors = ["Integritee AG <[email protected]>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand Down
4 changes: 2 additions & 2 deletions polkadot-parachains/common/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ where
fn contains(asset: &Asset, origin: &Location) -> bool {
if let Some(ref reserve) = ReserveProvider::reserve(asset) {
if reserve == origin {
return true;
return true
}
}
false
Expand All @@ -61,7 +61,7 @@ where
fn matches_fungible(a: &Asset) -> Option<Amount> {
if let (Fungible(ref amount), AssetId(location)) = (&a.fun, &a.id) {
if CurrencyIdConvert::convert(location.clone()).is_some() {
return CheckedConversion::checked_from(*amount);
return CheckedConversion::checked_from(*amount)
}
}
None
Expand Down
4 changes: 2 additions & 2 deletions polkadot-parachains/integritee-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "integritee-runtime"
description = "The Integritee parachain runtime"
# patch revision must match runtime spec_version
version = "1.9.51"
# align major.minor revision with polkadot SDK. patch revision must match runtime spec_version
version = "1.10.52"
authors = ["Integritee AG <[email protected]>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/integritee-runtime/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/// Usage:
/// ```Rust
/// parameter_types! {
/// pub const VotingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1 * MINUTES);
/// pub const VotingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1 * MINUTES);
/// }
#[macro_export]
macro_rules! prod_or_fast {
Expand Down
Loading

0 comments on commit f9a89c4

Please sign in to comment.