Commit Graph

105 Commits

Author SHA1 Message Date
Joseph Birr-Pixton 6e0dc5079b Update version of nightly for check-external-types 2024-02-27 19:12:22 +00:00
Jacob Hoffman-Andrews 4736733f22 Reverse order of main vs PR 2023-11-30 15:03:11 +00:00
Jorge Aparicio e8bd45cff9 CI: deny warnings when checking feature powerset 2023-11-24 15:14:19 +00:00
Jorge Aparicio a54c8ecbe3 CI: run clippy on the entire workspace 2023-11-22 15:06:37 +00:00
Joseph Birr-Pixton beae45c35d Support aws-lc-rs in integration-level benchmarks 2023-11-21 09:58:03 +00:00
Joseph Birr-Pixton 26541d5bb1 Use cargo-minimal-versions
This hides a bunch of mess underlying `cargo update -Z direct-minimal-versions`:
mainly the ability to exclude workspace crates with publish=false from
version resolution (`--ignore-private` flag).
2023-11-20 11:22:25 +00:00
Joseph Birr-Pixton 076090d4bd Switch to checking direct-minimal-versions
Of `-Z minimal-versions` it is said:

> Note: It is not recommended to use this feature. Because it enforces minimal
> versions for all transitive dependencies, its usefulness is limited since not
> all external dependencies declare proper lower version bounds.

`-Z direct-minimal-versions` appears to be its replacement, which means our
CI is checking things only within our control.
2023-11-20 11:22:25 +00:00
Joseph Birr-Pixton 538cb78f83 Abolish quic crate feature
This reveals that bogo_shim fails to build for `--no-default-features --features tls12`.
Feature gate the entire program on `ring | aws-lc-rs`.
2023-11-17 19:27:21 +00:00
Joseph Birr-Pixton 6189d780d8 Run feature tests in rustls/ directory
Otherwise they get altered by feature unification from other
members of the workspace.  That's more "spooky action at a distance"
than is desirable.
2023-11-09 16:18:11 +00:00
Joseph Birr-Pixton 1379f12657 Enable testing and benchmarking with aws-lc-rs 2023-11-09 16:18:11 +00:00
Joseph Birr-Pixton aaf21d1cdf Allow optional use of aws-lc-rs
Provide shims for limited number of places where ring 0.17 and
aws-lc-rs (ring 0.16-era) APIs have diverged.  This is a
short-term fix, as they are likely to diverge more over time.
Eventually we'll have to stop sharing the code like this.

For unit-like tests, export a `test_provider` alias that resolves
to a provider module, for use in these tests.

This resolves to:

- *ring* if cfg(feature = "ring"), else
- aws-lc-rs if cfg(feature = "aws_lc_rs"), else
- is absent
2023-11-09 16:18:11 +00:00
Daniel McCarney 71505f36f4 docs: create issue templates
Add Bug report, Feature request, and Dependency update issue templates to help prompt users into providing the information that will get them the best help.
2023-10-27 22:14:00 +00:00
Daniel McCarney 3b8a7c3afb ci: move external types config to cargo metadata
As of cargo-check-external-types v0.1.9 the tool can read its
configuration from the crate `Cargo.toml` metadata, removing the need
for a standalone TOML file and the `--config` arg. This commit switches
to that style of configuration.
2023-10-18 21:18:51 +00:00
Joe Birr-Pixton 22a808a212 Run cargo-check-external-types in CI
This needs nightly, which is affixed as the version documneted as working by
cargo-check-external-types.

external-types.toml is a config file as a starting point: it allows all types from
pki-types.

This currently fails due to some `impl From<ExternalType>` on public types.
2023-10-18 09:23:03 +00:00
Dirkjan Ochtman 2a94f9b2ab Bump MSRV to 1.61 2023-10-04 14:17:18 +00:00
Dirkjan Ochtman 40fdc4495c Group Dependabot updates into a single PR 2023-10-04 14:16:13 +00:00
Daniel McCarney 1a939124e8 ci: remove `--locked` from cargo hack daily test
Running `cargo hack check --locked --feature-powerset` seems to be
failing, as it detects that the lockfile needs to be updated. Updating
the lockfile and re-running causes the same error. It looks as though
it is removing items from the lockfile based on which features it's
testing.

