Skip to content

Commit 09143b5

Browse files
committed
Merge branch 'master' of github.com:libp2p/rust-libp2p into gossipsub-backpressure-cont
2 parents da9008b + b7914e4 commit 09143b5

File tree

85 files changed

+1398
-1064
lines changed

Some content is hidden

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

85 files changed

+1398
-1064
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ updates:
1717
patterns:
1818
- "opentelemetry*"
1919
- "tracing-opentelemetry"
20+
axum:
21+
patterns:
22+
- "axum"
23+
- "tower"
24+
- "tower-http"
2025
- package-ecosystem: "github-actions"
2126
directory: "/"
2227
schedule:

.github/workflows/ci.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,32 @@ jobs:
6161
with:
6262
tool: tomlq
6363

64+
- name: Extract version from manifest
65+
run: |
66+
CRATE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .version')
67+
68+
echo "CRATE_VERSION=$CRATE_VERSION" >> $GITHUB_ENV
69+
6470
- name: Enforce version in `workspace.dependencies` matches latest version
6571
if: env.CRATE != 'libp2p'
6672
run: |
67-
PACKAGE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .version')
6873
SPECIFIED_VERSION=$(tomlq "workspace.dependencies.$CRATE.version" --file ./Cargo.toml)
6974
70-
echo "Package version: $PACKAGE_VERSION";
75+
echo "Package version: $CRATE_VERSION";
7176
echo "Specified version: $SPECIFIED_VERSION";
7277
73-
test "$PACKAGE_VERSION" = "$SPECIFIED_VERSION" || test "=$PACKAGE_VERSION" = "$SPECIFIED_VERSION"
78+
test "$CRATE_VERSION" = "$SPECIFIED_VERSION" || test "=$CRATE_VERSION" = "$SPECIFIED_VERSION"
79+
80+
- name: Enforce version in CHANGELOG.md matches version in manifest
81+
run: |
82+
MANIFEST_PATH=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .manifest_path')
83+
DIR_TO_CRATE=$(dirname "$MANIFEST_PATH")
84+
VERSION_IN_CHANGELOG=$(awk -F' ' '/^## [0-9]+\.[0-9]+\.[0-9]+/{print $2; exit}' "$DIR_TO_CRATE/CHANGELOG.md")
85+
86+
echo "Package version: $CRATE_VERSION";
87+
echo "Changelog version: $VERSION_IN_CHANGELOG";
88+
89+
test "$CRATE_VERSION" = "$VERSION_IN_CHANGELOG"
7490
7591
- name: Ensure manifest and CHANGELOG are properly updated
7692
if: >
@@ -291,6 +307,15 @@ jobs:
291307
292308
semver:
293309
runs-on: ubuntu-latest
310+
env:
311+
# Unset the global `RUSTFLAGS` env to allow warnings.
312+
# cargo-semver-checks intentionally re-locks dependency versions
313+
# before checking, and we shouldn't fail here if a dep has a warning.
314+
#
315+
# More context:
316+
# https://github.com/libp2p/rust-libp2p/pull/4932#issuecomment-1829014527
317+
# https://github.com/obi1kenobi/cargo-semver-checks/issues/589
318+
RUSTFLAGS: ''
294319
steps:
295320
- uses: actions/checkout@v4
296321
- run: wget -q -O- https://github.com/obi1kenobi/cargo-semver-checks/releases/download/v0.25.0/cargo-semver-checks-x86_64-unknown-linux-gnu.tar.gz | tar -xz -C ~/.cargo/bin
@@ -325,8 +350,6 @@ jobs:
325350
ALL_FEATURES=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "libp2p") | .features | keys | map(select(. != "full")) | sort | join(" ")')
326351
FULL_FEATURE=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "libp2p") | .features["full"] | sort | join(" ")')
327352
328-
test "$ALL_FEATURES = $FULL_FEATURE"
329-
330353
echo "$ALL_FEATURES";
331354
echo "$FULL_FEATURE";
332355

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ jobs:
4242
steps:
4343
- name: Deploy to GitHub Pages
4444
id: deployment
45-
uses: actions/deploy-pages@v2
45+
uses: actions/deploy-pages@v3
4646

0 commit comments

Comments
 (0)