set up CI manually for io-uring testing

This commit is contained in:
Rob Ede 2021-11-21 20:59:57 +00:00
parent 68a8fce4ec
commit 0cd921b758
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 42 additions and 33 deletions

View File

@ -1,14 +1,12 @@
[alias] [alias]
chk = "check --workspace --all-features --tests --examples --bins" lint = "clippy --workspace --tests --examples --bins -- -Dclippy::todo"
lint = "clippy --workspace --all-features --tests --examples --bins" lint-all = "clippy --workspace --all-features --tests --examples --bins -- -Dclippy::todo"
ci-min = "hack check --workspace --no-default-features"
ci-min-test = "hack check --workspace --no-default-features --tests --examples"
ci-default = "check --workspace --bins --tests --examples"
ci-full = "check --workspace --all-features --bins --tests --examples"
ci-test = "test --workspace --all-features --lib --tests --no-fail-fast -- --nocapture"
ci-doctest = "test --workspace --all-features --doc --no-fail-fast -- --nocapture"
ci-feature-powerset-check-no-tls="hack --workspace --feature-powerset --skip=__compress,rustls,openssl,io-uring check" # lib checking
ci-feature-powerset-check-rustls="hack --workspace --feature-powerset --features=rustls --skip=__compress,openssl,io-uring check" ci-check-min = "hack --workspace check --no-default-features"
ci-feature-powerset-check-openssl="hack --workspace --feature-powerset --features=openssl --skip=__compress,rustls,io-uring check" ci-check-default = "hack --workspace check"
ci-feature-powerset-check-all="hack --workspace --feature-powerset --skip=__compress,io-uring check" ci-check-all-feature-powerset="hack --workspace --feature-powerset --skip=__compress,io-uring check"
ci-check-all-feature-powerset-linux="hack --workspace --feature-powerset --skip=__compress check"
# testing
ci-doctest = "test --workspace --all-features --doc --no-fail-fast -- --nocapture"

View File

@ -62,26 +62,33 @@ jobs:
- name: check minimal - name: check minimal
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: { command: ci-min } with: { command: ci-check-min }
- name: check minimal + tests
uses: actions-rs/cargo@v1
with: { command: ci-min-test }
- name: check default - name: check default
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: { command: ci-default } with: { command: ci-check-default }
- name: check full
uses: actions-rs/cargo@v1
with: { command: ci-full }
- name: tests - name: tests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
timeout-minutes: 60 timeout-minutes: 60
with: run: |
command: ci-test cargo test -p=actix-router --all-features
args: --skip=test_reading_deflate_encoding_large_random_rustls cargo test -p=actix-http --all-features
cargo test -p=actix-web --features=rustls,openssl --skip=test_reading_deflate_encoding_large_random_rustls
cargo test -p=actix-web-codegen --all-features
cargo test -p=awc --all-features
cargo test -p=actix-http-test --all-features
cargo test -p=actix-test --all-features
cargo test -p=actix-files
cargo test -p=actix-multipart --all-features
cargo test -p=actix-web-actors --all-features
- name: tests (io-uring)
if: matrix.target.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
timeout-minutes: 60
run: |
cargo test -p=actix-files --all-features
- name: Clear the cargo caches - name: Clear the cargo caches
run: | run: |
@ -114,9 +121,12 @@ jobs:
args: cargo-hack args: cargo-hack
- name: check feature combinations - name: check feature combinations
# if: github.ref == 'refs/heads/master'
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: { command: ci-feature-powerset-check-all } with: { command: ci-check-all-feature-powerset }
- name: check feature combinations
uses: actions-rs/cargo@v1
with: { command: ci-check-all-feature-powerset-linux }
coverage: coverage:
name: coverage name: coverage
@ -166,11 +176,11 @@ jobs:
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1.3.0 uses: Swatinem/rust-cache@v1.3.0
- name: Install cargo-hack # - name: Install cargo-hack
uses: actions-rs/cargo@v1 # uses: actions-rs/cargo@v1
with: # with:
command: install # command: install
args: cargo-hack # args: cargo-hack
- name: doc tests - name: doc tests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1

View File

@ -82,7 +82,8 @@ pub struct CompressMiddleware<S> {
} }
static SUPPORTED_ALGORITHM_NAMES: Lazy<String> = Lazy::new(|| { static SUPPORTED_ALGORITHM_NAMES: Lazy<String> = Lazy::new(|| {
let mut encoding = vec![]; #[allow(unused_mut)] // only unused when no compress features enabled
let mut encoding: Vec<&str> = vec![];
#[cfg(feature = "compress-brotli")] #[cfg(feature = "compress-brotli")]
{ {