Skip to content

Commit

Permalink
Initial support for compio runtime (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 authored Sep 5, 2024
1 parent 8a3a8f1 commit 85b076c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ jobs:
- name: Code coverage (glommio)
run: cargo +nightly llvm-cov --no-report --all --no-default-features --features="glommio,cookie,url,compress,openssl,rustls,ws,brotli"

- name: Code coverage (compio)
run: cargo +nightly llvm-cov --no-report --all --no-default-features --features="compio,cookie,url,compress,openssl,rustls,ws,brotli"

- name: Code coverage
run: RUST_LOG=trace cargo +nightly llvm-cov --no-report --all --doctests --no-default-features --features="tokio,cookie,url,compress,openssl,rustls,ws,brotli"

- name: Generate coverage report
run: cargo +nightly llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex="ntex-tokio|ntex-glommio|ntex-async-std"
run: cargo +nightly llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex="ntex-tokio|ntex-glommio|ntex-async-std|ntex-compio"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
timeout-minutes: 40
run: cargo test --all --all-features --no-fail-fast -- --nocapture

- name: Run compio tests
timeout-minutes: 40
run: |
cd ntex
cargo test --no-default-features --no-fail-fast --features="compio,cookie,url,compress,openssl,rustls,ws,brotli"
- name: Run async-std tests
timeout-minutes: 40
continue-on-error: true
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
- name: Run tests
run: cargo test --all --all-features --no-fail-fast -- --nocapture

- name: Run compio tests
timeout-minutes: 40
run: |
cd ntex
cargo test --no-default-features --no-fail-fast --features="compio,cookie,url,compress,openssl,rustls,ws,brotli"
- name: Install cargo-cache
continue-on-error: true
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,11 @@ jobs:
- name: Run tests
run: |
cargo test --lib --all-features --no-fail-fast -- --nocapture --skip test_panic_in_worker --skip test_connection_force_close --skip test_connection_server_close --skip test_freeze --skip test_simple --skip test_test_methods --skip test_connection_wait_queue_force_close --skip test_params --skip test_body --skip test_form --skip test_json --skip test_connection_reuse --skip test_connection_wait_queue --skip test_no_decompress --skip test_connection_reuse_h2 --skip test_h2_tcp --skip test_timer
cargo test --lib --all-features --no-fail-fast -- --nocapture --skip test_timer
- name: Run compio tests
timeout-minutes: 40
continue-on-error: true
run: |
cd ntex
cargo test --no-default-features --no-fail-fast --features="compio,cookie,url,compress,openssl,rustls,ws,brotli"
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ members = [
"ntex-macros",
"ntex-util",

"ntex-async-std",
"ntex-compio",
"ntex-glommio",
"ntex-tokio",
"ntex-async-std",
]

[patch.crates-io]
Expand Down
3 changes: 3 additions & 0 deletions ntex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ glommio = ["ntex-net/glommio"]
# async-std runtime
async-std = ["ntex-net/async-std"]

# compio runtime
compio = ["ntex-net/compio"]

# websocket support
ws = ["dep:sha-1"]

Expand Down
1 change: 1 addition & 0 deletions ntex/src/web/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ impl Default for AppConfig {
}

/// Service config is used for external configuration.
///
/// Part of application configuration could be offloaded
/// to set of external methods. This could help with
/// modularization of big application configuration.
Expand Down

0 comments on commit 85b076c

Please sign in to comment.