mirror of https://github.com/fafhrd91/actix-net
run both sets of tests on linux
This commit is contained in:
parent
5db9ba69a8
commit
fb6e7f0eec
|
@ -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"
|
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
|
# 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"
|
||||||
|
|
|
@ -112,8 +112,10 @@ jobs:
|
||||||
cargo ci-test-server
|
cargo ci-test-server
|
||||||
- name: tests
|
- name: tests
|
||||||
if: matrix.target.os == 'ubuntu-latest'
|
if: matrix.target.os == 'ubuntu-latest'
|
||||||
uses: actions-rs/cargo@v1
|
run: |
|
||||||
with: { command: ci-test-linux }
|
cargo ci-test
|
||||||
|
cargo ci-test-rt-linux
|
||||||
|
cargo ci-test-server-linux
|
||||||
|
|
||||||
- name: Generate coverage file
|
- name: Generate coverage file
|
||||||
if: >
|
if: >
|
||||||
|
|
|
@ -95,7 +95,7 @@ impl Arbiter {
|
||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
/// Panics if a [System] is not registered on the current thread.
|
/// 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)]
|
#[allow(clippy::new_without_default)]
|
||||||
pub fn new() -> Arbiter {
|
pub fn new() -> Arbiter {
|
||||||
Self::with_tokio_rt(|| {
|
Self::with_tokio_rt(|| {
|
||||||
|
@ -107,7 +107,7 @@ impl Arbiter {
|
||||||
/// Spawn a new Arbiter using the [Tokio Runtime](tokio-runtime) returned from a closure.
|
/// Spawn a new Arbiter using the [Tokio Runtime](tokio-runtime) returned from a closure.
|
||||||
///
|
///
|
||||||
/// [tokio-runtime]: tokio::runtime::Runtime
|
/// [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)]
|
#[doc(hidden)]
|
||||||
pub fn with_tokio_rt<F>(runtime_factory: F) -> Arbiter
|
pub fn with_tokio_rt<F>(runtime_factory: F) -> Arbiter
|
||||||
where
|
where
|
||||||
|
|
|
@ -288,7 +288,7 @@ impl ServerWorker {
|
||||||
Arbiter::new()
|
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 || {
|
let arbiter = Arbiter::with_tokio_rt(move || {
|
||||||
tokio::runtime::Builder::new_current_thread()
|
tokio::runtime::Builder::new_current_thread()
|
||||||
.enable_all()
|
.enable_all()
|
||||||
|
|
Loading…
Reference in New Issue