Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix URL of Windows artifacts #21

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
17 changes: 15 additions & 2 deletions tests/integration_buck2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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();
}