Support build on MSYS2
This commit is contained in:
36
.github/workflows/test-msys2.yaml
vendored
Normal file
36
.github/workflows/test-msys2.yaml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Run tests on Windows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
IMAGE_MAGICK_LIBS: "MagickCore-7.Q16HDRI;MagickWand-7.Q16HDRI"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
shell: C:\msys64\usr\bin\bash.exe --login '{0}'
|
||||
run: |
|
||||
export PATH="/mingw64/bin:$PATH"
|
||||
pacman --noconfirm -S mingw-w64-x86_64-imagemagick mingw-w64-x86_64-pkg-config
|
||||
cd /mingw64/lib
|
||||
mv libMagickCore-7.Q16HDRI.dll.a MagickCore-7.Q16HDRI.lib
|
||||
mv libMagickWand-7.Q16HDRI.dll.a MagickWand-7.Q16HDRI.lib
|
||||
|
||||
- name: Set environment variables
|
||||
shell: C:\msys64\usr\bin\bash.exe --login '{0}'
|
||||
run: |
|
||||
export PATH="/mingw64/bin:$PATH"
|
||||
echo "BINDGEN_EXTRA_CLANG_ARGS=$(MagickCore-config --cppflags)" >> $GITHUB_ENV
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
- name: Test
|
||||
run: |
|
||||
echo $env:BINDGEN_EXTRA_CLANG_ARGS
|
||||
$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
|
||||
cargo test test_new_drop -- --nocapture
|
||||
Reference in New Issue
Block a user