From fb6e7f0eecd46f890cce3e01e130d511a6c8f9fe Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 2 Sep 2021 01:09:33 +0100 Subject: [PATCH] run both sets of tests on linux --- .cargo/config.toml | 3 ++- .github/workflows/ci.yml | 6 ++++-- actix-rt/src/arbiter.rs | 4 ++-- actix-server/src/worker.rs | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 702b73dc..0e5de486 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -19,4 +19,5 @@ ci-test-rt = " hack --feature-powerset --exclude-features io-uring test --pac ci-test-server = "hack --feature-powerset --exclude-features io-uring test --package=actix-server --lib --tests --no-fail-fast -- --nocapture" # test with io-uring feature -ci-test-linux = "test --workspace --all-features --lib --tests --no-fail-fast -- --nocapture" +ci-test-rt-linux = " hack --feature-powerset test --package=actix-rt --lib --tests --no-fail-fast -- --nocapture" +ci-test-server-linux = "hack --feature-powerset test --package=actix-server --lib --tests --no-fail-fast -- --nocapture" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4620893f..45841fb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,8 +112,10 @@ jobs: cargo ci-test-server - name: tests if: matrix.target.os == 'ubuntu-latest' - uses: actions-rs/cargo@v1 - with: { command: ci-test-linux } + run: | + cargo ci-test + cargo ci-test-rt-linux + cargo ci-test-server-linux - name: Generate coverage file if: > diff --git a/actix-rt/src/arbiter.rs b/actix-rt/src/arbiter.rs index 0eb06a86..97084f05 100644 --- a/actix-rt/src/arbiter.rs +++ b/actix-rt/src/arbiter.rs @@ -95,7 +95,7 @@ impl Arbiter { /// /// # Panics /// Panics if a [System] is not registered on the current thread. - #[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))] + #[cfg(not(all(target_os = "linux", feature = "io-uring")))] #[allow(clippy::new_without_default)] pub fn new() -> Arbiter { Self::with_tokio_rt(|| { @@ -107,7 +107,7 @@ impl Arbiter { /// Spawn a new Arbiter using the [Tokio Runtime](tokio-runtime) returned from a closure. /// /// [tokio-runtime]: tokio::runtime::Runtime - #[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))] + #[cfg(not(all(target_os = "linux", feature = "io-uring")))] #[doc(hidden)] pub fn with_tokio_rt(runtime_factory: F) -> Arbiter where diff --git a/actix-server/src/worker.rs b/actix-server/src/worker.rs index 357a731c..21f98027 100644 --- a/actix-server/src/worker.rs +++ b/actix-server/src/worker.rs @@ -288,7 +288,7 @@ impl ServerWorker { Arbiter::new() }; - #[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))] + #[cfg(not(all(target_os = "linux", feature = "io-uring")))] let arbiter = Arbiter::with_tokio_rt(move || { tokio::runtime::Builder::new_current_thread() .enable_all()