-
Notifications
You must be signed in to change notification settings - Fork 184
74 lines (65 loc) · 1.98 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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@v3
- 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@v1
with:
fetch-depth: 1
- name: Setup go
uses: actions/[email protected]
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-pkg-config
- name: Setup ImageMagick
shell: msys2 {0}
run: |
pacman --noconfirm -SU mingw-w64-x86_64-imagemagick
- name: Install deps
shell: msys2 {0}
run: |
/c/hostedtoolcache/windows/go/1.20.6/x64/bin/go.exe env
pkg-config --cflags --libs MagickWand
MAGICK_CONFIGURE_PATH=/d/a/_temp/msys/msys64/mingw64/etc/ImageMagick-7 convert -list configure
- name: Test
shell: msys2 {0}
run: >
MAGICK_CONFIGURE_PATH=/d/a/_temp/msys/msys64/mingw64/etc/ImageMagick-7
/c/hostedtoolcache/windows/go/1.20.6/x64/bin/go.exe test -v ./imagick