diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e886852..cf39b05 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -34,3 +34,20 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose + build-mingw: + runs-on: windows-2025 + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + with: + submodules: 'true' + - uses: msys2/setup-msys2@v2 + - shell: msys2 {0} + run: pacman -S --noconfirm base-devel rust + - shell: msys2 {0} + name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose diff --git a/build.rs b/build.rs index c604969..88cd6e1 100644 --- a/build.rs +++ b/build.rs @@ -83,7 +83,6 @@ fn main() { let dst = bld .reconf("-ivf") .build(); -println!("cargo::warning={}", dst.display()); println!("cargo:rustc-link-search=native={}", dst.join("lib").display()); println!("cargo:rustc-link-lib=static=sixel"); } @@ -162,11 +161,7 @@ fn has_feature(feature: &'static str) -> bool { } fn sixel_prefix(directory: &str) -> String { - let cmd = Command::new("pwd").output().expect("Could not run `pwd`"); - let base_path = std::str::from_utf8(&cmd.stdout) - .expect("Could not turn libsixel path into utf8") - .trim() - .to_string(); - let path = base_path + "/" + LIBSIXEL_DIR + "/" + "build"; - path + let cwd = env::current_dir().unwrap(); + let path = cwd.join(LIBSIXEL_DIR).join("build"); + path.display().to_string() }