Skip to content

Commit

Permalink
fix(ci): fix MSRV check
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Mar 23, 2024
1 parent ce2791e commit 01a7fb8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,16 @@ jobs:
- name: Check typos
uses: crate-ci/typos@master

- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall

- name: Install cargo-msrv
run: cargo binstall -y cargo-msrv

- name: Run cargo-msrv
shell: bash
run: |
curl -s 'https://api.github.com/repos/foresterre/cargo-msrv/releases' | \
jq -r "[.[] | select(.prerelease == false)][0].assets[] | \
select(.name | ascii_downcase | test(\"linux.*x86_64|x86_64.*linux\")).browser_download_url" | \
wget -qi -
tar -xvf cargo-msrv*.tar* -C ~/.cargo/bin/ cargo-msrv
# Workaround for https://github.com/foresterre/cargo-msrv/issues/590
for package in $(cargo metadata --format-version 1 --no-deps | jq -r ".workspace_members[]" | awk '{print $1}'); do
version=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name | test("^daktilo$")) | .rust_version')
printf "Checking MSRV $version for $package..."
echo -e "[package.metadata]\nmsrv = \"${version}\"" >> "crates/${package}/Cargo.toml"
cargo msrv --output-format json --path "crates/${package}" verify | tail -n 1 | jq --exit-status '.success'
for package in "daktilo" "daktilo_lib"; do
printf "Checking MSRV for $package..."
cargo msrv --output-format json --path "crates/$package" verify | tail -n 1 | jq --exit-status '.success'
done
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ homepage = "https://github.com/orhun/daktilo"
repository = "https://github.com/orhun/daktilo"
keywords = ["typewriter", "keyboard", "nostalgic", "type"]
categories = ["command-line-utilities", "multimedia"]
rust-version = "1.74.1"
edition = "2021"

[workspace.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/daktilo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
rust-version.workspace = true
edition.workspace = true
default-run = "daktilo"
rust-version = "1.74.1"

[features]
audio-tests = []
Expand Down
2 changes: 1 addition & 1 deletion crates/daktilo_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
rust-version.workspace = true
edition.workspace = true
rust-version = "1.74.1"

[dependencies]
rdev = { version = "0.5.3", features = ["serialize"] }
Expand Down

0 comments on commit 01a7fb8

Please sign in to comment.