From a692b8cccc464136ded44a5a9dff130cc05254f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 31 Mar 2024 14:27:11 +0000 Subject: [PATCH 1/3] Bump rust version to 1.71 on devcontainer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a88d49ae..31a4f0de 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG debian_version=slim-bookworm -ARG rust_version=1.70.0 +ARG rust_version=1.71.0 FROM rust:${rust_version}-${debian_version} ARG DEBIAN_FRONTEND=noninteractive From b24fb871aeff0925a2c912027798a6d6bdf47ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 31 Mar 2024 14:27:37 +0000 Subject: [PATCH 2/3] Add test.sh to allow to run test suite easily MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- test.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 test.sh diff --git a/test.sh b/test.sh new file mode 100755 index 00000000..a3a0cbd5 --- /dev/null +++ b/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +# this script runs the tests and checks that also run as part of the`test.yml` github action workflow + +cargo fmt --all -- --check +cargo clippy -p librespot-core --no-default-features +cargo clippy -p librespot-core + +cargo hack clippy --each-feature -p librespot-discovery +cargo hack clippy --each-feature -p librespot-playback +cargo hack clippy --each-feature + +cargo build --workspace --examples +cargo test --workspace +cargo hack --workspace --remove-dev-deps +cargo check -p librespot-core --no-default-features +cargo check -p librespot-core +cargo hack check --each-feature -p librespot-discovery +cargo hack check --each-feature -p librespot-playback +cargo hack check --each-feature From 7bc7b46b9e02cb738446b071f490a118832ab02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 31 Mar 2024 14:51:13 +0000 Subject: [PATCH 3/3] Don't remove dev dependencies but instead use --no-dev-deps option of cargo hack which will restore Cargo.toml after run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- test.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test.sh b/test.sh index a3a0cbd5..0d6bb291 100755 --- a/test.sh +++ b/test.sh @@ -14,9 +14,8 @@ cargo hack clippy --each-feature cargo build --workspace --examples cargo test --workspace -cargo hack --workspace --remove-dev-deps cargo check -p librespot-core --no-default-features cargo check -p librespot-core -cargo hack check --each-feature -p librespot-discovery -cargo hack check --each-feature -p librespot-playback -cargo hack check --each-feature +cargo hack check --no-dev-deps --each-feature -p librespot-discovery +cargo hack check --no-dev-deps --each-feature -p librespot-playback +cargo hack check --no-dev-deps --each-feature