From 06fabce04614f0b68f88a753f431b2e196e31db6 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 21 Jul 2023 17:35:54 +0100 Subject: [PATCH 1/3] chore: switch from ctest to ctest2 ctest is nearly unmaintained and emits lots of warnings. Switch to ctest2 to fix those. --- systest/Cargo.toml | 2 +- systest/build.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/systest/Cargo.toml b/systest/Cargo.toml index 9047e7f307..fe5cabcf23 100644 --- a/systest/Cargo.toml +++ b/systest/Cargo.toml @@ -10,4 +10,4 @@ libgit2-sys = { path = "../libgit2-sys", features = ['https', 'ssh'] } libc = "0.2" [build-dependencies] -ctest = "0.2.17" +ctest2 = "0.4" diff --git a/systest/build.rs b/systest/build.rs index ed854e9d09..bb34d9de80 100644 --- a/systest/build.rs +++ b/systest/build.rs @@ -2,7 +2,7 @@ use std::env; use std::path::PathBuf; fn main() { - let mut cfg = ctest::TestGenerator::new(); + let mut cfg = ctest2::TestGenerator::new(); if let Some(root) = env::var_os("DEP_GIT2_ROOT") { cfg.include(PathBuf::from(root).join("include")); } From 679e1d776a63f466ee89a158d92f053d14eb5d21 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 21 Jul 2023 17:42:37 +0100 Subject: [PATCH 2/3] chore: run systest on nightly and beta as well with `ctest2` we won't be blocked on gnzlbg/ctest#90. --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 528f118e8f..567a830852 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,9 +31,7 @@ jobs: shell: bash - run: cargo test --no-default-features - run: cargo test - # skip systest on nightly because it requires the extprim crate which fails to compile on nightly rust - - run: if [[ "${{ matrix.rust }}" != "nightly" ]]; then cargo run --manifest-path systest/Cargo.toml; fi - shell: bash + - run: cargo run --manifest-path systest/Cargo.toml - run: cargo test --manifest-path git2-curl/Cargo.toml rustfmt: From 1a6e0a1e4a1b2c857d617775dc525ff76516ba66 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 21 Jul 2023 17:44:26 +0100 Subject: [PATCH 3/3] chore: specify workspace member directly by `--package/-p` --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 567a830852..dc69771f27 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,8 +31,8 @@ jobs: shell: bash - run: cargo test --no-default-features - run: cargo test - - run: cargo run --manifest-path systest/Cargo.toml - - run: cargo test --manifest-path git2-curl/Cargo.toml + - run: cargo run -p systest + - run: cargo test -p git2-curl rustfmt: name: Rustfmt