Skip to content

Commit

Permalink
Merge branch 'master' into quic_quinn
Browse files Browse the repository at this point in the history
  • Loading branch information
kpp committed Jul 4, 2023
2 parents 29c575e + f0fd535 commit f019c7a
Show file tree
Hide file tree
Showing 142 changed files with 5,205 additions and 2,213 deletions.
6 changes: 4 additions & 2 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ defaults:
method: squash
commit_message_template: |
{{ title }}
{{ body | get_section("## Description", "") }}
Pull-Request: #{{ number }}.
{{ body | get_section("## Attributions", "") }}
pull_request_rules:
- name: Ask to resolve conflict
conditions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache-factory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
shared-key: stable-cache

Expand Down
53 changes: 42 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
shared-key: stable-cache
save-if: false
Expand Down Expand Up @@ -76,12 +76,41 @@ jobs:
run: |
PACKAGE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .version')
SPECIFIED_VERSION=$(tomlq "workspace.dependencies.$CRATE.version" --file ./Cargo.toml)
echo "Package version: $PACKAGE_VERSION";
echo "Specified version: $SPECIFIED_VERSION";
test "$PACKAGE_VERSION" = "$SPECIFIED_VERSION"
wasm_tests:
name: Run all WASM tests
runs-on: ubuntu-latest
env:
CHROMEDRIVER_VERSION: '114.0.5735.90'
steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-unknown-unknown

- uses: taiki-e/cache-cargo-install-action@v1
with:
tool: wasm-pack@0.12.0

- name: Install Google Chrome
run: |
curl -o /tmp/google-chrome-stable_amd64.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROMEDRIVER_VERSION}-1_amd64.deb
sudo dpkg -i /tmp/google-chrome-stable_amd64.deb
- name: Install chromedriver
uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}

- name: Run all tests
run: ./wasm-tests/run-all.sh

cross:
name: Compile on ${{ matrix.target }}
strategy:
Expand All @@ -107,7 +136,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 #v1.3.0

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
key: ${{ matrix.target }}
save-if: ${{ github.ref == 'refs/heads/master' }}
Expand All @@ -132,7 +161,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 #v1.3.0

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand All @@ -153,7 +182,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 #v1.3.0

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
key: ${{ matrix.features }}
save-if: ${{ github.ref == 'refs/heads/master' }}
Expand All @@ -170,7 +199,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 #v1.3.0

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand All @@ -196,7 +225,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 #v1.3.0

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand All @@ -213,7 +242,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 #v1.3.0

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand All @@ -229,7 +258,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 #v1.3.0

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
with:
shared-key: stable-cache
save-if: false
Expand Down Expand Up @@ -284,6 +313,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable

- id: cargo-metadata
run: |
WORKSPACE_MEMBERS=$(cargo metadata --format-version=1 --no-deps | jq -c '.packages | map(select(.publish == null) | .name)')
Expand All @@ -295,7 +326,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1

- run: cargo install --version 0.10.0 pb-rs --locked

Expand All @@ -321,5 +352,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0
- uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1
- run: cargo metadata --locked --format-version=1 > /dev/null
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
echo "<meta http-equiv=\"refresh\" content=\"0; url=libp2p\">" > target/doc/index.html
cp -r target/doc/* ./host-docs
- name: Upload documentation
uses: actions/upload-pages-artifact@v1.0.8
uses: actions/upload-pages-artifact@v1.0.9
with:
path: "host-docs/"

Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ jobs:
run-multidim-interop:
name: Run multidimensional interoperability tests
runs-on: ${{ fromJSON(github.repository == 'libp2p/rust-libp2p' && '["self-hosted", "linux", "x64", "xlarge"]' || '"ubuntu-latest"') }}
strategy:
matrix:
flavour: [chromium, native]
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Build image
run: docker buildx build --load -t rust-libp2p-head . -f interop-tests/Dockerfile
- uses: libp2p/test-plans/.github/actions/run-interop-ping-test@master
- name: Build ${{ matrix.flavour }} image
run: docker buildx build --load -t ${{ matrix.flavour }}-rust-libp2p-head . -f interop-tests/Dockerfile.${{ matrix.flavour }}
- name: Run ${{ matrix.flavour }} tests
uses: libp2p/test-plans/.github/actions/run-interop-ping-test@master
with:
test-filter: rust-libp2p-head
extra-versions: ${{ github.workspace }}/interop-tests/ping-version.json
test-filter: ${{ matrix.flavour }}-rust-libp2p-head
extra-versions: ${{ github.workspace }}/interop-tests/${{ matrix.flavour }}-ping-version.json
s3-cache-bucket: libp2p-by-tf-aws-bootstrap
s3-access-key-id: ${{ vars.TEST_PLANS_BUILD_CACHE_KEY_ID }}
s3-secret-access-key: ${{ secrets.TEST_PLANS_BUILD_CACHE_KEY }}
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributing Guidelines

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-libp2p-blue.svg?style=flat-square)](https://libp2p.io/)

Welcome to the rust-libp2p contribution guide! We appreciate your interest in improving our library.

## Looking for ways to contribute?

There are several ways you can contribute to rust-libp2p:
- Start contributing immediately via the opened [help wanted](https://github.com/libp2p/rust-libp2p/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) or [difficulty:easy](https://github.com/libp2p/rust-libp2p/issues?q=is%3Aissue+is%3Aopen+label%3Adifficulty%3Aeasy) issues on GitHub.
These issues are suitable for newcomers and provide an excellent starting point.
- Reporting issues, bugs, mistakes, or inconsistencies.
As many open source projects, we are short-staffed, we thus kindly ask you to be open to contribute a fix for discovered issues.

### We squash-merge pull Requests

We always squash merge submitted pull requests.
This means that we discourage force pushes, in order to make the diff between pushes easier for us to review.
Squash merging allows us to maintain a clean and organized commit history.

The PR title, which will become the commit message after the squashing process, should follow [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/).

### Write changelog entries for user-facing changes

When making user-facing changes, it is important to include corresponding entries in the changelog, providing a comprehensive summary for the users.
For detailed instructions on how to write changelog entries, please refer to the documentation in [`docs/release.md`](https://github.com/libp2p/rust-libp2p/blob/master/docs/release.md).


### Merging of PRs is automated

To streamline our workflow, we utilize Mergify and the "send-it" label.
Mergify automates merging actions and helps us manage pull requests more efficiently.
The "send-it" label indicates that a pull request is ready to be merged.
Please refrain from making further commits after the "send-it" label has been applied otherwise your PR will be dequeued from merging automatically.

### Treat CI as a self-service platform

We have a lot of automated CI checks for common errors.
Please treat our CI as a self-service platform and try to fix any issues before requesting a review.

0 comments on commit f019c7a

Please sign in to comment.