91 Commits

Author SHA1 Message Date
dependabot[bot]
7ce9fb4fb1
build(deps): Bump Swatinem/rust-cache from 1.3.0 to 1.4.0 (#2613)
* build(deps): Bump Swatinem/rust-cache from 1.3.0 to 1.4.0

Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/Swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/v1/CHANGELOG.md)
- [Commits](842ef286ff...cb2cf0cc7c)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply suggestions from code review

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2022-04-17 09:58:51 +02:00
dependabot[bot]
7a1147877a
build(deps): Update prost-build requirement from 0.9 to 0.10 (#2596)
* build(deps): Update prost-build requirement from 0.9 to 0.10

Updates the requirements on [prost-build](https://github.com/tokio-rs/prost) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/prost/releases)
- [Commits](https://github.com/tokio-rs/prost/commits)

---
updated-dependencies:
- dependency-name: prost-build
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* .github/workflow: Don't run integration test in container

* .github/workflow: Don't run doc step in container

* .github/workflows: Remove component docs

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2022-04-06 15:54:42 +02:00
dependabot[bot]
0c24821a14
build(deps): Bump actions/checkout from 2.4.0 to 3 (#2581)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2022-03-21 19:07:21 +01:00
Max Inden
6b5744c33d
.github/workflows: Add cargo audit (#2430)
Run cargo audit on each push and on a daily schedule.
2022-03-18 17:49:28 +01:00
Max Inden
ca9d53886d
Revert ".github/workflow: Use ubuntu-18.04 fixing missing protoc binary " (#2554)
* Revert ".github/workflow: Use ubuntu-18.04 fixing missing protoc binary  (#2368)"

* .github: Use llvm installation script
2022-03-17 17:27:17 +01:00
dependabot[bot]
a179dbb449
build(deps): Bump actions/checkout from 2.4.0 to 3 (#2544)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 11:26:08 +01:00
Max Inden
861e15dabb
src/tutorials: Add hole punching tutorial (#2460) 2022-02-10 16:36:20 +01:00
Piotr Galar
e19391e966
.github/workflows/: Fix test-wasm and pin third-party action versions (#2424)
Co-authored-by: Max Inden <mail@max-inden.de>
2022-01-10 16:00:00 +01:00
Max Inden
e021933a06
.github/workflow: Use ubuntu-18.04 fixing missing protoc binary (#2368)
`prost-build` is failing due to a missing `protoc` binary. Neither the OS
supplies one, nor can the bundled binaries be used. This commit downgrades the
OS used. The older OS is compatible with the bundled `protoc` binaries.
2021-12-06 15:54:54 +01:00
dependabot[bot]
144dc12fb6
build(deps): Bump actions/checkout from 2.3.5 to 2.4.0 (#2326)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2021-11-15 12:13:23 +01:00
Max Inden
ff5d455ccf
*: Enable libp2p to run via wasm32-unknown-unknown in the browser (#2320)
Changes needed to get libp2p to run via `wasm32-unknown-unknown` in the browser
(both main thread and inside web workers).

Replaces wasm-timer with futures-timer and instant.

Co-authored-by: Oliver Wangler <oliver@wngr.de>
2021-10-30 12:41:30 +02:00
dependabot[bot]
ca1b7cf043
build(deps): Bump actions/checkout from 2.3.4 to 2.3.5 (#2300)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-18 18:12:30 +02:00
Thomas Eizinger
e9ac6d2a6a
.github/workflows/ci: Improve cache effectiveness (#2260)
To have caches operate at its maximum usefulness, we need to have a
1-to-1 mapping between build-comamnd and cache key. Otherwise rustc
has to rebuild certain artifacts because they were not in the cache.

By using matrices, we make github parallelise some of our jobs. This
has a double positive impact on CI runtime. Not only are our caches
more effective now, several jobs are now run in parallel.

Co-authored-by: Max Inden <mail@max-inden.de>
2021-10-05 09:46:08 +02:00
Denis Pisarev
6f7a19e753
.github/workflows/ci.yml: Use swatinem/rust-cache (#2228) 2021-09-25 15:22:33 +02:00
Max Inden
2a6a1cc0d3
.github/workflows/ci.yml: Use clang 11 (#2233) 2021-09-14 12:21:11 +02:00
Max Inden
f701b24ec0
*: Format with rustfmt (#2188)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-08-11 13:12:12 +02:00
dependabot[bot]
ae9a14eaa0
build(deps): Bump styfle/cancel-workflow-action from 0.9.0 to 0.9.1 (#2167)
Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](https://github.com/styfle/cancel-workflow-action/compare/0.9.0...0.9.1)

---
updated-dependencies:
- dependency-name: styfle/cancel-workflow-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2021-08-02 20:53:28 +02:00
Thomas Eizinger
7877929af2
.github/: Enforce no clippy warnings (#2148)
* Fix remaining clippy warnings.

Co-authored-by: Max Inden <mail@max-inden.de>
2021-07-26 11:22:46 +02:00
dependabot[bot]
339a9971ab
build(deps): Bump actions/cache from 2.1.5 to 2.1.6 (#2084)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-28 11:43:43 +02:00
dependabot[bot]
1fdac073fc
build(deps): Bump actions-rs/toolchain from 1 to 1.0.7 (#2069)
Bumps [actions-rs/toolchain](https://github.com/actions-rs/toolchain) from 1 to 1.0.7.
- [Release notes](https://github.com/actions-rs/toolchain/releases)
- [Changelog](https://github.com/actions-rs/toolchain/blob/master/CHANGELOG.md)
- [Commits](https://github.com/actions-rs/toolchain/compare/v1...v1.0.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 14:05:10 +02:00
dependabot[bot]
10fcc1c485
build(deps): Bump actions-rs/cargo from 1 to 1.0.3 (#2070)
Bumps [actions-rs/cargo](https://github.com/actions-rs/cargo) from 1 to 1.0.3.
- [Release notes](https://github.com/actions-rs/cargo/releases)
- [Changelog](https://github.com/actions-rs/cargo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/actions-rs/cargo/compare/v1...v1.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 12:04:46 +02:00
dependabot[bot]
82c8b1a4b3
build(deps): Bump actions/checkout from 2 to 2.3.4 (#2071)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 11:12:41 +02:00
dependabot[bot]
807ce10656
build(deps): bump actions/cache from v2.1.4 to v2.1.5 (#2050)
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.4...1a9e2138d905efd099035b49d8b7a3888c653ca8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-13 14:32:43 +02:00
Max Inden
8ccb96a9f3
*: Drop generic wasm32-unknown-unknown support (#2038)
With `rand` `v0.8.0` platform support changed [1] due to its upgrade to
`getrandom` `v0.2`. With `getrandom` `v0.2` `wasm32-unknown-unknown` is no
longer supported out of the box:

> This crate fully supports the wasm32-wasi and wasm32-unknown-emscripten
> targets. However, the wasm32-unknown-unknown target is not automatically
> supported since, from the target name alone, we cannot deduce which JavaScript
> interface is in use (or if JavaScript is available at all).
>
> Instead, if the "js" Cargo feature is enabled, this crate will assume that you
> are building for an environment containing JavaScript, and will call the
> appropriate methods. Both web browser (main window and Web Workers) and
> Node.js environments are supported, invoking the methods described above using
> the wasm-bindgen toolchain.
>
> This feature has no effect on targets other than wasm32-unknown-unknown.

This commit drops support for wasm32-unknown-unknown in favor of the two more
specific targets wasm32-wasi and wasm32-unknown-emscripten.

Note on `resolver = "2"`: The new resolver is required to prevent features
being mixed, more specifically to prevent libp2p-noise to build with the
`ring-resolver` feature. See [3] for details.

---

[1] https://github.com/rust-random/rand/blob/master/CHANGELOG.md#platform-support
[2] https://docs.rs/getrandom/0.2.2/getrandom/#webassembly-support
[3] https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2
2021-04-12 21:41:48 +02:00
dependabot[bot]
b1b6f2bafe
build(deps): bump styfle/cancel-workflow-action from 0.8.0 to 0.9.0 (#2045)
Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](https://github.com/styfle/cancel-workflow-action/compare/0.8.0...89f242ee29e10c53a841bfe71cc0ce7b2f065abc)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 10:16:14 +02:00
Max Inden
de261d5280
.github: Only test benchmarks, don't run them (#2042)
Instead of fully executing benchmarks, i.e. running multiple iterations,
each measured and recorded, only test that they compile and run them
with a single execution to make sure they work. The benefit is a reduced
CI runtime.

Flag documentation:

> To test that the benchmarks run successfully without performing the
measurement or analysis (eg. in a CI setting), use cargo test --benches.

https://bheisler.github.io/criterion.rs/book/user_guide/command_line_options.html

The above assumes that (a) the benchmark results from CI are likely
noisy and thus (b) no one actually looks at the benchmark results.
2021-04-10 22:25:11 +02:00
Roman Borschel
6499e924a3
Make clippy "happy". (#1950)
* Make clippy "happy".

Address all clippy complaints that are not purely stylistic (or even
have corner cases with false positives). Ignore all "style" and "pedantic" lints.

* Fix tests.

* Undo unnecessary API change.
2021-02-15 11:59:51 +01:00
dependabot[bot]
2816023414
Bump styfle/cancel-workflow-action from 0.7.0 to 0.8.0 (#1955)
Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](https://github.com/styfle/cancel-workflow-action/compare/0.7.0...3d86a7cc43670094ac248017207be0295edbc31d)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-15 11:03:23 +01:00
dependabot[bot]
ba77c49de7
Bump actions/cache from v2 to v2.1.4 (#1949)
Bumps [actions/cache](https://github.com/actions/cache) from v2 to v2.1.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...26968a09c0ea4f3e233fdddbafd1166051a095f6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 10:05:20 +01:00
dependabot[bot]
2c4de90356
Bump styfle/cancel-workflow-action from 0.6.0 to 0.7.0 (#1922)
Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](https://github.com/styfle/cancel-workflow-action/compare/0.6.0...d7e57e26a6f753933f8ef746a37097a61375236b)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2021-01-14 20:16:14 +01:00
Max Inden
e665a818d7
core/benches: Add rudimentary benchmark for PeerId::from_bytes and clone (#1875)
* core: Add rudimentary benchmark for PeerId::from_bytes and clone

* .github/workflow: Include benchmarks

To ensure changes through pull requests won't make benchmarks fail to
compile or run, run them as part of CI.
2020-12-07 18:06:41 +01:00
Max Inden
afc5d0ef82
.github/workflow: Don't require nightly for doc link check (#1866)
The `broken_intra_doc_links` lint stabilized with Rust `v1.48`, thus the
special usage of `nightly` is not needed anymore in the pipeline step.
2020-11-30 11:11:20 +01:00
Max Inden
e3af8b7d03
*: Apply clippy suggestions and enable clippy on CI (#1850)
* *: Apply clippy suggestions

* .github: Add clippy check

* protocols/kad/record: Implement custom PartialEq for ProviderRecord
2020-11-24 15:59:22 +01:00
dependabot[bot]
5e2ad029ca
Bump styfle/cancel-workflow-action from 0.4.1 to 0.6.0 (#1846)
Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.4.1 to 0.6.0.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](https://github.com/styfle/cancel-workflow-action/compare/0.4.1...ce177499ccf9fd2aded3b0426c97e5434c2e8a73)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-17 15:42:43 +01:00
Denis Pisarev
6477d04e29
Update CI (#1837)
* fix (CI): upda dependabotchecks and actions versions

* fix (CI): readability

* change (CI): interrupt prev run on the subsequent commit, simplify caching

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
2020-11-17 15:20:38 +01:00
dependabot[bot]
3c72b07e55
Update atomic requirement from 0.4.6 to 0.5.0 (#1766)
* Update atomic requirement from 0.4.6 to 0.5.0

Updates the requirements on [atomic](https://github.com/Amanieu/atomic-rs) to permit the latest version.
- [Release notes](https://github.com/Amanieu/atomic-rs/releases)
- [Commits](https://github.com/Amanieu/atomic-rs/compare/v0.4.6...v0.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

* .github/workflows: Update Rust nightly

* misc/multistream-select: Don't mention private item in public doc

* .github/workflows: Update renamed doc flag

* core/src/connection/pool: Don't mention private item in public doc

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-17 10:41:23 +02:00
Pierre Krieger
e0cf026bbb
Try revert to nightly-2020-05-20 (#1590) 2020-05-25 13:28:21 +02:00
Pierre Krieger
69fd8ac195
Update CI to clang-10 (#1565) 2020-05-06 13:50:18 +02:00
Pierre Krieger
42290d94f2
Finish the migration to GitHub Actions (#1500) 2020-03-23 12:04:31 +01:00
Pierre Krieger
627e93ba17
Propagate rustdoc links check to GH actions (#1446)
* Propagate rustdoc links check to GH actions

* Fix WASM test

* Try fix WASM test again

* Try run tests on a real machine
2020-02-11 16:28:29 +01:00
Pierre Krieger
cbb3315822
Try to use GitHub actions (#1430) 2020-02-11 15:09:45 +01:00