NAT hole punch discv5.2 #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: pull_request | |
jobs: | |
cargo-fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get latest version of stable rust | |
run: rustup update stable | |
- name: Check formatting with cargofmt | |
run: cargo fmt --all -- --check --config imports_granularity=Crate | |
clippy: | |
runs-on: ubuntu-latest | |
needs: cargo-fmt | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get latest version of stable rust | |
run: rustup update stable | |
- name: Install protobuf compiler for the libp2p-core dependency | |
uses: arduino/setup-protoc@v1 | |
- name: Lint code for quality and style with Clippy | |
run: cargo clippy --workspace --tests --all-features -- -D warnings -A clippy::assertions_on_constants | |
release-tests-ubuntu: | |
runs-on: ubuntu-latest | |
needs: cargo-fmt | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get latest version of stable rust | |
run: rustup update stable | |
- name: Run tests in release | |
run: cargo test --all --release | |
test-all-features: | |
runs-on: ubuntu-latest | |
container: | |
image: rust | |
needs: cargo-fmt | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get latest version of stable rust | |
run: rustup update stable | |
- name: Install protobuf compiler for the libp2p-core dependency | |
uses: arduino/setup-protoc@v1 | |
- name: Run tests in release | |
run: cargo test --all --release --all-features -- --skip ipv6 # ipv6 tests don't run in github ci https://github.com/actions/runner-images/issues/668 | |
check-rustdoc-links: | |
name: Check rustdoc intra-doc links | |
runs-on: ubuntu-latest | |
container: | |
image: rust | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get latest version of stable rust | |
run: rustup update stable | |
- name: Check rustdoc links | |
run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --verbose --workspace --no-deps --document-private-items | |
cargo-udeps: | |
runs-on: ubuntu-latest | |
needs: cargo-fmt | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get latest version of nightly Rust | |
run: rustup update nightly | |
- name: Install cargo-udeps | |
run: cargo install cargo-udeps --locked | |
- name: Run cargo udeps to identify unused crates in the dependency graph | |
run: cargo +nightly udeps --tests --all-targets --release |