Skip to content

Commit

Permalink
ci: use just for feature combos check
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Jun 19, 2024
1 parent 643d645 commit cbb55ba
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 30 deletions.
10 changes: 0 additions & 10 deletions .cargo/config.toml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/ci-post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ jobs:
- name: Free Disk Space
run: ./scripts/free-disk-space.sh

- name: Setup mold linker
uses: rui314/setup-mold@v1

- name: Install Rust
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
with:
tool: cargo-hack

- name: check feature combinations
run: cargo ci-check-all-feature-powerset
tool: just,cargo-hack

- name: check feature combinations
run: cargo ci-check-all-feature-powerset-linux
- name: Check feature combinations
run: just check-feature-combinations
16 changes: 8 additions & 8 deletions actix-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ allowed_external_types = [
default = []

# HTTP/2 protocol support
http2 = ["h2"]
http2 = ["dep:h2"]

# WebSocket protocol implementation
ws = [
"local-channel",
"base64",
"rand",
"sha1",
"dep:local-channel",
"dep:base64",
"dep:rand",
"dep:sha1",
]

# TLS via OpenSSL
Expand All @@ -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"]

# Compression codecs
compress-brotli = ["__compress", "brotli"]
compress-gzip = ["__compress", "flate2"]
compress-zstd = ["__compress", "zstd"]
compress-brotli = ["__compress", "dep:brotli"]
compress-gzip = ["__compress", "dep:flate2"]
compress-zstd = ["__compress", "dep:zstd"]

# 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.
Expand Down
8 changes: 4 additions & 4 deletions actix-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//! | ------------------- | ------------------------------------------- |
//! | `http2` | HTTP/2 support via [h2]. |
//! | `openssl` | TLS support via [OpenSSL]. |
//! | `rustls` | TLS support via [rustls] 0.20. |
//! | `rustls-0_21` | TLS support via [rustls] 0.21. |
//! | `rustls-0_22` | TLS support via [rustls] 0.22. |
//! | `rustls-0_23` | TLS support via [rustls] 0.23. |
//! | `rustls-0_20` | TLS support via rustls 0.20. |
//! | `rustls-0_21` | TLS support via rustls 0.21. |
//! | `rustls-0_22` | TLS support via rustls 0.22. |
//! | `rustls-0_23` | TLS support via [rustls] 0.23. |
//! | `compress-brotli` | Payload compression support: Brotli. |
//! | `compress-gzip` | Payload compression support: Deflate, Gzip. |
//! | `compress-zstd` | Payload compression support: Zstd. |
Expand Down
15 changes: 14 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ non_linux_all_features_list := ```
cargo metadata --format-version=1 \
| jq '.packages[] | select(.source == null) | .features | keys' \
| 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(",")'
```

Expand Down Expand Up @@ -93,6 +93,19 @@ update-readmes: && fmt
cd ./actix-multipart && 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-external-types-all toolchain="+nightly":
#!/usr/bin/env bash
Expand Down

0 comments on commit cbb55ba

Please sign in to comment.