forked from tokio-rs/tokio
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'tokio-util-0.7.13' into tokio-util-0.7.13-framed-read-cont…
…inue-on-error
- Loading branch information
Showing
405 changed files
with
9,751 additions
and
3,801 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Buildomat illumos CI | ||
|
||
This directory contains CI configurations for the [illumos] operating system. | ||
Tokio's illumos CI jobs are run using [Buildomat], a CI system developed by | ||
Oxide Computer, which supports illumos. See [the Buildomat README] for more | ||
details. | ||
|
||
## illumos-Specific CI Failures | ||
|
||
If your pull request's CI build fails on illumos, and you aren't able to easily | ||
reproduce the failure on other operating systems, don't worry! The | ||
[tokio-rs/illumos] team is responsible for maintaining Tokio's illumos support, | ||
and can be called on to assist contributors with illumos-specific issues. Please | ||
feel free to tag @tokio-rs/illumos to ask for help resolving build failures on | ||
illumos | ||
|
||
[illumos]: https://www.illumos.org/ | ||
[Buildomat]: https://github.com/oxidecomputer/buildomat | ||
[the Buildomat README]: https://github.com/oxidecomputer/buildomat | ||
[tokio-rs/illumos]: https://github.com/orgs/tokio-rs/teams/illumos |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Repository-level Buildomat configuration. | ||
# See: https://github.com/oxidecomputer/buildomat#per-repository-configuration | ||
|
||
# Enable buildomat. This one should be self-explanatory. | ||
enable = true | ||
# Allow CI runs for PRs from users outside the `tokio-rs` organization. Our | ||
# buildomat jobs don't touch any secrets/keys, so this should be fine. | ||
org_only = false |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,12 @@ concurrency: | |
env: | ||
RUSTFLAGS: -Dwarnings | ||
RUST_BACKTRACE: 1 | ||
RUSTUP_WINDOWS_PATH_ADD_BIN: 1 | ||
# Change to specific Rust release to pin | ||
rust_stable: stable | ||
rust_nightly: nightly-2023-10-21 | ||
rust_nightly: nightly-2024-05-05 | ||
# Pin a specific miri version | ||
rust_miri_nightly: nightly-2024-10-21 | ||
rust_clippy: '1.77' | ||
# When updating this, also update: | ||
# - README.md | ||
|
@@ -25,7 +28,7 @@ env: | |
# - tokio-util/Cargo.toml | ||
# - tokio-test/Cargo.toml | ||
# - tokio-stream/Cargo.toml | ||
rust_min: '1.63' | ||
rust_min: '1.70' | ||
|
||
defaults: | ||
run: | ||
|
@@ -44,7 +47,6 @@ jobs: | |
- test-workspace-all-features | ||
- test-integration-tests-per-feature | ||
- test-parking_lot | ||
- test-tracing-instrumentation | ||
- valgrind | ||
- test-unstable | ||
- miri | ||
|
@@ -64,6 +66,7 @@ jobs: | |
- loom-compile | ||
- check-readme | ||
- test-hyper | ||
- test-quinn | ||
- x86_64-fortanix-unknown-sgx | ||
- check-redox | ||
- wasm32-unknown-unknown | ||
|
@@ -176,7 +179,7 @@ jobs: | |
run: | | ||
set -euxo pipefail | ||
RUSTFLAGS="$RUSTFLAGS -C panic=abort -Zpanic-abort-tests" cargo nextest run --workspace --exclude tokio-macros --exclude tests-build --all-features --tests | ||
test-integration-tests-per-feature: | ||
needs: basics | ||
name: Run integration tests for each feature | ||
|
@@ -242,34 +245,6 @@ jobs: | |
- name: Check tests with all features enabled | ||
run: cargo check --workspace --all-features --tests | ||
|
||
test-tracing-instrumentation: | ||
# These tests use the as-yet unpublished `tracing-mock` crate to test the | ||
# tracing instrumentation present in Tokio. As such they are placed in | ||
# their own test crate outside of the workspace. | ||
needs: basics | ||
name: test tokio instrumentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust ${{ env.rust_stable }} | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_stable }} | ||
- name: Install cargo-nextest | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-nextest | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: test tracing-instrumentation | ||
run: | | ||
set -euxo pipefail | ||
cargo nextest run | ||
working-directory: tokio/tests/tracing-instrumentation | ||
env: | ||
RUSTFLAGS: --cfg tokio_unstable -Dwarnings | ||
|
||
valgrind: | ||
name: valgrind | ||
needs: basics | ||
|
@@ -279,7 +254,7 @@ jobs: | |
- name: Install Rust ${{ env.rust_stable }} | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_stable }} | ||
toolchain: 1.82 | ||
|
||
- name: Install Valgrind | ||
uses: taiki-e/install-action@valgrind | ||
|
@@ -411,17 +386,19 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust ${{ env.rust_nightly }} | ||
- name: Install Rust ${{ env.rust_miri_nightly }} | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_nightly }} | ||
toolchain: ${{ env.rust_miri_nightly }} | ||
components: miri | ||
- name: Install cargo-nextest | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: miri | ||
# Many of tests in tokio/tests and doctests use #[tokio::test] or | ||
# #[tokio::main] that calls epoll_create1 that Miri does not support. | ||
run: | | ||
cargo miri test --features full --lib --no-fail-fast | ||
cargo miri nextest run --features full --lib --tests --no-fail-fast | ||
working-directory: tokio | ||
env: | ||
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-retag-fields | ||
|
@@ -762,7 +739,15 @@ jobs: | |
|
||
docs: | ||
name: docs | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.run.os }} | ||
strategy: | ||
matrix: | ||
run: | ||
- os: windows-latest | ||
- os: ubuntu-latest | ||
RUSTFLAGS: --cfg tokio_taskdump | ||
RUSTDOCFLAGS: --cfg tokio_taskdump | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust ${{ env.rust_nightly }} | ||
|
@@ -774,8 +759,8 @@ jobs: | |
run: | | ||
cargo doc --lib --no-deps --all-features --document-private-items | ||
env: | ||
RUSTFLAGS: --cfg docsrs --cfg tokio_unstable --cfg tokio_taskdump | ||
RUSTDOCFLAGS: --cfg docsrs --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings | ||
RUSTFLAGS: --cfg docsrs --cfg tokio_unstable ${{ matrix.run.RUSTFLAGS }} | ||
RUSTDOCFLAGS: --cfg docsrs --cfg tokio_unstable -Dwarnings ${{ matrix.run.RUSTDOCFLAGS }} | ||
|
||
loom-compile: | ||
name: build loom tests | ||
|
@@ -858,6 +843,56 @@ jobs: | |
run: cargo test --features full | ||
working-directory: hyper | ||
|
||
test-quinn: | ||
name: Test Quinn | ||
needs: basics | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- windows-latest | ||
- ubuntu-latest | ||
- macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust ${{ env.rust_stable }} | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_stable }} | ||
|
||
- name: Clone Quinn | ||
run: git clone https://github.com/quinn-rs/quinn.git | ||
|
||
- name: Checkout the latest release because HEAD maybe contains breakage. | ||
run: | | ||
set -x | ||
tag=$(git describe --abbrev=0 --tags) | ||
git checkout "${tag}" | ||
working-directory: quinn | ||
|
||
- name: Patch Quinn to use tokio from this repository | ||
run: | | ||
set -x | ||
echo '[patch.crates-io]' >>Cargo.toml | ||
echo 'tokio = { path = "../tokio" }' >>Cargo.toml | ||
git diff | ||
working-directory: quinn | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
# The cargo workspaces and target directory configuration. | ||
# These entries are separated by newlines and have the form | ||
# `$workspace -> $target`. The `$target` part is treated as a directory | ||
# relative to the `$workspace` and defaults to "target" if not explicitly given. | ||
# default: ". -> target" | ||
workspaces: "./quinn" | ||
|
||
- name: Test Quinn | ||
working-directory: quinn | ||
env: | ||
RUSTFLAGS: "" | ||
run: cargo test | ||
|
||
x86_64-fortanix-unknown-sgx: | ||
name: build tokio for x86_64-fortanix-unknown-sgx | ||
needs: basics | ||
|
@@ -896,10 +931,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust ${{ env.rust_stable }} | ||
- name: Install Rust 1.81 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.rust_stable }} | ||
toolchain: 1.81 | ||
- name: Install wasm-pack | ||
uses: taiki-e/install-action@wasm-pack | ||
|
||
|
@@ -979,7 +1014,7 @@ jobs: | |
rust: | ||
# `check-external-types` requires a specific Rust nightly version. See | ||
# the README for details: https://github.com/awslabs/cargo-check-external-types | ||
- nightly-2023-10-21 | ||
- nightly-2024-06-30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust ${{ matrix.rust }} | ||
|
@@ -990,11 +1025,28 @@ jobs: | |
- name: Install cargo-check-external-types | ||
uses: taiki-e/cache-cargo-install-action@v1 | ||
with: | ||
tool: [email protected].10 | ||
tool: [email protected].13 | ||
- name: check-external-types | ||
run: cargo check-external-types --all-features | ||
working-directory: tokio | ||
|
||
check-unexpected-lints-cfgs: | ||
name: check unexpected lints and cfgs | ||
needs: basics | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust ${{ env.rust_nightly }} | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.rust_nightly }} | ||
- name: don't allow warnings | ||
run: sed -i '/#!\[allow(unknown_lints, unexpected_cfgs)\]/d' */src/lib.rs */tests/*.rs | ||
- name: check for unknown lints and cfgs | ||
run: cargo check --all-features --tests | ||
env: | ||
RUSTFLAGS: -Dwarnings --check-cfg=cfg(loom,tokio_unstable,tokio_taskdump,fuzzing,mio_unsupported_force_poll_poll,tokio_internal_mt_counters,fs,tokio_no_parking_lot,tokio_no_tuning_tests) -Funexpected_cfgs -Funknown_lints | ||
|
||
check-fuzzing: | ||
name: check-fuzzing | ||
needs: basics | ||
|
@@ -1033,16 +1085,22 @@ jobs: | |
- name: Make sure dictionary words are sorted and unique | ||
run: | | ||
# `sed` removes the first line (number of words) and | ||
# the last line (new line). | ||
# | ||
# the last line (new line). | ||
# | ||
# `sort` makes sure everything in between is sorted | ||
# and contains no duplicates. | ||
# | ||
# | ||
# Since `sort` is sensitive to locale, we set it | ||
# using LC_ALL to en_US.UTF8 to be consistent in different | ||
# environments. | ||
sed '1d; $d' spellcheck.dic | LC_ALL=en_US.UTF8 sort -uc | ||
( | ||
sed '1d; $d' spellcheck.dic | LC_ALL=en_US.UTF8 sort -uc | ||
) || { | ||
echo "Dictionary is not in sorted order. Correct order is:" | ||
LC_ALL=en_US.UTF8 sort -u <(sed '1d; $d' spellcheck.dic) | ||
false | ||
} | ||
- name: Run cargo-spellcheck | ||
run: cargo spellcheck --code 1 | ||
|
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
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
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
Oops, something went wrong.