Skip to content

Commit e289e35

Browse files
committed
Document and start testing the MSRV
Check the MSRV in CI and document it as an extremely low 1.49 (the oldest version I could test with locally, it's probably actually older than that). This is intended so we can do one final release with `rust-version` documented, then increase it in a follow up to 1.66 which will be needed for `unicode-width` 0.2.
1 parent 4f6d84e commit e289e35

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,17 @@ jobs:
2121
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
2222
- run: cargo test
2323
- run: cargo doc
24+
25+
msrv:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@master
29+
- name: Install Rust
30+
run: |
31+
msrv="$(cargo metadata --format-version=1 |
32+
jq -r '.packages[] | select(.name == "getopts").rust_version'
33+
)"
34+
rustup update "$msrv" && rustup default "$msrv"
35+
- run: |
36+
cargo update -p unicode-width --precise 0.1.8
37+
cargo check

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ description = """
1111
getopts-like option parsing.
1212
"""
1313
categories = ["command-line-interface"]
14+
edition = "2018"
15+
rust-version = "1.49"
1416

1517
[dependencies]
1618
unicode-width = "0.1.5"

0 commit comments

Comments
 (0)