Skip to content

Commit

Permalink
credentials: Do not test MSRVs that depend on Serde's MSRVs
Browse files Browse the repository at this point in the history
Serde's MSRV is no longer stable.
  • Loading branch information
tesaguri committed Jun 19, 2024
1 parent 0e8eedb commit d8d6630
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,11 @@ jobs:
toolchain:
- '1.0.0'
- '1.6.0'
- '1.8.0'
- '1.13.0'
- '1.36.0'
include:
- toolchain: '1.0.0'
features: std
# Toolchains older than 1.8.0 cannot compile `oauth-credentials` directly
# because the toolchains do not understand Cargo registry's information for `serde`
# (see <https://github.com/rust-lang/cargo/issues/3763>).
# So, with these toolchains, we compile a crate named `oauth-credentials-test` instead,
# which depends on `oauth-credentials` without `serde` feature.
crate_suffix: '-test'
- toolchain: '1.6.0'
crate_suffix: '-test'
- toolchain: '1.13.0'
features: serde
- toolchain: '1.36.0'
features: alloc
steps:
Expand Down Expand Up @@ -195,7 +184,12 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --manifest-path oauth-credentials${{ matrix.crate_suffix }}/Cargo.toml --no-default-features --features=${{ matrix.features }}
# Toolchains older than 1.8.0 cannot compile `oauth-credentials` directly
# because the toolchains do not understand Cargo registry's information for `serde`
# (see <https://github.com/rust-lang/cargo/issues/3763>).
# So, with these toolchains, we instead build a dependant crate of `oauth-credentials`
# without `serde` feature.
args: --verbose --manifest-path oauth-credentials-test/Cargo.toml --no-default-features --features=${{ matrix.features }}
credentials-test:
name: Test `oauth-credentials`
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion oauth-credentials-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "oauth-credentials-test"
version = "0.0.0"
authors = ["Daiki Mizukami <[email protected]>"]
description = "A hack to make the CI work for Rust 1.7.0 and older."
description = "A hack to make the CI work with older toolchains."
publish = false

[dependencies]
Expand Down
3 changes: 2 additions & 1 deletion oauth-credentials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ Feature | MSRV
-|-
(none) | 1.6.0
`std` (default) | 1.0.0
`serde` | 1.13.0
`serde` | (See [Serde's `rust-version`][serde-cargo-toml])
`alloc` (without `std`) | 1.36.0

Note that if your crate uses the `serde` feature (even if optionally!), it
cannot be compiled directly with Rust 1.7.x and older due to
[rust-lang/cargo#3763], but it can somehow be compiled as a dependency of
another crate if the feature is disabled.

[serde-cargo-toml]: https://docs.rs/crate/serde/latest/source/Cargo.toml.orig
[rust-lang/cargo#3763]: https://github.com/rust-lang/cargo/issues/3763

0 comments on commit d8d6630

Please sign in to comment.