Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable unstable feature reqwest/http3 in CI #1261

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ concurrency:
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
JUST_ENABLE_H3: true

jobs:
test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
JUST_USE_CARGO_ZIGBUILD: ${{ matrix.c }}
JUST_FOR_RELEASE: true
JUST_USE_AUDITABLE: true
JUST_ENABLE_H3: true

steps:
- uses: actions/checkout@v3
Expand Down
143 changes: 137 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ native-tls = ["binstalk/native-tls"]

trust-dns = ["binstalk/trust-dns"]

# Experimental HTTP/3 client, this would require `--cfg reqwest_unstable`
# to be passed to `rustc`.
http3 = ["binstalk/http3"]

zstd-thin = ["binstalk/zstd-thin"]
cross-lang-fat-lto = ["binstalk/cross-lang-fat-lto"]

Expand Down
7 changes: 7 additions & 0 deletions crates/binstalk-downloader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ generic-array = "0.14.7"
httpdate = "1.0.2"
reqwest = { version = "0.11.18", features = ["stream", "gzip", "brotli", "deflate"], default-features = false }
percent-encoding = "2.2.0"
# Pull in due to https://github.com/seanmonstar/reqwest/pull/1846 , please
# remove this once new reqwest release is out.
quinn = { version = "0.10", default-features = false, features = ["runtime-tokio"], optional = true }
serde = { version = "1.0.163", features = ["derive"], optional = true }
serde-tuple-vec-map = "1.0.1"
serde_json = { version = "1.0.96", optional = true }
Expand Down Expand Up @@ -77,6 +80,10 @@ native-tls = ["__tls", "reqwest/native-tls", "trust-dns-resolver?/dns-over-nativ
# Enable trust-dns-resolver so that features on it will also be enabled.
trust-dns = ["trust-dns-resolver", "reqwest/trust-dns"]

# Experimental HTTP/3 client, this would require `--cfg reqwest_unstable`
# to be passed to `rustc`.
http3 = ["reqwest/http3", "dep:quinn"]

zstd-thin = ["zstd/thin"]

cross-lang-fat-lto = ["zstd/fat-lto"]
Expand Down
4 changes: 4 additions & 0 deletions crates/binstalk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ native-tls = ["binstalk-downloader/native-tls"]

trust-dns = ["binstalk-downloader/trust-dns"]

# Experimental HTTP/3 client, this would require `--cfg reqwest_unstable`
# to be passed to `rustc`.
http3 = ["binstalk-downloader/http3"]

zstd-thin = ["binstalk-downloader/zstd-thin"]
cross-lang-fat-lto = ["binstalk-downloader/cross-lang-fat-lto"]

Expand Down
14 changes: 9 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ glibc-version := env_var_or_default("GLIBC_VERSION", "")
use-auditable := env_var_or_default("JUST_USE_AUDITABLE", "")
timings := env_var_or_default("JUST_TIMINGS", "")
build-std := env_var_or_default("JUST_BUILD_STD", "")
enable-h3 := env_var_or_default("JUST_ENABLE_H3", "")

export BINSTALL_LOG_LEVEL := if env_var_or_default("RUNNER_DEBUG", "0") == "1" { "debug" } else { "info" }
export BINSTALL_RATE_LIMIT := "30/1"
Expand Down Expand Up @@ -97,10 +98,13 @@ git-max-perf-feature := if target == "x86_64-apple-darwin" {
""
}

cargo-features := trim_end_match(if override-features != "" { override-features
} else if (cargo-profile / ci-or-no) == "dev/ci" { "git,rustls,fancy-with-backtrace,zstd-thin,log_max_level_debug" + git-max-perf-feature + (if support-pkg-config != "" { ",pkg-config" } else { "" }) + extra-features
} else if (cargo-profile / ci-or-no) == "release/ci" { "git,static,rustls,trust-dns,fancy-no-backtrace,zstd-thin,log_release_max_level_debug,cross-lang-fat-lto" + git-max-perf-feature + extra-features
} else { extra-features
h3-features := if enable-h3 != "" { ",http3" } else { "" }
cargo-features := trim_end_match(if override-features != "" { override-features + h3-features
} else if (cargo-profile / ci-or-no) == "dev/ci" { "git,rustls,fancy-with-backtrace,zstd-thin,log_max_level_debug" + git-max-perf-feature + (if support-pkg-config != "" { ",pkg-config" } else { "" }) + h3-features + extra-features
} else if (cargo-profile / ci-or-no) == "release/ci" { "git,static,rustls,trust-dns,fancy-no-backtrace,zstd-thin,log_release_max_level_debug,cross-lang-fat-lto" + git-max-perf-feature + h3-features + extra-features
} else if extra-features != "" { extra-features + h3-features
} else if enable-h3 != "" { "http3"
} else { ""
}, ",")

# it seems we can't split debuginfo for non-buildstd builds
Expand Down Expand Up @@ -174,7 +178,7 @@ target-glibc-ver-postfix := if glibc-version != "" {

cargo-check-args := (" --target ") + (target) + (target-glibc-ver-postfix) + (cargo-buildstd) + (if extra-build-args != "" { " " + extra-build-args } else { "" }) + (cargo-split-debuginfo) + (win-arm64-ring16)
cargo-build-args := (if for-release != "" { " --release" } else { "" }) + (cargo-check-args) + (cargo-no-default-features) + (if cargo-features != "" { " --features " + cargo-features } else { "" }) + (if timings != "" { " --timings" } else { "" })
export RUSTFLAGS := (linker-plugin-lto) + (rustc-gcclibs) + (rustc-miropt) + (rust-lld) + (rustc-icf)
export RUSTFLAGS := (linker-plugin-lto) + (rustc-gcclibs) + (rustc-miropt) + (rust-lld) + (rustc-icf) + (if enable-h3 != "" { " --cfg reqwest_unstable" } else { "" })


# libblocksruntime-dev provides compiler-rt
Expand Down