From 37bc664feed8a9dfcb67c5f397237de92d594657 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 9 Mar 2021 14:45:05 +0100 Subject: [PATCH 1/2] test: fix test on Windows --- src/test.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test.rs b/src/test.rs index 659be45..00ba5d9 100644 --- a/src/test.rs +++ b/src/test.rs @@ -245,12 +245,14 @@ fn feature_versions() { #[test] fn override_search_native() { + #[cfg(target_os = "windows")] + let paths_env = "/custom/path;/other/path"; + #[cfg(not(target_os = "windows"))] + let paths_env = "/custom/path:/other/path"; + let (libraries, flags) = toml( "toml-good", - vec![( - "SYSTEM_DEPS_TESTLIB_SEARCH_NATIVE", - "/custom/path:/other/path", - )], + vec![("SYSTEM_DEPS_TESTLIB_SEARCH_NATIVE", paths_env)], ) .unwrap(); let testlib = libraries.get_by_name("testlib").unwrap(); From 0471dff25581cb48a0717000386772501fa1b6f2 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 9 Mar 2021 12:58:28 +0100 Subject: [PATCH 2/2] ci: run tests on Windows as well adding a specific job as we need to install pkg-config --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1304f8..1f20745 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,23 @@ jobs: with: command: test + test-Windows: + name: Test Suite (Windows) + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: crazy-max/ghaction-chocolatey@v1 + with: + args: install pkgconfiglite + - uses: actions-rs/cargo@v1 + with: + command: test + fmt: name: Rustfmt runs-on: ubuntu-latest