To prevent this test from failing, let's remove `--locked` and test the
feature powerset with relaxed handling of the `Cargo.lock` file.
2023-09-29 12:36:19 +00:00
Daniel McCarney 940d603e38 ci: run cargo dependabot weekly
Now that we're checking in `Cargo.lock` files we'll be getting more
Dependabot PRs for semver compatible Cargo dependency updates. This
commit switches the tool to run weekly instead of daily so that we don't
have to spend as much time triaging these on a day-by-day basis.
2023-09-27 15:01:49 +00:00
Adolfo Ochagavía 2c0b2c142e Run CI bench for current branch before main 2023-09-26 13:38:35 +00:00
Dirkjan Ochtman 78c8ff4d96 Use Cargo.lock for CI builds 2023-09-26 13:38:35 +00:00
Dirkjan Ochtman c7970af179 Keep Cargo.lock under version control 2023-09-26 13:38:35 +00:00
Dirkjan Ochtman ff595eb7b3 Fix minimal versions job 2023-09-26 13:38:35 +00:00
Joseph Birr-Pixton 92a9e46d20 Use stable for coverage measurement 2023-09-20 08:21:36 +00:00
Joseph Birr-Pixton 5a1b369080 icount-bench: apt update before relying on index 2023-09-14 09:52:32 +00:00
Joseph Birr-Pixton a1950e84cf Add demonstration of custom crypto
This is an example that builds a mostly-unchanged rustls example
(simpleclient), but only using crypto from the rust-crypto project
and elsewhere.

This is intended to be minimalistic, and not a complete replacement
for *ring*.

It implements:

- TLS1.3 TLS13_CHACHA20_POLY1305_SHA256 cipher suite.
- TLS1.2 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 cipher suite.
- X25519 key exchange.
- RSA-PSS-SHA256 and RSA-PKCS1-SHA256 signature verification for
  verifying the server, integrated into the webpki crate.
- random generation using `rand_core`.

This means it can fetch www.rust-lang.org.

TLS1.2 is not strictly necessary for this server, but serves to
demonstrate that part of the API.
2023-09-13 15:32:29 +00:00
dependabot[bot] 1770e1e455 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 05:31:12 +00:00
Adolfo Ochagavía 490108e6c5 Show valgrind version in CI job 2023-09-06 08:40:39 +00:00
Adolfo Ochagavía 8c914559f8 Show detailed icount diff for scenarios with noteworthy diffs 2023-09-05 13:34:27 +00:00
Dirkjan Ochtman 95780ab476 Don't deny warnings from nightly clippy
Since these can be added at any time.
2023-09-04 12:16:15 +00:00
Jacob Hoffman-Andrews 150b6929ce ci: fix job name for `cargo test`
There was a mismatch between the job name and what it did.
2023-09-01 15:44:40 +00:00
Daniel McCarney c1ec86d4cd ci: add cargo hack to daily-tests.
Test the feature powerset of the crate using `cargo hack`. The runtime
of this is too large to use as part of the regular CI flow but it is
helpful for catching feature interaction breakages.
2023-08-31 14:08:04 +00:00
Daniel McCarney 94ce539d58 ci: split up daily-tests into multiple jobs.
This better separates the connection tests from the example binary smoke
tests. In a subsequent commit we will add another job for running `cargo
hack`.
2023-08-31 14:08:04 +00:00
Daniel McCarney 4d243a35f2 ci: add 'name' descriptions to daily-tests. 2023-08-31 14:08:04 +00:00
Daniel McCarney 61b5a4cb9b ci: add server_acceptor build check to daily-tests.
This ensures the example binary continues to build, similar to how we
handle the other examples.
2023-08-31 14:08:04 +00:00
Daniel McCarney 7759f05e44 ci: update connect-tests comment, and name.
We are gradually adding other CI task here that aren't appropriate for
the main CI runs. Since it's no longer dedicated to just running the
connection tests we need a more representative name.
2023-08-31 14:08:04 +00:00
Daniel McCarney 9ec344fe29 ci: rename connect-tests.yml -> daily-tests.yml 2023-08-31 14:08:04 +00:00
Adolfo Ochagavía 5ed68a9293 Hook up icount benchmarks to CI 2023-08-30 15:09:26 +00:00
Joseph Birr-Pixton 0f5deca345 ci: check `cargo doc --document-private-items` 2023-08-25 14:30:51 +00:00
Dirkjan Ochtman 484e3771f2 Use clippy for test and example code, too 2023-08-25 13:15:04 +00:00
Dirkjan Ochtman 5b4e53ed45 Ignore unknown lints locally where needed 2023-08-25 13:15:04 +00:00
Joseph Birr-Pixton 54a7771d90 Check usage/intro docs in README.md are in sync 2023-07-28 12:57:17 +00:00
Daniel McCarney 763a17ef5f ci: fix setup-go build cache warnings.
Since v4 of the `actions/setup-go` action, caching is enabled by default
and when a `go.sum` can't be found in the root of the project, a warning
is logged.

