From 4c672d79b2fb96a223a429cd485a5f0603f9dadd Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Wed, 22 Nov 2023 16:28:34 -0500 Subject: [PATCH 1/3] Clarify assertions in integration test --- tests/integration_buck2.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/integration_buck2.rs b/tests/integration_buck2.rs index 20ff643..8ebdcd5 100644 --- a/tests/integration_buck2.rs +++ b/tests/integration_buck2.rs @@ -8,7 +8,14 @@ fn test_buck2_latest() { cmd.arg("--version"); let assert = cmd.assert(); let stdout = String::from_utf8(assert.get_output().stdout.to_vec()).unwrap(); - assert!(stdout.starts_with("buck2 "), "found {}", stdout); + let stderr = String::from_utf8(assert.get_output().stderr.to_vec()).unwrap(); + + assert!( + stdout.starts_with("buck2 "), + "found {} on stdout. stderr was {}", + stdout, + stderr + ); assert.success(); } @@ -22,6 +29,12 @@ fn test_buck2_specific_version() { // TODO verify the right version is download after buck2 properly states it's version let assert = cmd.assert(); let stdout = String::from_utf8(assert.get_output().stdout.to_vec()).unwrap(); - assert!(stdout.starts_with("buck2 "), "found {}", stdout); + let stderr = String::from_utf8(assert.get_output().stderr.to_vec()).unwrap(); + assert!( + stdout.starts_with("buck2 "), + "found {} on stdout. stderr was {}", + stdout, + stderr + ); assert.success(); } From ecd4119c0dc54a2504e4a2ec11f25a5d2772e820 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Wed, 22 Nov 2023 16:31:37 -0500 Subject: [PATCH 2/3] Fix URL of Windows artifacts --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ce3ecb5..8bcebf1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -141,7 +141,7 @@ fn get_arch() -> Result<&'static str, Error> { "x86_64" => match env::consts::OS { "linux" => "x86_64-unknown-linux-musl", "darwin" | "macos" => "x86_64-apple-darwin", - "windows" => "x86_64-pc-windows-msvc", + "windows" => "x86_64-pc-windows-msvc.exe", unknown => return Err(anyhow!("Unsupported Arch/OS: x86_64/{unknown}")), }, "aarch64" => match env::consts::OS { From 14c511f946dc00595547c6a98a404c4f83b0578f Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Wed, 22 Nov 2023 16:39:23 -0500 Subject: [PATCH 3/3] windows CI --- .github/workflows/ci-windows.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci-windows.yml diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml new file mode 100644 index 0000000..d2713bb --- /dev/null +++ b/.github/workflows/ci-windows.yml @@ -0,0 +1,29 @@ +name: Buckle Windows CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + build: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + default: true + components: rustfmt, clippy + - name: Build + run: cargo build + - name: Test + run: cargo test + - name: Lint + run: cargo clippy