1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00

ci: use just for feature combos check

This commit is contained in:
Rob Ede 2024-06-19 23:40:22 +01:00
parent 643d64581a
commit cbb55ba27d
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
5 changed files with 33 additions and 30 deletions

View File

@ -1,10 +0,0 @@
[alias]
lint = "clippy --workspace --all-targets -- -Dclippy::todo"
lint-all = "clippy --workspace --all-features --all-targets -- -Dclippy::todo"
# lib checking
ci-check-min = "hack --workspace check --no-default-features"
ci-check-default = "hack --workspace check"
ci-check-default-tests = "check --workspace --tests"
ci-check-all-feature-powerset="hack --workspace --feature-powerset --depth=4 --skip=__compress,experimental-io-uring check"
ci-check-all-feature-powerset-linux="hack --workspace --feature-powerset --depth=4 --skip=__compress check"

View File

@ -76,16 +76,16 @@ jobs:
- name: Free Disk Space - name: Free Disk Space
run: ./scripts/free-disk-space.sh run: ./scripts/free-disk-space.sh
- name: Setup mold linker
uses: rui314/setup-mold@v1
- name: Install Rust - name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 uses: actions-rust-lang/setup-rust-toolchain@v1.9.0
- name: Install cargo-hack - name: Install just, cargo-hack
uses: taiki-e/install-action@v2.39.1 uses: taiki-e/install-action@v2.39.1
with: with:
tool: cargo-hack tool: just,cargo-hack
- name: check feature combinations - name: Check feature combinations
run: cargo ci-check-all-feature-powerset run: just check-feature-combinations
- name: check feature combinations
run: cargo ci-check-all-feature-powerset-linux

View File

@ -59,14 +59,14 @@ allowed_external_types = [
default = [] default = []
# HTTP/2 protocol support # HTTP/2 protocol support
http2 = ["h2"] http2 = ["dep:h2"]
# WebSocket protocol implementation # WebSocket protocol implementation
ws = [ ws = [
"local-channel", "dep:local-channel",
"base64", "dep:base64",
"rand", "dep:rand",
"sha1", "dep:sha1",
] ]
# TLS via OpenSSL # TLS via OpenSSL
@ -88,9 +88,9 @@ rustls-0_22 = ["__tls", "actix-tls/accept", "actix-tls/rustls-0_22"]
rustls-0_23 = ["__tls", "actix-tls/accept", "actix-tls/rustls-0_23"] rustls-0_23 = ["__tls", "actix-tls/accept", "actix-tls/rustls-0_23"]
# Compression codecs # Compression codecs
compress-brotli = ["__compress", "brotli"] compress-brotli = ["__compress", "dep:brotli"]
compress-gzip = ["__compress", "flate2"] compress-gzip = ["__compress", "dep:flate2"]
compress-zstd = ["__compress", "zstd"] compress-zstd = ["__compress", "dep:zstd"]
# Internal (PRIVATE!) features used to aid testing and checking feature status. # Internal (PRIVATE!) features used to aid testing and checking feature status.
# Don't rely on these whatsoever. They are semver-exempt and may disappear at anytime. # Don't rely on these whatsoever. They are semver-exempt and may disappear at anytime.

View File

@ -6,9 +6,9 @@
//! | ------------------- | ------------------------------------------- | //! | ------------------- | ------------------------------------------- |
//! | `http2` | HTTP/2 support via [h2]. | //! | `http2` | HTTP/2 support via [h2]. |
//! | `openssl` | TLS support via [OpenSSL]. | //! | `openssl` | TLS support via [OpenSSL]. |
//! | `rustls` | TLS support via [rustls] 0.20. | //! | `rustls-0_20` | TLS support via rustls 0.20. |
//! | `rustls-0_21` | TLS support via [rustls] 0.21. | //! | `rustls-0_21` | TLS support via rustls 0.21. |
//! | `rustls-0_22` | TLS support via [rustls] 0.22. | //! | `rustls-0_22` | TLS support via rustls 0.22. |
//! | `rustls-0_23` | TLS support via [rustls] 0.23. | //! | `rustls-0_23` | TLS support via [rustls] 0.23. |
//! | `compress-brotli` | Payload compression support: Brotli. | //! | `compress-brotli` | Payload compression support: Brotli. |
//! | `compress-gzip` | Payload compression support: Deflate, Gzip. | //! | `compress-gzip` | Payload compression support: Deflate, Gzip. |

View File

@ -22,7 +22,7 @@ non_linux_all_features_list := ```
cargo metadata --format-version=1 \ cargo metadata --format-version=1 \
| jq '.packages[] | select(.source == null) | .features | keys' \ | jq '.packages[] | select(.source == null) | .features | keys' \
| jq -r --slurp \ | jq -r --slurp \
--arg exclusions "tokio-uring,io-uring,experimental-io-uring" \ --arg exclusions "__tls,__compress,tokio-uring,io-uring,experimental-io-uring" \
'add | unique | . - ($exclusions | split(",")) | join(",")' 'add | unique | . - ($exclusions | split(",")) | join(",")'
``` ```
@ -93,6 +93,19 @@ update-readmes: && fmt
cd ./actix-multipart && cargo rdme --force cd ./actix-multipart && cargo rdme --force
cd ./actix-test && cargo rdme --force cd ./actix-test && cargo rdme --force
feature_combo_skip_list := if os() == "linux" {
"__tls,__compress"
} else {
"__tls,__compress,experimental-io-uring"
}
# Checks compatibility of feature combinations.
check-feature-combinations:
cargo hack --workspace \
--feature-powerset --depth=4 \
--skip={{ feature_combo_skip_list }} \
check
# Check for unintentional external type exposure on all crates in workspace. # Check for unintentional external type exposure on all crates in workspace.
check-external-types-all toolchain="+nightly": check-external-types-all toolchain="+nightly":
#!/usr/bin/env bash #!/usr/bin/env bash