Skip to content

Commit 396dded

Browse files
authored
Merge branch 'master' into ankan/delegate-stake-remote-tests
2 parents 3681c36 + de41ae8 commit 396dded

File tree

766 files changed

+17892
-12257
lines changed

Some content is hidden

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

766 files changed

+17892
-12257
lines changed

.config/taplo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,10 @@ keys = ["build"]
3333

3434
[rule.formatting]
3535
reorder_arrays = false
36+
37+
[[rule]]
38+
include = ["Cargo.toml"]
39+
keys = ["workspace.dependencies"]
40+
41+
[rule.formatting]
42+
reorder_keys = true

.github/scripts/check-workspace.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,12 @@ def check_deps(deps):
135135
if dep_name in all_crates:
136136
links.append((name, dep_name))
137137

138-
if not 'path' in deps[dep]:
139-
broken.append((name, dep_name, "crate must be linked via `path`"))
138+
if name == 'polkadot-sdk':
139+
if not 'path' in deps[dep]:
140+
broken.append((name, dep_name, "crate must use path"))
141+
return
142+
elif not 'workspace' in deps[dep] or not deps[dep]['workspace']:
143+
broken.append((name, dep_name, "crate must use workspace inheritance"))
140144
return
141145

142146
def check_crate(deps):
@@ -154,8 +158,6 @@ def check_crate(deps):
154158

155159
check_crate(manifest)
156160

157-
158-
159161
links.sort()
160162
broken.sort()
161163

.github/scripts/deny-git-deps.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
root = sys.argv[1] if len(sys.argv) > 1 else os.getcwd()
2121
workspace = Workspace.from_path(root)
22+
errors = []
2223

2324
def check_dep(dep, used_by):
2425
if dep.location != DependencyLocation.GIT:
@@ -27,14 +28,23 @@ def check_dep(dep, used_by):
2728
if used_by in KNOWN_BAD_GIT_DEPS.get(dep.name, []):
2829
print(f'🤨 Ignoring git dependency {dep.name} in {used_by}')
2930
else:
30-
print(f'🚫 Found git dependency {dep.name} in {used_by}')
31-
sys.exit(1)
31+
errors.append(f'🚫 Found git dependency {dep.name} in {used_by}')
3232

3333
# Check the workspace dependencies that can be inherited:
3434
for dep in workspace.dependencies:
3535
check_dep(dep, "workspace")
3636

37+
if workspace.crates.find_by_name(dep.name):
38+
if dep.location != DependencyLocation.PATH:
39+
errors.append(f'🚫 Workspace must use path to link local dependency {dep.name}')
40+
3741
# And the dependencies of each crate:
3842
for crate in workspace.crates:
3943
for dep in crate.dependencies:
4044
check_dep(dep, crate.name)
45+
46+
if errors:
47+
print('❌ Found errors:')
48+
for error in errors:
49+
print(error)
50+
sys.exit(1)

.github/workflows/check-semver.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
types: [opened, synchronize, reopened, ready_for_review]
66
paths:
77
- prdoc/*.prdoc
8+
env:
9+
TOOLCHAIN: nightly-2024-03-01
810

911
jobs:
1012
check-semver:
@@ -19,14 +21,14 @@ jobs:
1921
with:
2022
cache-on-failure: true
2123

24+
- name: install parity-publish
25+
run: cargo install [email protected]
26+
2227
- name: Rust compilation prerequisites
2328
run: |
24-
rustup default nightly-2024-03-01
25-
rustup target add wasm32-unknown-unknown --toolchain nightly-2024-03-01
26-
rustup component add rust-src --toolchain nightly-2024-03-01
27-
28-
- name: install parity-publish
29-
run: cargo install [email protected]
29+
rustup default $TOOLCHAIN
30+
rustup target add wasm32-unknown-unknown --toolchain $TOOLCHAIN
31+
rustup component add rust-src --toolchain $TOOLCHAIN
3032
3133
- name: extra git setup
3234
run: |
@@ -39,7 +41,7 @@ jobs:
3941
export CARGO_TARGET_DIR=target
4042
export RUSTFLAGS='-A warnings -A missing_docs'
4143
export SKIP_WASM_BUILD=1
42-
if ! parity-publish --color always prdoc --since old --validate prdoc/pr_$PR.prdoc --toolchain nightly-2024-03-01 -v; then
44+
if ! parity-publish --color always prdoc --since old --validate prdoc/pr_$PR.prdoc -v --toolchain $TOOLCHAIN; then
4345
cat <<EOF
4446
👋 Hello developer! The SemVer information that you declared in the prdoc file did not match what the CI detected.
4547

.github/workflows/checks-quick.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,14 @@ jobs:
5555
image: ${{ needs.set-image.outputs.IMAGE }}
5656
steps:
5757
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
58+
- name: fetch deps
59+
run: |
60+
# Pull all dependencies eagerly:
61+
time cargo metadata --format-version=1 --locked > /dev/null
5862
- name: run zepter
59-
run: zepter run check
63+
run: |
64+
zepter --version
65+
time zepter run check
6066
test-rust-features:
6167
runs-on: ubuntu-latest
6268
timeout-minutes: 10

.github/workflows/publish-check-crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
cache-on-failure: true
2121

2222
- name: install parity-publish
23-
run: cargo install parity-publish@0.5.1
23+
run: cargo install parity-publish@0.6.0
2424

2525
- name: parity-publish check
2626
run: parity-publish --color always check --allow-unpublished

.github/workflows/publish-claim-crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
cache-on-failure: true
1919

2020
- name: install parity-publish
21-
run: cargo install parity-publish@0.5.1
21+
run: cargo install parity-publish@0.6.0
2222

2323
- name: parity-publish claim
2424
env:

0 commit comments

Comments
 (0)