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

fix(s2n-quic-rustls, s2n-quic-tls): enable building with default features #1673

Merged
merged 4 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
# Pin the nightly toolchain to prevent breakage.
# This should be occasionally updated.
RUST_NIGHTLY_TOOLCHAIN: nightly-2023-02-20
MSRV: 1.63
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We seem to already have a msrv that we parse from the rust-toolchain below in env. Do we also need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call out, will update.

CDN: https://dnglbrstg7yg.cloudfront.net
# enable unstable features for testing
S2N_UNSTABLE_CRYPTO_OPT_TX: 100
Expand All @@ -28,6 +29,7 @@ jobs:
rust-versions: ${{ steps.definitions.outputs.versions }}
msrv: ${{ steps.definitions.outputs.msrv }}
examples: ${{ steps.definitions.outputs.examples }}
crates: ${{ steps.definitions.outputs.crates }}
steps:
- uses: actions/checkout@v3
# examples is populated by
Expand All @@ -50,6 +52,9 @@ jobs:
export EXAMPLES=$(find examples/ -maxdepth 1 -mindepth 1 -type d | jq -R | jq -sc)
echo "examples=$EXAMPLES"
echo "examples=$EXAMPLES" >> $GITHUB_OUTPUT
export CRATES=$(find find quic common -name *Cargo.toml | jq -R | jq -sc)
echo "crates=$CRATES"
echo "crates=$CRATES" >> $GITHUB_OUTPUT

rustfmt:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -357,6 +362,35 @@ jobs:
status: "success"
url: "${{ steps.s3.outputs.URL }}"

# This CI step will directly build each crate in common/ and quic/ which is
# useful because it sidesteps the feature resolution that normally occurs in a
# workspace build. We make sure that the crates build with default features,
# otherwise release to crates.io will be blocked
crates:
needs: env
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crate: ${{ fromJson(needs.env.outputs.crates) }}
steps:
- uses: actions/checkout@v3
with:
submodules: true

- uses: actions-rs/[email protected]
id: toolchain
with:
toolchain: ${{ env.MSRV }}
profile: minimal
override: true

- name: build
uses: actions-rs/[email protected]
with:
command: build
args: --manifest-path ${{ matrix.crate }}

examples:
needs: env
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions quic/s2n-quic-h3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ publish = false
[dependencies]
bytes = { version = "1", default-features = false }
futures = { version = "0.3", default-features = false }
h3 = { git = "https://github.com/hyperium/h3" } # TODO: Update once hyperium h3 is in crates.io
s2n-quic = { path = "../s2n-quic", default-features = false }
s2n-quic-core = { path = "../s2n-quic-core", default-features = false }
h3 = "0.0.1"
s2n-quic = { path = "../s2n-quic" }
s2n-quic-core = { path = "../s2n-quic-core" }
2 changes: 1 addition & 1 deletion quic/s2n-quic-h3/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# s2n-quic-h3

This is an internal crate used by [s2n-quic](https://github.com/aws/s2n-quic). The API is not currently stable and should not be used directly.
This is an internal crate used by [s2n-quic](https://github.com/aws/s2n-quic) written as a proof of concept for implementing HTTP3 on top of s2n-quic. The API is not currently stable and should not be used directly.

## License

Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-rustls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bytes = { version = "1", default-features = false }
rustls = { version = "0.20", features = ["quic"] }
rustls-pemfile = "1"
s2n-codec = { version = "=0.4.0", path = "../../common/s2n-codec", default-features = false }
s2n-quic-core = { version = "=0.18.0", path = "../s2n-quic-core", default-features = false }
s2n-quic-core = { version = "=0.18.0", path = "../s2n-quic-core", default-features = false, features = ["alloc"] }
s2n-quic-crypto = { version = "=0.18.0", path = "../s2n-quic-crypto", default-features = false }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-tls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bytes = { version = "1", default-features = false }
errno = "0.2"
libc = "0.2"
s2n-codec = { version = "=0.4.0", path = "../../common/s2n-codec", default-features = false }
s2n-quic-core = { version = "=0.18.0", path = "../s2n-quic-core", default-features = false }
s2n-quic-core = { version = "=0.18.0", path = "../s2n-quic-core", default-features = false, features = ["alloc"] }
s2n-quic-crypto = { version = "=0.18.0", path = "../s2n-quic-crypto", default-features = false }
s2n-tls = { version = "=0.0.26", features = ["quic"] }

Expand Down