22 Commits

Author SHA1 Message Date
Glen De Cauwsemaecker
85080a5617
use workspace dependencies for tower (#778)
Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com>
2024-07-23 11:26:01 -04:00
Dirk Stolle
a6e98a7d69
chore: update GitHub Actions CI (#740) 2024-07-23 09:37:48 -04:00
Josh Stone
05a0a25dcc
Upgrade to indexmap v2 (MSRV 1.63) (#741)
Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com>
2024-07-20 13:01:30 -04:00
Eliza Weisman
ee826286fd
chore: allow publishing releases from version branches (#674) 2022-06-17 13:41:20 -07:00
Eliza Weisman
22b6fc743b
ci: run MSRV checks with minimal dep versions (#670)
In many cases, new releases of a dependency can break compatibility with
Tower's minimum supported Rust version (MSRV). It shouldn't be necessary
for Tower to bump its MSRV when a dependency does, as users on older
Rust versions should be able to depend on older versions of that crate.
Instead, we should probably just run our MSRV checks with minimal
dependency versions.

This branch changes Tower's CI jobs to do that. It was also necessary to 
make some changes to the `Cargo.toml` to actually fix the build with
minimal dependency versions.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2022-06-17 11:23:32 -07:00
Eliza Weisman
5e280fedca
ci: fix wrong tag regex for tower (#644)
In #643, I accidentally included a `v` before the version number in the
regex for matching release tags for the `tower` crate, but not for
`tower-whatever` crates. All previous release tags on this repo don't
use a `v`, so adding it was a mistake. This branch removes it.
2022-02-16 22:07:08 +00:00
Eliza Weisman
9c184d81bc
chore: bump MSRV to 1.49.0 (#645)
`tower` builds are now failing on CI because Tokio v1.17.0 bumped MSRV
to 1.49.0. This branch updates `tower`'s MSRV to 1.49.0 to track Tokio's
MSRV. I also added nicer documentation of the MSRV based on Tokio's, and
added the `rust-version` Cargo metadata to the `tower` crate's
`Cargo.toml`.

Note that `tower-service` and `tower-layer` can technically continue to
support much earlier Rust versions than `tower` can, since they don't
depend on external crates and are very small. We could consider testing
separate, older MSRVs on CI for those crates individually. I didn't do
that in this PR, though, because I wasn't sure if this was worth the
effort and I just wanted to get CI passing again.
2022-02-16 13:14:05 -08:00
Eliza Weisman
7b6587e412
ci: automatically publish release notes to GitHub Releases (#643)
This branch adds a GitHub Actions workflow to automatically publish
release notes to GitHub Releases when a tag is pushed on the `master`
branch that corresponds to a release.

The release notes are parsed from the changelog using
taiki-e/create-release-action. The workflow will only run when a tag
matching `tower-[0-9].+` or `tower-[a-z]+-[0-9].+` is pushed to the
`master` branch on the origin (`tower-rs/tower`) repo.
2022-02-16 20:20:29 +01:00
Eliza Weisman
665834c7a6
ci: disable fail-fast for Rust version matrix jobs (#640)
Tower has test and check jobs on CI that run on a build matrix
including a number of Rust versions. By default, GitHub Actions has
fail-fast semantics for matrix jobs, so if any matrix job fails, the
rest are cancelled and the build is failed. This is intended to help
builds complete faster.

This isn't really the ideal behavior for testing across multiple Rust
versions. When a build fails on a particular toolchain version, we would
ideally like to know whether the failure is localized to that version or
exists on _all_ Rust versions. This is particularly important for builds
on nightly Rust, as the nightly toolchain is more likely to contain
compiler regressions that might not be our fault at all. Similarly, we
might want to know if a change only broke the build on our MSRV, or if
it broke the build everywhere --- such an issue would be fixed
differently.

This also currently means that the nightly test run failing will prevent
PRs from being merged, even if the failure is due to a nightly compiler
regression. We currently only *require* the stable and MSRV test runs
to pass in order to merge a PR, but because the fail-fast behavior
will cancel them if the nightly build fails, this means that nightly failing
will effectively prevent merging PRs...which, given that it's not marked
as required, seems different from what we intended.

Therefore, this PR changes the CI workflow to disable fail-fast behavior
on the cross-version test jobs.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2022-02-11 11:05:03 -08:00
Jake Shadle
20d7b55556
chore: reenable all cargo deny checks (#632) 2022-01-31 09:27:27 +01:00
David Pedersen
4d80f7ed90
builder,util: add convenience methods for boxing services (#616)
* builder,util: add convenience methods for boxing services

This adds a couple of new methods to `ServiceBuilder` and `ServiceExt`:

- `ServiceBuilder::boxed`
- `ServiceExt::boxed`
- `ServiceBuilder::clone_boxed`
- `ServiceExt::clone_boxed`

They apply `BoxService::layer` and `CloneBoxService::layer`
respectively.

* fix doc links

* add missing `cfg`s

* Update tower/CHANGELOG.md

Co-authored-by: Eliza Weisman <eliza@buoyant.io>

* Apply suggestions from code review

Co-authored-by: Eliza Weisman <eliza@buoyant.io>

* not sure why rustdoc cannot infer these

* line breaks

* trailing whitespace

* make docs a bit more consistent

* fix doc links

* update tokio

* don't pull in old version of tower

* Don't run `cargo deny check bans` as it hangs

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2021-11-18 13:56:19 +01:00
David Pedersen
1c9631d7b3
chore: Bump MSRV to 1.46 (#605)
* Actually check MSCV on CI

* check broken_intra_doc_links on CI

* clean up CI

* fix other crates

* bump MSRV to 1.42 because of tracing-core

* attempt to fix http not working on 1.42

* use `--workspace` instead of `--all`

`--all` is deprecated

* make tower-service build on 1.42

* force http version 0.2.4

* actually msrv is 1.46 because of tokio

* fix running `cargo fmt`

* clean up

* also run tests on 1.46

* ignore rustsec in time
2021-10-19 16:28:55 +02:00
Eliza Weisman
00377d1f80
chore: install nightly rust before building docs
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2021-01-12 11:07:41 -08:00
Eliza Weisman
ec497f7dd8
chore: fix yaml syntax in docs workflow
Whoops, I put the env var in the wrong place, lol

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2021-01-12 10:59:36 -08:00
Eliza Weisman
0ad132bdbe
chore: add --all-features and --cfg docsrs to cargo doc CI workflow (#526)
Tower's docs builds are currently failing on `master` because of broken
docs links. These links are broken because they reference modules that
are feature flagged and disabled by default.

In order to build docs successfully, we should build with
`--all-features`. This also means we'll actually build docs for feature
flagged modules --- because we weren't doing that previously, we
actually weren't building most of the docs on CI.

Additionally, I've changed the docs build workflow to build on nightly and
to set `RUSTDOCFLAGS="--cfg docsrs"` so that we can use `doc(cfg)`
attributes when building the Git API docs.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2021-01-12 10:42:42 -08:00
Eliza Weisman
124816a40e
ci: install cargo hack from GitHub release binary (#486)
CI is currently busted due to [issues with caching `cargo-hack`][1].
Currently, we cache the `cargo-hack` executable to speed up builds by
avoiding the overhead of compiling it from source in every build.

Recently, `cargo-hack` has started publishing binaries on GitHub
Releases. Rather than compiling it on CI and caching it, we can just
download the binary instead. This ought to fix the build.

See also taiki-e/cargo-hack#89 and taiki-e/cargo-hack#91.

[1]: https://github.com/tower-rs/tower/runs/1425940763
2020-12-23 11:49:46 -08:00
Lucio Franco
a0a66b10a2
Upgrade cargo deny action (#452) 2020-05-06 09:45:57 -04:00
Jon Gjengset
39112cb0ba
Tidy up tower::load (#445)
This also renames the `Instrument` trait, and related types, to better
reflect what they do. Specifically, the trait is now called
`TrackCompletion`, and `NoInstrument` is called `CompleteOnResponse`.

Also brings back balance example and makes it compile.
2020-04-20 14:55:40 -04:00
Lucio Franco
cd7dd12315
Refactor github actions (#436)
Signed-off-by: Lucio Franco <luciofranco14@gmail.com>
2020-04-14 19:20:20 -04:00
Jon Gjengset
2e06782241
step 3: make ci work again 2020-03-31 16:26:52 -04:00
Lucio Franco
7e35b758be
Remove azure and rename gh actions (#409)
* Remove azure

* Rename actions

* Rename workflow

* Reduce amount of actions

* Fix patch
2020-01-09 19:23:03 -05:00
László Nagy
40103d84ce Use GitHub actions (#407)
* gh-403: add basic github actions

* gh-403: add environment variables during test

* gh-403: fix error in tower-balance example

* gh-403: rename build workflow

* gh-403: fix release workflow

* gh-403: add GitHub page publish workflow

* gh-403: remove release workflow

* gh-403: run per crate build

* gh-403: replace build to check
2020-01-09 19:02:40 -05:00