Skip to content

Commit

Permalink
Upgrades MSRV to 1.63 and test no-std
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpt committed Mar 4, 2024
1 parent ac33682 commit ae69968
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: build

on: [ push, pull_request ]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
fmt:
Expand All @@ -16,17 +22,20 @@ jobs:
- uses: actions/checkout@v3
- run: rustup update && rustup component add clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets
- run: cargo clippy --all-targets --all-features
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
- run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::all
- run: cargo clippy --all-targets --no-default-features -- -D warnings -D clippy::all

clippy_msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update && rustup override set 1.58.0 && rustup component add clippy
- run: rustup update && rustup override set 1.63.0 && rustup component add clippy && rustup toolchain install nightly
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
- run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::all
- run: cargo +nightly update -Z direct-minimal-versions
- run: cargo clippy -- -D warnings -D clippy::all
- run: cargo clippy --all-features -- -D warnings -D clippy::all
- run: cargo clippy --no-default-features -- -D warnings -D clippy::all

test:
runs-on: ubuntu-latest
Expand All @@ -35,10 +44,9 @@ jobs:
- run: rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-features
- run: cargo test --verbose
- run: cargo test --verbose --all-features
env:
RUST_BACKTRACE: 1
- run: cargo test
- run: cargo test --all-features
- run: cargo test --no-default-features

rustdoc:
runs-on: ubuntu-latest
Expand All @@ -47,14 +55,6 @@ jobs:
- run: rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo doc --all-features --no-deps

rustdoc_msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update && rustup override set 1.58.0
- uses: Swatinem/rust-cache@v2
- run: cargo doc --all-features --no-deps
env:
RUSTDOCFLAGS: -D warnings

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description = """
Simple and fast implementation of language tag normalization and validation
"""
edition = "2018"
rust-version = "1.58"
rust-version = "1.63"

[features]
default = ["std"]
Expand All @@ -22,10 +22,10 @@ alloc = ["serde?/alloc"]
serialize = ["dep:serde"]

[dependencies]
serde = { version = "1", optional = true, default_features = false }
serde = { version = "1.0.100", optional = true, default_features = false }

[dev-dependencies]
criterion = "0.4"
criterion = ">=0.4,<0.6"
serde_test = "1"

[[bench]]
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ assert_eq!(language_tag.extension(), None);
assert_eq!(language_tag.private_use_subtags().collect::<Vec<_>>(), vec!["test"]);
```

It is also possible to use this crate in `no_std` (with `alloc`) by opting-out of the default `std` feature:
```toml
serde = { version = "*", default-features = false }
```

## License

This project is licensed under the MIT license ([LICENSE-MIT](LICENSE-MIT) or `<http://opensource.org/licenses/MIT>`).
Expand Down

0 comments on commit ae69968

Please sign in to comment.