mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
Update CI config (#5893)
This commit is contained in:
parent
efe3ab679a
commit
e5e88551d2
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
@ -439,9 +439,6 @@ jobs:
|
|||||||
- target: armv7-unknown-linux-gnueabihf
|
- target: armv7-unknown-linux-gnueabihf
|
||||||
- target: aarch64-unknown-linux-gnu
|
- target: aarch64-unknown-linux-gnu
|
||||||
rustflags: --cfg tokio_taskdump
|
rustflags: --cfg tokio_taskdump
|
||||||
|
|
||||||
# Run a platform without AtomicU64 and no const Mutex::new
|
|
||||||
- target: armv5te-unknown-linux-gnueabi
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
@ -464,10 +461,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
cargo nextest run -p tokio --all-features --target ${{ matrix.target }}
|
cargo nextest run -p tokio --all-features --target ${{ matrix.target }}
|
||||||
cargo test --doc -p tokio --all-features --target ${{ matrix.target }} -- --test-threads 1
|
cargo test --doc -p tokio --all-features --target ${{ matrix.target }}
|
||||||
env:
|
env:
|
||||||
RUST_TEST_THREADS: 1
|
RUST_TEST_THREADS: 1
|
||||||
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_ipv6 --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
|
||||||
|
|
||||||
cross-test-without-parking_lot:
|
cross-test-without-parking_lot:
|
||||||
needs: basics
|
needs: basics
|
||||||
@ -481,9 +478,6 @@ jobs:
|
|||||||
- target: armv7-unknown-linux-gnueabihf
|
- target: armv7-unknown-linux-gnueabihf
|
||||||
- target: aarch64-unknown-linux-gnu
|
- target: aarch64-unknown-linux-gnu
|
||||||
rustflags: --cfg tokio_taskdump
|
rustflags: --cfg tokio_taskdump
|
||||||
|
|
||||||
# Run a platform without AtomicU64 and no const Mutex::new
|
|
||||||
- target: armv5te-unknown-linux-gnueabi
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
@ -510,10 +504,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
cargo nextest run -p tokio --features full,test-util --target ${{ matrix.target }}
|
cargo nextest run -p tokio --features full,test-util --target ${{ matrix.target }}
|
||||||
cargo test --doc -p tokio --features full,test-util --target ${{ matrix.target }} -- --test-threads 1
|
cargo test --doc -p tokio --features full,test-util --target ${{ matrix.target }}
|
||||||
env:
|
env:
|
||||||
RUST_TEST_THREADS: 1
|
RUST_TEST_THREADS: 1
|
||||||
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_ipv6 --cfg tokio_no_parking_lot --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
|
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_parking_lot --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
|
||||||
|
|
||||||
# See https://github.com/tokio-rs/tokio/issues/5187
|
# See https://github.com/tokio-rs/tokio/issues/5187
|
||||||
no-atomic-u64-test:
|
no-atomic-u64-test:
|
||||||
@ -541,10 +535,10 @@ jobs:
|
|||||||
- name: test tokio --all-features
|
- name: test tokio --all-features
|
||||||
run: |
|
run: |
|
||||||
cargo nextest run -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features
|
cargo nextest run -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features
|
||||||
cargo test --doc -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features -- --test-threads 1
|
cargo test --doc -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features
|
||||||
env:
|
env:
|
||||||
RUST_TEST_THREADS: 1
|
RUST_TEST_THREADS: 1
|
||||||
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_atomic_u64 --cfg tokio_no_tuning_tests
|
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_tuning_tests
|
||||||
|
|
||||||
no-atomic-u64-check:
|
no-atomic-u64-check:
|
||||||
name: Check tokio --feature-powerset --depth 2 on i686-unknown-linux-gnu without AtomicU64
|
name: Check tokio --feature-powerset --depth 2 on i686-unknown-linux-gnu without AtomicU64
|
||||||
@ -566,10 +560,10 @@ jobs:
|
|||||||
|
|
||||||
# https://github.com/tokio-rs/tokio/pull/5356
|
# https://github.com/tokio-rs/tokio/pull/5356
|
||||||
# https://github.com/tokio-rs/tokio/issues/5373
|
# https://github.com/tokio-rs/tokio/issues/5373
|
||||||
- name: Check with const_mutex_new
|
- name: Check
|
||||||
run: cargo hack check -p tokio --feature-powerset --depth 2 --keep-going
|
run: cargo hack check -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --feature-powerset --depth 2 --keep-going
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_atomic_u64
|
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings
|
||||||
|
|
||||||
features:
|
features:
|
||||||
name: features ${{ matrix.name }}
|
name: features ${{ matrix.name }}
|
||||||
@ -823,7 +817,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: ${{ env.rust_stable }}
|
toolchain: ${{ env.rust_stable }}
|
||||||
- name: Install wasm-pack
|
- name: Install wasm-pack
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
uses: taiki-e/install-action@wasm-pack
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: test tokio
|
- name: test tokio
|
||||||
|
4
.github/workflows/labeler.yml
vendored
4
.github/workflows/labeler.yml
vendored
@ -4,6 +4,10 @@ on:
|
|||||||
|
|
||||||
# See .github/labeler.yml file
|
# See .github/labeler.yml file
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
4
.github/workflows/loom.yml
vendored
4
.github/workflows/loom.yml
vendored
@ -7,6 +7,10 @@ on:
|
|||||||
|
|
||||||
name: Loom
|
name: Loom
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -Dwarnings --cfg loom --cfg tokio_unstable -C debug_assertions
|
RUSTFLAGS: -Dwarnings --cfg loom --cfg tokio_unstable -C debug_assertions
|
||||||
LOOM_MAX_PREEMPTIONS: 2
|
LOOM_MAX_PREEMPTIONS: 2
|
||||||
|
4
.github/workflows/pr-audit.yml
vendored
4
.github/workflows/pr-audit.yml
vendored
@ -8,6 +8,10 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- '**/Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
4
.github/workflows/stress-test.yml
vendored
4
.github/workflows/stress-test.yml
vendored
@ -5,6 +5,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -Dwarnings
|
RUSTFLAGS: -Dwarnings
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
@ -52,8 +52,7 @@ impl<T> Mutex<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(all(feature = "parking_lot", not(all(loom, test))))]
|
#[cfg(not(all(loom, test)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(all(feature = "parking_lot",))))]
|
|
||||||
pub(crate) const fn const_new(t: T) -> Mutex<T> {
|
pub(crate) const fn const_new(t: T) -> Mutex<T> {
|
||||||
Mutex(PhantomData, parking_lot::const_mutex(t))
|
Mutex(PhantomData, parking_lot::const_mutex(t))
|
||||||
}
|
}
|
||||||
|
@ -523,7 +523,7 @@ macro_rules! cfg_not_coop {
|
|||||||
macro_rules! cfg_has_atomic_u64 {
|
macro_rules! cfg_has_atomic_u64 {
|
||||||
($($item:item)*) => {
|
($($item:item)*) => {
|
||||||
$(
|
$(
|
||||||
#[cfg(all(target_has_atomic = "64", not(tokio_no_atomic_u64)))]
|
#[cfg(target_has_atomic = "64")]
|
||||||
$item
|
$item
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
@ -532,7 +532,7 @@ macro_rules! cfg_has_atomic_u64 {
|
|||||||
macro_rules! cfg_not_has_atomic_u64 {
|
macro_rules! cfg_not_has_atomic_u64 {
|
||||||
($($item:item)*) => {
|
($($item:item)*) => {
|
||||||
$(
|
$(
|
||||||
#[cfg(any(not(target_has_atomic = "64"), tokio_no_atomic_u64))]
|
#[cfg(not(target_has_atomic = "64"))]
|
||||||
$item
|
$item
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,6 @@ async fn connect_v4() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg(not(tokio_no_ipv6))]
|
|
||||||
async fn connect_v6() {
|
async fn connect_v6() {
|
||||||
let srv = assert_ok!(TcpListener::bind("[::1]:0").await);
|
let srv = assert_ok!(TcpListener::bind("[::1]:0").await);
|
||||||
let addr = assert_ok!(srv.local_addr());
|
let addr = assert_ok!(srv.local_addr());
|
||||||
|
@ -24,7 +24,6 @@ async fn basic_usage_v4() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg(not(tokio_no_ipv6))]
|
|
||||||
async fn basic_usage_v6() {
|
async fn basic_usage_v6() {
|
||||||
// Create server
|
// Create server
|
||||||
let addr = assert_ok!("[::1]:0".parse());
|
let addr = assert_ok!("[::1]:0".parse());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user