Skip to content

Commit e5e8855

Browse files
authored
Update CI config (#5893)
1 parent efe3ab6 commit e5e8855

File tree

9 files changed

+29
-22
lines changed

9 files changed

+29
-22
lines changed

.github/workflows/ci.yml

+10-16
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,6 @@ jobs:
439439
- target: armv7-unknown-linux-gnueabihf
440440
- target: aarch64-unknown-linux-gnu
441441
rustflags: --cfg tokio_taskdump
442-
443-
# Run a platform without AtomicU64 and no const Mutex::new
444-
- target: armv5te-unknown-linux-gnueabi
445442
steps:
446443
- uses: actions/checkout@v3
447444
- name: Install Rust stable
@@ -464,10 +461,10 @@ jobs:
464461
run: |
465462
set -euxo pipefail
466463
cargo nextest run -p tokio --all-features --target ${{ matrix.target }}
467-
cargo test --doc -p tokio --all-features --target ${{ matrix.target }} -- --test-threads 1
464+
cargo test --doc -p tokio --all-features --target ${{ matrix.target }}
468465
env:
469466
RUST_TEST_THREADS: 1
470-
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_ipv6 --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
467+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
471468

472469
cross-test-without-parking_lot:
473470
needs: basics
@@ -481,9 +478,6 @@ jobs:
481478
- target: armv7-unknown-linux-gnueabihf
482479
- target: aarch64-unknown-linux-gnu
483480
rustflags: --cfg tokio_taskdump
484-
485-
# Run a platform without AtomicU64 and no const Mutex::new
486-
- target: armv5te-unknown-linux-gnueabi
487481
steps:
488482
- uses: actions/checkout@v3
489483
- name: Install Rust stable
@@ -510,10 +504,10 @@ jobs:
510504
run: |
511505
set -euxo pipefail
512506
cargo nextest run -p tokio --features full,test-util --target ${{ matrix.target }}
513-
cargo test --doc -p tokio --features full,test-util --target ${{ matrix.target }} -- --test-threads 1
507+
cargo test --doc -p tokio --features full,test-util --target ${{ matrix.target }}
514508
env:
515509
RUST_TEST_THREADS: 1
516-
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_ipv6 --cfg tokio_no_parking_lot --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
510+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_parking_lot --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
517511

518512
# See https://github.com/tokio-rs/tokio/issues/5187
519513
no-atomic-u64-test:
@@ -541,10 +535,10 @@ jobs:
541535
- name: test tokio --all-features
542536
run: |
543537
cargo nextest run -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features
544-
cargo test --doc -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features -- --test-threads 1
538+
cargo test --doc -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features
545539
env:
546540
RUST_TEST_THREADS: 1
547-
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_atomic_u64 --cfg tokio_no_tuning_tests
541+
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_tuning_tests
548542

549543
no-atomic-u64-check:
550544
name: Check tokio --feature-powerset --depth 2 on i686-unknown-linux-gnu without AtomicU64
@@ -566,10 +560,10 @@ jobs:
566560

567561
# https://github.com/tokio-rs/tokio/pull/5356
568562
# https://github.com/tokio-rs/tokio/issues/5373
569-
- name: Check with const_mutex_new
570-
run: cargo hack check -p tokio --feature-powerset --depth 2 --keep-going
563+
- name: Check
564+
run: cargo hack check -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --feature-powerset --depth 2 --keep-going
571565
env:
572-
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_atomic_u64
566+
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings
573567

574568
features:
575569
name: features ${{ matrix.name }}
@@ -823,7 +817,7 @@ jobs:
823817
with:
824818
toolchain: ${{ env.rust_stable }}
825819
- name: Install wasm-pack
826-
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
820+
uses: taiki-e/install-action@wasm-pack
827821

828822
- uses: Swatinem/rust-cache@v2
829823
- name: test tokio

.github/workflows/labeler.yml

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44

55
# See .github/labeler.yml file
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
9+
cancel-in-progress: true
10+
711
permissions:
812
contents: read
913

.github/workflows/loom.yml

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77

88
name: Loom
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
12+
cancel-in-progress: true
13+
1014
env:
1115
RUSTFLAGS: -Dwarnings --cfg loom --cfg tokio_unstable -C debug_assertions
1216
LOOM_MAX_PREEMPTIONS: 2

.github/workflows/pr-audit.yml

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
paths:
99
- '**/Cargo.toml'
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
13+
cancel-in-progress: true
14+
1115
permissions:
1216
contents: read
1317

.github/workflows/stress-test.yml

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- master
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
10+
cancel-in-progress: true
11+
812
env:
913
RUSTFLAGS: -Dwarnings
1014
RUST_BACKTRACE: 1

tokio/src/loom/std/parking_lot.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ impl<T> Mutex<T> {
5252
}
5353

5454
#[inline]
55-
#[cfg(all(feature = "parking_lot", not(all(loom, test))))]
56-
#[cfg_attr(docsrs, doc(cfg(all(feature = "parking_lot",))))]
55+
#[cfg(not(all(loom, test)))]
5756
pub(crate) const fn const_new(t: T) -> Mutex<T> {
5857
Mutex(PhantomData, parking_lot::const_mutex(t))
5958
}

tokio/src/macros/cfg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ macro_rules! cfg_not_coop {
523523
macro_rules! cfg_has_atomic_u64 {
524524
($($item:item)*) => {
525525
$(
526-
#[cfg(all(target_has_atomic = "64", not(tokio_no_atomic_u64)))]
526+
#[cfg(target_has_atomic = "64")]
527527
$item
528528
)*
529529
}
@@ -532,7 +532,7 @@ macro_rules! cfg_has_atomic_u64 {
532532
macro_rules! cfg_not_has_atomic_u64 {
533533
($($item:item)*) => {
534534
$(
535-
#[cfg(any(not(target_has_atomic = "64"), tokio_no_atomic_u64))]
535+
#[cfg(not(target_has_atomic = "64"))]
536536
$item
537537
)*
538538
}

tokio/tests/tcp_connect.rs

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ async fn connect_v4() {
3535
}
3636

3737
#[tokio::test]
38-
#[cfg(not(tokio_no_ipv6))]
3938
async fn connect_v6() {
4039
let srv = assert_ok!(TcpListener::bind("[::1]:0").await);
4140
let addr = assert_ok!(srv.local_addr());

tokio/tests/tcp_socket.rs

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ async fn basic_usage_v4() {
2424
}
2525

2626
#[tokio::test]
27-
#[cfg(not(tokio_no_ipv6))]
2827
async fn basic_usage_v6() {
2928
// Create server
3029
let addr = assert_ok!("[::1]:0".parse());

0 commit comments

Comments
 (0)