Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into muharem-waived-locations
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Jan 4, 2024
2 parents d92f627 + 4b6c871 commit 8bf3630
Show file tree
Hide file tree
Showing 58 changed files with 5,303 additions and 53 deletions.
23 changes: 20 additions & 3 deletions .github/changelog-processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,38 @@
help="Should a release be made? Prints `1` or `0`.",
action="store_true"
)
group.add_argument(
"--print-changelog-from-last-release",
dest="changelog_last_release",
help="Print the changelog from the last release.",
action="store_true"
)

args = parser.parse_args()

with open(args.changelog, "r") as changelog:
lines = changelog.readlines()

changelog_last_release = ""
found_last_version = False

# Find the latest version
for line in lines:
if not line.startswith("## ["):
changelog_last_release += line
continue
elif not found_last_version:
changelog_last_release += line
found_last_version = True
version = line.strip().removeprefix("## [").split("]")[0]
else:
break

version = line.strip().removeprefix("## [").split("]")[0]
break

if args.print_latest_version:
if args.changelog_last_release:
print(changelog_last_release, end = "")
sys.exit(0)
elif args.print_latest_version:
print(version, end = "")
sys.exit(0)
elif args.should_release:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:

- name: Fetch cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0
with:
shared-key: "fellowship-cache"

- name: Clippy
run: cargo +nightly clippy --all-targets --locked -q
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,21 @@ jobs:
CONTEXT=$(find . -name '*_srtool_output.json')
SRTOOL() { <$(<<<$CONTEXT head -n1) jq -r .$1; }
WASM() { <${JSON} jq -r ".runtimes.compressed.subwasm.$1"; }
# Copy the relevant parts of the changelog
.github/changelog-processor.py CHANGELOG.md --print-changelog-from-last-release > DRAFT
tee -a DRAFT <<-EOF
EOF
tee -a DRAFT <CHANGELOG.md
tee -a DRAFT <<-EOF
## Runtime info
# Runtime info
*These runtimes were built with **$(SRTOOL rustc)** using **[$(SRTOOL gen)](https://github.com/paritytech/srtool)***
To replicate the build, use the following command:
```sh
srtool build \
--root --profile production \
--package CRATE_NAME --runtime-dir PATH_TO_CRATE \
--build-opts="--features=on-chain-release-build"
```
EOF
for JSON in $(<<<$CONTEXT sort -sr)
Expand All @@ -127,7 +136,7 @@ jobs:
tee -a DRAFT <<-EOF
### $HEADING
## $HEADING
~~~
🏋️ Runtime Size: $(numfmt --to iec-i --format "%.2f" $(WASM size)) ($(WASM size) bytes)
🗜 Compressed: $(WASM 'compression | if .compressed then "Yes: \(1 - .size_compressed / .size_decompressed | . * 10000 | round / 100)%" else "No" end')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/review-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
app_id: ${{ secrets.REVIEW_APP_ID }}
private_key: ${{ secrets.REVIEW_APP_KEY }}
- name: "Evaluates PR reviews and assigns reviewers"
uses: paritytech/[email protected].0
uses: paritytech/[email protected].1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
team-token: ${{ steps.team_token.outputs.token }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ jobs:

- name: Fetch cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0
with:
shared-key: "fellowship-cache"

- name: Test
run: cargo test --workspace --release --locked -q --features=runtime-metrics,try-runtime
env:
RUSTFLAGS: "-C debug-assertions -D warnings"
SKIP_WASM_BUILD: 1

- name: Test all features
run: cargo test --workspace --release --locked -q --features=runtime-benchmarks,runtime-metrics,try-runtime
env:
RUSTFLAGS: "-C debug-assertions -D warnings"
SKIP_WASM_BUILD: 1
SKIP_WASM_BUILD: 1
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Make `IdentityInfo` generic in `pallet-identity` ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1661
- Whitelist `force_default_xcm_version` in XCM call filter ([polkadot-fellows/runtimes#45](https://github.com/polkadot-fellows/runtimes/pull/45))
- Set up an account ID for the local root location on Polkadot Collectives ([polkadot-fellows/runtimes#125](https://github.com/polkadot-fellows/runtimes/pull/125))
- Increase confirmation period for treasury spend tracks on Polkadot & Kusama ([polkadot-fellows/runtimes#119](https://github.com/polkadot-fellows/runtimes/pull/119))

### Added

Expand Down
Loading

0 comments on commit 8bf3630

Please sign in to comment.