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

Add support for msys2 environment #94

Merged
merged 1 commit into from
Nov 11, 2024
Merged
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
22 changes: 22 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,29 @@ jobs:
- name: Test package mupdf-sys
if: matrix.os == 'ubuntu-latest'
run: cargo package --manifest-path mupdf-sys/Cargo.toml

test-msys:
name: Test Suite (MSYS2)
runs-on: windows-2019
strategy:
matrix:
include:
- { sys: ucrt64, env: ucrt-x86_64 }
- { sys: mingw64, env: x86_64 }
# - { sys: mingw32, env: i686 }
- { sys: clang64, env: clang-x86_64 }
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
install: mingw-w64-${{matrix.env}}-rust base base-devel unzip git

- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 500
- run: cargo test

asan:
name: Address Sanitizer
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions mupdf-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ fn build_libmupdf() {
let build_dir = out_dir.join("build");
t!(fs::create_dir_all(&build_dir));

// workaround for windows gnu toolchain, path separator is `/` but not `\`
let build_dir_str = build_dir.to_string_lossy().replace("\\", "/");

let current_dir = env::current_dir().unwrap();
let mupdf_src_dir = current_dir.join("mupdf");
cp_r(&mupdf_src_dir, &build_dir);
Expand Down
Loading