Since we don't have a `go.sum` in the project root, this warning was
being issued by both tasks that used the `setup-go` action:

* The BoGo test suite task
* The code coverage task

For the first of these, caching is disabled to avoid the warning - we
weren't benefiting from this to begin with and setting
`cache-dependency-path` to `bogo/bogo/go.sum` or `bogo/go.sum` wasn't
working.

For the second of these, it's not clear _why_ we were installing the Go
toolchain. The BoGo test suite is not being run by this task and so Go
is not required. Removing it fixes the warning.
2023-07-28 12:04:26 +00:00
Joseph Birr-Pixton 1d07dd5dde Correct/allow unnecessarily &mut function args
allow unknown-lints on stable clippy, otherwise it warns about us
allowing lints that were introduced on nightly.
2023-07-18 16:01:32 +00:00
Joseph Birr-Pixton bf09a07845 Remove MSRV variant of connect-tests
MSRV is important (an tested separately) for the core crate
(and its dependencies) but doesn't apply to test code.

Run these daily to notice any breakage earlier.
2023-07-13 14:52:39 +00:00
Daniel McCarney 478a895cf0 ci: add a cargo-semver-checks action.
This commit updates the `build.yml` GitHub actions workflow to
additionally include a step that checks semver compatibility w/
cargo-semver-checks[0].

Notably this check passing is necessary but not sufficient for knowing
that we're maintaining semver: if this tool produces a finding we know
we aren't matching semver, but if it doesn't, we may still be breaking
semver in a way the tool can't detect.

[0]: https://github.com/obi1kenobi/cargo-semver-checks
2023-07-11 16:14:26 +00:00
Daniel McCarney 8e5395bfc1 ci: add merge_group trigger to ci tasks.
This commit adds `merge_group` to our CI task `on` triggers in
preparation for enabling the merge queue feature.

Per the GitHub docs[0]:

> You must use the merge_group event to trigger your GitHub Actions
> workflow when a pull request is added to a merge queue.
>
> Note: If your repository uses GitHub Actions to perform required
> checks on pull requests in your repository, you need to update the
> workflows to include the merge_group event as an additional trigger.
> Otherwise, status checks will not be triggered when you add a pull
> request to a merge queue. The merge will fail as the required status
> check will not be reported. The merge_group event is separate from the
> pull_request and push events.

[0]: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue
2023-07-07 14:36:19 -04:00
Daniel McCarney ad86bcb9fd ci: add 32bit cross compilation target.
This commit adds a CI task that uses `cross` to cross-compile Rustls for
the 32bit `i686-unknown-linux-gnu` target. This can be used as
a smoke-test that we haven't broken 32bit compat. Unfortunately GitHub
doesn't offer 32bit action runners so we have to cross-compile to
achieve this test.

To install `cross` this commit relies on `install-action`[0]. This is
a new 3rd party action for the Rustls repo, but one that was already
being used in `webpki` for `llvm-cov` and `cargo deny`. If we'd prefer
to avoid that workflow dependency we could instead `cargo install cross`
at the cost of having to use nightly rust and longer CI execution time.

[0]: https://github.com/taiki-e/install-action
2023-07-06 09:34:14 -04:00
Joseph Birr-Pixton 215aaf70b7 Enable unit-test-like benchmarks
Run these using:

$ RUSTFLAGS='--cfg=bench' cargo +nightly bench
2023-06-30 16:25:31 +01:00
Daniel McCarney 4deec0d33c ci: run client examples in CI connect tests.
We want to catch breakages in these client examples when they occur, but
also don't want to run them during normal CI since they connect to
external hosts and may occasionally flake.

This commit adds `simpleclient`, `limitedclient`, and
`simple_0rtt_client` test runs to the `connect-tests.yml` CI
configuration we run on a weekly basis.
2023-06-29 09:08:42 -04:00
Joseph Birr-Pixton 0ebeb0f056 Bump MSRV to 1.60
Log recently did this.
2023-06-12 09:50:56 +01:00