Skip to content

Commit 85c4e96

Browse files
authored
Update Rust and CI Base Version (#2330)
# Goal The goal of this PR is to update Rust to 1.84.1 and use the new base image - Re-enable cargo deny (thanks to the version bump) - Update Rust to v1.84.1 - Update nightly version - Update srtool - Update to use new ci base image v1.4.0
1 parent 6a4edd5 commit 85c4e96

File tree

52 files changed

+295
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+295
-154
lines changed

.cargo/config.toml

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
# Global lint rules. This will keep rust analyser in sync with the clippy
2-
# lints so every tool has the same view.
3-
#
4-
# Rustc Lints: https://doc.rust-lang.org/rustc/lints/index.html
5-
# Clippy Lints: https://rust-lang.github.io/rust-clippy/master/index.html
6-
# Substrate flags: https://github.com/paritytech/substrate/blob/master/.cargo/config.toml
7-
#
8-
# If you want standard clippy run:
9-
# RUSTFLAGS= cargo clippy
10-
[target.'cfg(feature = "cargo-clippy")']
11-
rustflags = [
12-
# Clippy lint groups
13-
"-Aclippy::all",
14-
"-Dclippy::complexity",
15-
"-Dclippy::correctness",
16-
# Clippy individual lints
17-
"-Aclippy::if_same_then_else",
18-
"-Aclippy::zero_prefixed_literal",
19-
"-Aclippy::type_complexity",
20-
"-Aclippy::nonminimal_bool",
21-
"-Aclippy::borrowed-box",
22-
"-Aclippy::too_many_arguments",
23-
"-Aclippy::unnecessary_cast",
24-
"-Aclippy::identity_op",
25-
"-Aclippy::useless_conversion",
26-
"-Aclippy::unit_arg",
27-
"-Aclippy::option_map_unit_fn",
28-
"-Aclippy::bind_instead_of_map",
29-
"-Aclippy::erasing_op",
30-
"-Aclippy::eq_op",
31-
"-Aclippy::while_immutable_condition",
32-
"-Aclippy::needless_option_as_deref",
33-
"-Aclippy::derivable_impls",
34-
"-Aclippy::bool_assert_comparison",
35-
"-Asuspicious_double_ref_op",
36-
# Built-in lint groups
37-
"-Dnonstandard-style",
38-
"-Dunused",
39-
# Built-in individual lints
40-
# "-D<rustc_lint_name>",
41-
"-Dclippy::unwrap_used",
42-
"-Dclippy::expect_used",
43-
]
44-
1+
# Lints are moved to Cargo.toml under [lints.clippy]
452
[net]
463
retry = 5

.github/workflows/check-migrations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Check Migrations on Paseo
1313
continue-on-error: false
1414
runs-on: ubicloud-standard-8
15-
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1
15+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
1616
steps:
1717
- name: Checkout sources
1818
uses: actions/checkout@v4

.github/workflows/common/codecov/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,25 @@ runs:
99
steps:
1010
- name: Install grcov
1111
shell: bash
12-
run: cargo install --locked grcov --version 0.8.20
12+
run: cargo install --locked grcov --version 0.9.0
13+
- name: Add llvm-tools
14+
shell: bash
15+
run: rustup component add llvm-tools-preview
1316
- name: Build
1417
shell: bash # Limited to 10 threads max
1518
run: cargo build -j 10 --features frequency-lint-check
1619
env:
1720
RUSTC_BOOTSTRAP: 1
1821
CARGO_INCREMENTAL: "0"
19-
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
22+
RUSTFLAGS: "-Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
2023
RUSTDOCFLAGS: "-Cpanic=abort"
2124
- name: Test
2225
shell: bash # Limited to 10 threads max
2326
run: cargo test -j 10 --features frequency-lint-check
2427
env:
2528
RUSTC_BOOTSTRAP: 1
2629
CARGO_INCREMENTAL: "0"
27-
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
30+
RUSTFLAGS: "-Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
2831
RUSTDOCFLAGS: "-Cpanic=abort"
2932
# There are a lot of things ignored here to make it all work
3033
# See the grcov docs for more information
@@ -53,7 +56,7 @@ runs:
5356
--ignore "*cargo*" \
5457
-o ./target/debug/lcov.info
5558
- name: Upload to codecov.io
56-
uses: codecov/codecov-action@v4
59+
uses: codecov/codecov-action@v5
5760
with:
5861
token: ${{inputs.code-cov-token}}
5962
files: ./target/debug/lcov.info

.github/workflows/common/srtool/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,10 @@ runs:
198198
- id: build
199199
name: Build ${{ env.PACKAGE }} using ${{ env.SRTOOL_IMAGE }}
200200
shell: bash
201-
env:
202-
# https://github.com/paritytech/polkadot-sdk/pull/2217
203-
WASM_BUILD_STD: "0"
204201
run: |
205202
echo ::group::Srtool build of chain ${{ inputs.chain }}
206203
CMD="docker run -i --rm -e CARGO_NET_RETRY=10 -e PACKAGE=${{ env.PACKAGE }} -e RUNTIME_DIR=${{ env.RUNTIME_DIR }} -e BUILD_OPTS -e
207-
PARACHAIN_PALLET_ID -e AUTHORIZE_UPGRADE_PREFIX -e PROFILE -e WASM_BUILD_STD -v ${{ env.WORKDIR }}:/build ${{ env.SRTOOL_IMAGE
204+
PARACHAIN_PALLET_ID -e AUTHORIZE_UPGRADE_PREFIX -e PROFILE -v ${{ env.WORKDIR }}:/build ${{ env.SRTOOL_IMAGE
208205
}} build --app --json -cM"
209206
210207
echo ::debug::build::docker_run $CMD

.github/workflows/create-issue-dependabot-alert-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- .github/workflows
1111
jobs:
1212
create-issue:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
permissions:
1515
contents: write
1616
env:

.github/workflows/merge-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
publish-js-api-augment-rc:
1313
name: Merge - Publish JS API Augment Release Candidate
1414
runs-on: ubicloud-standard-4
15-
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1
15+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
1616
steps:
1717
- name: Check Out Repo
1818
uses: actions/checkout@v4
@@ -48,8 +48,8 @@ jobs:
4848

4949
calc-code-coverage:
5050
name: Merge - Calculate Code Coverage
51-
runs-on: ubicloud-standard-8
52-
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1
51+
runs-on: ubicloud-standard-30
52+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
5353
steps:
5454
- name: Check Out Repo
5555
uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ env:
2727
RELEASE_BRANCH_NAME: release-${{github.event.inputs.release-version || github.ref_name}}
2828
LATEST_FULL_RELEASE_TAG: _LATEST-FULL-RELEASE
2929
TEST_RUN: ${{startsWith(github.event.inputs.release-version || github.ref_name, 'v0.0.1')}}
30-
RUST_TOOLCHAIN: "1.76.0" # Match to /rust-toolchain.toml
3130

3231
jobs:
3332
validate-release-version:
3433
name: Validate Release Version
35-
runs-on: ubuntu-22.04
34+
runs-on: ubuntu-24.04
3635
steps:
3736
- name: Validate
3837
if: env.NEW_RELEASE_TAG_FROM_UI != ''
@@ -50,7 +49,7 @@ jobs:
5049
create-release-branch:
5150
needs: validate-release-version
5251
name: Create Release Branch
53-
runs-on: ubuntu-22.04
52+
runs-on: ubuntu-24.04
5453
steps:
5554
- name: Check Out Repo
5655
uses: actions/checkout@v4
@@ -114,7 +113,7 @@ jobs:
114113
version-code:
115114
needs: run-all-benchmarks
116115
name: Version Code
117-
runs-on: ubuntu-22.04
116+
runs-on: ubuntu-24.04
118117
steps:
119118
- name: Check Out Repo
120119
uses: actions/checkout@v4
@@ -169,7 +168,7 @@ jobs:
169168
build-profile: release
170169
release-file-name-prefix: frequency
171170
runs-on: ubicloud-standard-8
172-
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1
171+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
173172
env:
174173
SIGNING_SUBKEY_FINGERPRINT: B6327D1474C6392032870E8EFA4FD1E73A0FE707
175174
steps:
@@ -311,7 +310,7 @@ jobs:
311310
profile: ${{matrix.build-profile}}
312311
package: ${{matrix.package}}
313312
chain: ${{matrix.chain}}
314-
tag: "1.81.0"
313+
tag: "1.84.1"
315314
runtime_dir: ${{ matrix.runtime-dir }}
316315
- name: Rename WASM file
317316
run: |
@@ -338,7 +337,7 @@ jobs:
338337
needs: version-code
339338
name: Build Rust Developer Docs
340339
runs-on: ubicloud-standard-4
341-
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1
340+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
342341
steps:
343342
- name: Check Out Repo
344343
uses: actions/checkout@v4
@@ -370,8 +369,8 @@ jobs:
370369
BIN_DIR: target/release
371370
RELEASE_FILENAME_PREFIX: frequency-local
372371
ARCH: amd64
373-
runs-on: ubuntu-22.04
374-
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1
372+
runs-on: ubuntu-24.04
373+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
375374
steps:
376375
- name: Set Env Vars
377376
run: |
@@ -422,8 +421,8 @@ jobs:
422421

423422
build-js-schemas:
424423
name: Build JS Schemas
425-
runs-on: ubuntu-22.04
426-
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1
424+
runs-on: ubuntu-24.04
425+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
427426
steps:
428427
- name: Check Out Repo
429428
uses: actions/checkout@v4
@@ -455,14 +454,14 @@ jobs:
455454
strategy:
456455
fail-fast: true
457456
matrix:
458-
os: [ubuntu-22.04]
457+
os: [ubuntu-24.04]
459458
network: [mainnet]
460459
include:
461460
- network: mainnet
462461
spec: frequency
463462
build-profile: release
464463
release-file-name-prefix: frequency
465-
- os: ubuntu-22.04
464+
- os: ubuntu-24.04
466465
arch: amd64
467466
runs-on: ${{matrix.os}}
468467
steps:
@@ -510,7 +509,7 @@ jobs:
510509
compare-metadata:
511510
needs: build-binaries
512511
name: Compare Metadata
513-
runs-on: ubuntu-22.04
512+
runs-on: ubuntu-24.04
514513
env:
515514
BIN_DIR: target/release
516515
BIN_FILENAME: frequency-local.amd64
@@ -652,7 +651,7 @@ jobs:
652651
build-js-schemas,
653652
]
654653
name: Wait for All Builds to Finish
655-
runs-on: ubuntu-22.04
654+
runs-on: ubuntu-24.04
656655
outputs:
657656
runtime_filename_dev: ${{needs.build-runtimes.outputs.runtime_filename_dev}}
658657
runtime_filename_mainnet: ${{needs.build-runtimes.outputs.runtime_filename_mainnet}}
@@ -664,8 +663,8 @@ jobs:
664663
release-artifacts:
665664
needs: wait-for-all-builds
666665
name: Release Built Artifacts
667-
runs-on: ubuntu-22.04
668-
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1
666+
runs-on: ubuntu-24.04
667+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
669668
permissions:
670669
contents: write
671670
steps:
@@ -742,6 +741,9 @@ jobs:
742741
- name: Get Polkadot Version
743742
id: polkadot-version
744743
run: echo "version=$(make version-polkadot)" >> $GITHUB_OUTPUT
744+
- name: Get Rust Version
745+
id: rust-version
746+
run: echo "version=$(rustc --version | cut -f 2 -d " ")" >> $GITHUB_OUTPUT
745747
- name: Download Artifacts
746748
id: download
747749
uses: actions/download-artifact@v4
@@ -782,7 +784,7 @@ jobs:
782784
RUNTIME_INFO_MAINNET: ${{steps.get-runtimes-info.outputs.runtime_info_mainnet}}
783785
IS_FULL_RELEASE: ${{steps.is-full-release.outputs.is-full-release}}
784786
run: |
785-
./build-release-notes.sh '${{steps.polkadot-version.outputs.version}}' \
787+
./build-release-notes.sh '${{steps.polkadot-version.outputs.version}}' '${{steps.rust-version.outputs.version}}' \
786788
"${CHANGELOG}" \
787789
"${RUNTIME_INFO_MAINNET}" \
788790
"${RUNTIME_INFO_PASEO}" \
@@ -860,7 +862,7 @@ jobs:
860862
env:
861863
DOCKER_HUB_PROFILE: frequencychain
862864
IMAGE_NAME: parachain-node
863-
runs-on: ubuntu-22.04
865+
runs-on: ubuntu-24.04
864866
steps:
865867
- name: Set Env Vars
866868
run: |
@@ -951,7 +953,7 @@ jobs:
951953
release-file-name-prefix: frequency-dev
952954
env:
953955
DOCKER_HUB_PROFILE: frequencychain
954-
runs-on: ubuntu-22.04
956+
runs-on: ubuntu-24.04
955957
steps:
956958
- name: Set Env Vars
957959
run: |
@@ -1028,7 +1030,7 @@ jobs:
10281030
release-rust-developer-docs:
10291031
needs: wait-for-all-builds
10301032
name: Release Rust Developer Docs
1031-
runs-on: ubuntu-22.04
1033+
runs-on: ubuntu-24.04
10321034
permissions:
10331035
contents: read
10341036
pages: write
@@ -1045,7 +1047,7 @@ jobs:
10451047
release-js-api-augment:
10461048
needs: wait-for-all-builds
10471049
name: Release JS API Augment
1048-
runs-on: ubuntu-22.04
1050+
runs-on: ubuntu-24.04
10491051
steps:
10501052
- name: Check Out Repo
10511053
uses: actions/checkout@v4
@@ -1091,7 +1093,7 @@ jobs:
10911093
release-js-schemas:
10921094
needs: wait-for-all-builds
10931095
name: Release JS Schemas
1094-
runs-on: ubuntu-22.04
1096+
runs-on: ubuntu-24.04
10951097
steps:
10961098
- name: Check Out Repo
10971099
uses: actions/checkout@v4

0 commit comments

Comments
 (0)