ci: test #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
tags: | |
- "*" | |
branches-ignore: | |
- 'exp_*' | |
pull_request: | |
branches-ignore: | |
- 'exp_*' | |
jobs: | |
test: | |
name: Test ImageMagick7 linux | |
runs-on: ubuntu-latest | |
environment: imagemagick7 | |
env: | |
DOCKER_IMAGE: gographics/imagick.v3:im-${{ vars.IMAGEMAGICK7_VERSION }} | |
# We want to run on external PRs, but not on our own internal PRs as they'll be run | |
# by the push to the branch. | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Test | |
run: | | |
docker run --rm \ | |
-v $PWD:/go/projects/imagick \ | |
-v $PWD/.cache/go-build:/root/.cache/go-build \ | |
-v $PWD/.cache/go/pkg:/go/pkg \ | |
"$DOCKER_IMAGE" | |
test_windows: | |
name: Test ImageMagick7 windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.6 | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
base-devel | |
mingw-w64-x86_64-toolchain | |
mingw-w64-x86_64-pkgconf | |
- name: Setup ImageMagick | |
shell: msys2 {0} | |
run: | | |
pacman --noconfirm -S mingw-w64-x86_64-imagemagick | |
pkg-config --cflags --libs MagickWand | |
set MAGICK_CONFIGURE_PATH=/d/a/_temp/msys64/mingw64/etc/ImageMagick-7 | |
set MAGICK_CODER_MODULE_PATH=/d/a/_temp/msys64/mingw64/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders | |
convert -list configure | |
- name: Test | |
shell: msys2 {0} | |
run: | | |
set IM_BASE=/d/a/_temp/msys64/mingw64 | |
set MAGICK_CONFIGURE_PATH=$IM_BASE/etc/ImageMagick-7 | |
set MAGICK_CODER_MODULE_PATH=$IM_BASE/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders | |
set PATH=$IM_BASE/bin:$PATH | |
set PKG_CONFIG_PATH=$IM_BASE/lib/pkgconfig | |
env | |
/c/hostedtoolcache/windows/go/1.20.6/x64/bin/go.exe env | |
/c/hostedtoolcache/windows/go/1.20.6/x64/bin/go.exe test -v ./imagick |