-
-
Notifications
You must be signed in to change notification settings - Fork 145
162 lines (145 loc) Β· 5.67 KB
/
main.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Build and Test on Debian
on:
push:
pull_request:
types: [opened, synchronize, reopened]
release:
types: [created]
jobs:
test_basic:
name: basic PHP ${{ matrix.php }} - I ${{ matrix.imagemagick }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [ 8.3 ]
imagemagick: [
7.1.1-41,
6.9.2-0,
]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Apt install required packages
run: |
sudo apt-get update
sudo apt-get install -y fonts-urw-base35 || true
sudo apt-get install -y libfreetype6-dev || true
sudo apt-get install -y texlive-fonts-recommended || true
- name: Cache ImageMagick
uses: actions/cache@v4
env:
cache-name: cache-ImageMagick
with:
path: ~/im/imagemagick-${{ matrix.imagemagick }}
key: ${{ runner.os }}-ImageMagick-${{ matrix.imagemagick }}
- name: Sanity check package.xml and install ImageMagick
run: |
for file in tests/*.phpt; do grep $(basename $file) package.xml >/dev/null || (echo "Missing $file from package.xml" ; exit 1); done
bash ./imagemagick_dependency.sh "${{ matrix.imagemagick }}" $(pwd)
- name: Configure, install, and basic checks
run: |
export NO_INTERACTION=1
export REPORT_EXIT_STATUS=1
export SKIP_SLOW_TESTS=1
export PHP_IMAGICK_VERSION=$(php -r '$sxe = simplexml_load_file ("package.xml"); echo (string) $sxe->version->release;')
export CFLAGS=$(php util/calculate_cflags.php "${{ matrix.php }}" "${{ matrix.imagemagick }}")
echo "CFLAGS are ${CFLAGS}"
phpize
./configure --with-imagick="${HOME}/im/imagemagick-${{ matrix.imagemagick }}"
sudo make install
php -d extension=imagick.so util/check_fonts.php
- name: Run Imagick tests
run: |
export TEST_PHP_EXECUTABLE=`which php`
php run-tests.php -d extension=imagick.so -d extension_dir=modules -n ./*.phpt --show-diff -g FAIL,BORK,WARN,LEAK
export JOBS=$(php util/calculate_test_jobs.php)
php run-tests.php ${JOBS} -d extension=imagick.so -d extension_dir=modules -n ./tests/*.phpt --show-diff -g FAIL,BORK,WARN,LEAK
for i in `ls tests/*.diff 2>/dev/null`; do echo "-- START ${i}"; cat $i; echo "-- END"; done
php ./util/check_version.php
test_all:
name: Full PHP ${{ matrix.php }} - I ${{ matrix.imagemagick }}
needs: test_basic
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [8.4, 8.3, 8.2, 8.1, 8.0, 7.4, 7.3, 7.2, 7.1, 7.0, 5.6, 5.5]
imagemagick: [
7.1.1-41,
7.0.11-14,
7.0.8-4,
7.0.1-0,
git7,
6.9.2-0,
6.8.7-0,
6.7.8-0,
git6,
]
exclude:
- php: 7.4
imagemagick: git7
- php: 7.3
imagemagick: git7
- php: 7.2
imagemagick: git7
- php: 7.1
imagemagick: git7
- php: 7.0
imagemagick: git7
- php: 5.6
imagemagick: git7
- php: 5.5
imagemagick: git7
- php: 5.5
imagemagick: 7.1.1-41
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Apt install required packages
run: |
sudo apt-get update
sudo apt-get install -y fonts-urw-base35 || true
sudo apt-get install -y libfreetype6-dev || true
sudo apt-get install -y texlive-fonts-recommended || true
- name: Cache ImageMagick
uses: actions/cache@v4
env:
cache-name: cache-ImageMagick
with:
path: ~/im/imagemagick-${{ matrix.imagemagick }}
key: ${{ runner.os }}-ImageMagick-${{ matrix.imagemagick }}
- name: Sanity check package.xml and install ImageMagick
run: |
for file in tests/*.phpt; do grep $(basename $file) package.xml >/dev/null || (echo "Missing $file from package.xml" ; exit 1); done
bash ./imagemagick_dependency.sh "${{ matrix.imagemagick }}" $(pwd)
- name: Configure and check fonts are present
run: |
export NO_INTERACTION=1
export REPORT_EXIT_STATUS=1
export SKIP_SLOW_TESTS=1
export PHP_IMAGICK_VERSION=$(php -r '$sxe = simplexml_load_file ("package.xml"); echo (string) $sxe->version->release;')
export CFLAGS=$(php util/calculate_cflags.php "${{ matrix.php }}" "${{ matrix.imagemagick }}")
echo "CFLAGS are ${CFLAGS}"
phpize
./configure --with-imagick="${HOME}/im/imagemagick-${{ matrix.imagemagick }}"
sudo make install
php -d extension=imagick.so util/check_fonts.php
- name: Run Imagick tests
run: |
export TEST_PHP_EXECUTABLE=`which php`
php run-tests.php -d extension=imagick.so -d extension_dir=modules -n ./*.phpt --show-diff -g FAIL,BORK,WARN,LEAK
export JOBS=$(php util/calculate_test_jobs.php)
php run-tests.php ${JOBS} -d extension=imagick.so -d extension_dir=modules -n ./tests/*.phpt --show-diff -g FAIL,BORK,WARN,LEAK
for i in `ls tests/*.diff 2>/dev/null`; do echo "-- START ${i}"; cat $i; echo "-- END"; done
php ./util/check_version.php