16
16
name : windows release
17
17
jobs :
18
18
change_log :
19
- name : ' Create ChangeLog.md'
19
+ name : Create ChangeLog.md
20
20
runs-on : ubuntu-latest
21
21
22
22
steps :
43
43
path : artifacts
44
44
45
45
release_windows_installer :
46
- name : ' Windows ${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.platform }} (${{matrix.type }})'
46
+ name : Windows ${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.architecture }} (${{matrix.typeName }})
47
47
needs :
48
48
- change_log
49
49
runs-on : windows-2022
@@ -55,46 +55,43 @@ jobs:
55
55
strategy :
56
56
fail-fast : false
57
57
matrix :
58
- platform : [ x64, x86 ]
59
- type : [ dll , static ]
58
+ architecture : [ x64, x86 ]
59
+ buildType : [ dynamic , static ]
60
60
quantum : [ Q8, Q16 ]
61
- hdri : [ HDRI, noHDRI ]
61
+ hdri : [ hdri, noHdri ]
62
62
exclude :
63
63
- quantum : Q8
64
- hdri : HDRI
64
+ hdri : hdri
65
65
include :
66
- - platform : x64
66
+ - architecture : x64
67
67
bit : 64
68
- - platform : x86
68
+ - architecture : x86
69
69
bit : 32
70
- - type : dll
71
- type_flag : dmt
72
- - type : static
73
- type_flag : smtd
74
- - hdri : HDRI
70
+ - buildType : dynamic
71
+ typeName : dll
72
+ - buildType : static
73
+ typeName : static
74
+ - hdri : hdri
75
75
hdri_flag : ' -HDRI'
76
76
77
77
steps :
78
- - uses : actions/checkout@v4
78
+ - name : Clone ImageMagick
79
+ uses : actions/checkout@v4
79
80
with :
80
- repository : ImageMagick/ImageMagick-Windows
81
- path : ImageMagick-Windows
82
- ref : refs/heads/main
81
+ path : ImageMagick
83
82
84
- - name : Clone repositories
83
+ - name : Download configure
85
84
shell : cmd
86
85
run : |
87
- cd ImageMagick-Windows
88
- CloneRepositories.IM6.cmd
86
+ ImageMagick\.github\build\windows\download-configure.cmd
89
87
90
- - name : Download ChangeLog.md
91
- uses : actions/download-artifact@v4
92
- with :
93
- name : ChangeLog
94
- path : ImageMagick-Windows\ImageMagick
88
+ - name : Download dependencies
89
+ shell : cmd
90
+ run : |
91
+ ImageMagick\.github\build\windows\download-dependencies.cmd windows-${{matrix.architecture}}-${{matrix.buildType}}-openMP.zip
95
92
96
93
- name : Install Strawberry Perl
97
- if : ${{matrix.type == 'dll '}}
94
+ if : ${{matrix.buildType == 'dynamic '}}
98
95
shell : cmd
99
96
run : |
100
97
powershell Invoke-WebRequest -Uri https://github.com/ImageMagick/ImageMagick-Windows/releases/download/20200615/strawberry-perl-5.30.2.1-${{matrix.bit}}bit.msi -OutFile strawberry-perl-5.30.2.1-${{matrix.bit}}bit.msi
@@ -109,24 +106,23 @@ jobs:
109
106
110
107
- name : Configure ImageMagick
111
108
shell : cmd
109
+ working-directory : Configure
112
110
run : |
113
- cd ImageMagick-Windows\Configure
114
- Configure.Release.x64.exe /noWizard /VS2022 /includeOptional /installedSupport /deprecated /${{matrix.hdri}} /${{matrix.quantum}} /${{matrix.platform}} /${{matrix.type_flag}}
111
+ Configure.Release.x64.exe /noWizard /VS2022 /installedSupport /deprecated /${{matrix.hdri}} /${{matrix.quantum}} /${{matrix.architecture}} /${{matrix.buildType}}
115
112
116
113
- name : Build ImageMagick
117
114
shell : cmd
118
115
run : |
119
116
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
120
- cd ImageMagick-Windows
121
- msbuild /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.platform}}
117
+ msbuild /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.architecture}}
122
118
123
119
- name : Build PerlMagick
124
- if : ${{matrix.type == 'dll '}}
120
+ if : ${{matrix.architecture == 'dynamic '}}
125
121
shell : cmd
126
122
run : |
127
123
set PATH=
128
124
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
129
- cd ImageMagick-Windows\ImageMagick \PerlMagick
125
+ cd ImageMagick\PerlMagick
130
126
set PATH=%PATH%;C:\Strawberry${{matrix.bit}}\c\bin;C:\Strawberry${{matrix.bit}}\perl\site\bin;C:\Strawberry${{matrix.bit}}\perl\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0
131
127
perl "Makefile.PL" "MAKE=nmake"
132
128
nmake
@@ -140,98 +136,93 @@ jobs:
140
136
tenant-id : ${{ secrets.AZURE_TENANT_ID }}
141
137
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
142
138
143
- - name : Sign binaries
139
+ - name : Install sign cli
144
140
if : github.event_name != 'pull_request'
145
-
146
- with :
147
- endpoint : https://eus.codesigning.azure.net/
148
- trusted-signing-account-name : ImageMagick
149
- certificate-profile-name : ImageMagick
150
- files-folder : ' ImageMagick-Windows\Artifacts\bin'
151
- files-folder-filter : dll,exe
152
- append-signature : true
153
- timeout : 600
141
+ run : dotnet tool install --global sign --prerelease
142
+
143
+ - name : Sign executables and libraries
144
+ if : github.event_name != 'pull_request'
145
+ run : sign code trusted-signing `
146
+ --trusted-signing-account ImageMagick `
147
+ --trusted-signing-certificate-profile ImageMagick `
148
+ --trusted-signing-endpoint https://eus.codesigning.azure.net `
149
+ --azure-credential-type azure-cli `
150
+ --verbosity information `
151
+ *.exe *.dll
152
+ working-directory : Artifacts/bin
154
153
155
154
- name : Create installer
156
155
shell : cmd
157
156
run : |
158
157
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
159
- "C:\Program Files (x86)\Inno Setup 6\iscc.exe" ImageMagick-Windows \Installer\Inno\ImageMagick.iss
158
+ "C:\Program Files (x86)\Inno Setup 6\iscc.exe" Configure \Installer\Inno\ImageMagick.iss
160
159
161
160
- name : Sign installer
162
161
if : github.event_name != 'pull_request'
163
-
164
- with :
165
- endpoint : https://eus.codesigning.azure.net/
166
- trusted-signing-account-name : ImageMagick
167
- certificate-profile-name : ImageMagick
168
- files-folder : ' ImageMagick-Windows\Installer\Inno\Artifacts'
169
- files-folder-filter : dll,exe
170
- append-signature : true
171
- timeout : 600
162
+ run : sign code trusted-signing `
163
+ --trusted-signing-account ImageMagick `
164
+ --trusted-signing-certificate-profile ImageMagick `
165
+ --trusted-signing-endpoint https://eus.codesigning.azure.net `
166
+ --azure-credential-type azure-cli `
167
+ --verbosity information `
168
+ *.exe
169
+ working-directory : Configure/Installer/Inno/Artifacts
172
170
173
171
- name : Get version
174
172
id : version
175
173
shell : pwsh
176
174
run : |
177
- $version = (cat "ImageMagick-Windows \Installer\Inno\config.isx" | Select-String "MagickPackageFullVersionText") | Out-String
175
+ $version = (cat "Configure \Installer\Inno\config.isx" | Select-String "MagickPackageFullVersionText") | Out-String
178
176
$version = ($version | Select-String '".*"' -AllMatches | Select -Expand Matches | Select -Expand Value | Out-String)
179
177
$version = $version -Replace "`n|`r|""",""
180
178
$version = $version -Replace " ","-"
181
179
echo "version=$version" >> $env:GITHUB_OUTPUT
182
180
183
181
- uses : actions/upload-artifact@v4
184
182
with :
185
- name : ' ImageMagick-${{steps.version.outputs.version}}-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.type }}-${{matrix.platform }}'
186
- path : ' ImageMagick-Windows \Installer\Inno\Artifacts'
183
+ name : ' ImageMagick-${{steps.version.outputs.version}}-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.typeName }}-${{matrix.architecture }}'
184
+ path : ' Configure \Installer\Inno\Artifacts'
187
185
188
186
release_windows_source :
189
- name : ' Windows source'
187
+ name : Windows source
190
188
needs :
191
189
- change_log
192
190
runs-on : windows-latest
193
191
194
192
steps :
195
- - uses : actions/checkout@v4
193
+ - name : Clone ImageMagick/Windows
194
+ uses : actions/checkout@v4
196
195
with :
197
- repository : ImageMagick/ImageMagick-Windows
198
- path : ImageMagick-Windows
196
+ repository : ImageMagick/Windows
199
197
ref : refs/heads/main
200
198
201
199
- name : Clone repositories
202
200
shell : cmd
203
201
run : |
204
- cd ImageMagick-Windows
205
- CloneRepositories.IM6.cmd
202
+ clone-repositories-im6.cmd
206
203
207
204
- name : Download ChangeLog.md
208
205
uses : actions/download-artifact@v4
209
206
with :
210
207
name : ChangeLog
211
- path : ImageMagick-Windows\ImageMagick
208
+ path : ImageMagick
212
209
213
210
- name : Create source archive
214
211
shell : cmd
215
212
run : |
216
- cd ImageMagick-Windows
217
213
mkdir Source
218
- move Build Source
219
214
move Configure Source
220
215
move Dependencies Source
221
216
move ImageMagick Source
222
- move Installer Source
223
- move OptionalDependencies Source
224
- move Artifacts Source
225
- move Projects Source
226
217
7z a ImageMagick6-Windows.7z .\Source\*
227
218
228
219
- uses : actions/upload-artifact@v4
229
220
with :
230
221
name : ImageMagick6-Windows
231
- path : ' ImageMagick-Windows\ ImageMagick6-Windows.7z'
222
+ path : ImageMagick6-Windows.7z
232
223
233
224
release_windows_portable :
234
- name : ' Windows portable ${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.platform}} '
225
+ name : Windows portable ${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.architecture}}
235
226
needs :
236
227
- change_log
237
228
runs-on : windows-2022
@@ -243,51 +234,55 @@ jobs:
243
234
strategy :
244
235
fail-fast : false
245
236
matrix :
246
- platform : [ x64, x86 ]
237
+ architecture : [ x64, x86 ]
247
238
quantum : [ Q8, Q16 ]
248
- hdri : [ HDRI, noHDRI ]
239
+ hdri : [ hdri, noHdri ]
249
240
exclude :
250
241
- quantum : Q8
251
- hdri : HDRI
242
+ hdri : hdri
252
243
include :
253
- - platform : x64
244
+ - architecture : x64
245
+ bit : 64
246
+ - architecture : arm64
254
247
bit : 64
255
- - platform : x86
248
+ - architecture : x86
256
249
bit : 32
257
- - hdri : HDRI
250
+ - hdri : hdri
258
251
hdri_flag : ' -HDRI'
259
252
260
253
steps :
261
- - uses : actions/checkout@v4
254
+ - name : Clone ImageMagick
255
+ uses : actions/checkout@v4
262
256
with :
263
- repository : ImageMagick/ImageMagick-Windows
264
- path : ImageMagick-Windows
265
- ref : refs/heads/main
257
+ path : ImageMagick
266
258
267
- - name : Clone repositories
259
+ - name : Download configure
268
260
shell : cmd
269
261
run : |
270
- cd ImageMagick-Windows
271
- CloneRepositories.IM6.cmd
262
+ ImageMagick\.github\build\windows\download-configure.cmd
263
+
264
+ - name : Download dependencies
265
+ shell : cmd
266
+ run : |
267
+ ImageMagick\.github\build\windows\download-dependencies.cmd windows-${{matrix.architecture}}-static-openMP.zip
272
268
273
269
- name : Download ChangeLog.md
274
270
uses : actions/download-artifact@v4
275
271
with :
276
272
name : ChangeLog
277
- path : ImageMagick-Windows\ImageMagick
273
+ path : ImageMagick
278
274
279
275
- name : Configure ImageMagick
280
276
shell : cmd
277
+ working-directory : Configure
281
278
run : |
282
- cd ImageMagick-Windows\Configure
283
- Configure.Release.x64.exe /noWizard /VS2022 /${{matrix.hdri}} /${{matrix.quantum}} /${{matrix.platform}} /smt
279
+ Configure.Release.x64.exe /noWizard /VS2022 /onlyMagick /${{matrix.hdri}} /${{matrix.quantum}} /${{matrix.architecture}} /static
284
280
285
281
- name : Build ImageMagick
286
282
shell : cmd
287
283
run : |
288
284
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
289
- cd ImageMagick-Windows
290
- msbuild /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.platform}}
285
+ msbuild /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.architecture}}
291
286
292
287
- name : ' Azure CLI login with federated credential'
293
288
if : github.event_name != 'pull_request'
@@ -297,39 +292,42 @@ jobs:
297
292
tenant-id : ${{ secrets.AZURE_TENANT_ID }}
298
293
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
299
294
295
+ - name : Install sign cli
296
+ if : github.event_name != 'pull_request'
297
+ run : dotnet tool install --global sign --prerelease
298
+
300
299
- name : Sign executables
301
300
if : github.event_name != 'pull_request'
302
-
303
- with :
304
- endpoint : https://eus.codesigning.azure.net/
305
- trusted-signing-account-name : ImageMagick
306
- certificate-profile-name : ImageMagick
307
- files-folder : ' ImageMagick-Windows\Artifacts\bin'
308
- files-folder-filter : exe
309
- append-signature : true
310
- timeout : 600
301
+ run : sign code trusted-signing `
302
+ --trusted-signing-account ImageMagick `
303
+ --trusted-signing-certificate-profile ImageMagick `
304
+ --trusted-signing-endpoint https://eus.codesigning.azure.net `
305
+ --azure-credential-type azure-cli `
306
+ --verbosity information `
307
+ *.exe
308
+ working-directory : Artifacts/bin
311
309
312
310
- name : Copy Files
313
311
id : package
314
312
shell : pwsh
315
313
run : |
316
314
[void](New-Item -Name "portable" -ItemType directory)
317
- Copy-Item "ImageMagick-Windows\ Artifacts\bin\*.exe" "portable"
318
- Copy-Item "ImageMagick-Windows\ Artifacts\bin\*.xml" "portable"
319
- Copy-Item "ImageMagick-Windows\ Artifacts\bin\sRGB.icc" "portable"
315
+ Copy-Item "Artifacts\bin\*.exe" "portable"
316
+ Copy-Item "Artifacts\bin\*.xml" "portable"
317
+ Copy-Item "Artifacts\bin\sRGB.icc" "portable"
320
318
321
- Copy-Item "ImageMagick-Windows\ Artifacts\NOTICE.txt" "portable"
322
- Copy-Item "ImageMagick-Windows\ImageMagick \ChangeLog.md" "portable"
323
- Copy-Item "ImageMagick-Windows\ImageMagick \README.txt" "portable"
324
- Copy-Item "ImageMagick-Windows\ImageMagick \LICENSE" "portable\LICENSE.txt"
319
+ Copy-Item "Artifacts\NOTICE.txt" "portable"
320
+ Copy-Item "ImageMagick\ChangeLog.md" "portable"
321
+ Copy-Item "ImageMagick\README.txt" "portable"
322
+ Copy-Item "ImageMagick\LICENSE" "portable\LICENSE.txt"
325
323
326
- $version = (cat "ImageMagick-Windows \Installer\Inno\config.isx" | Select-String "MagickPackageFullVersionText") | Out-String
324
+ $version = (cat "Configure \Installer\Inno\config.isx" | Select-String "MagickPackageFullVersionText") | Out-String
327
325
$version = ($version | Select-String '".*"' -AllMatches | Select -Expand Matches | Select -Expand Value | Out-String)
328
326
$version = $version -Replace "`n|`r|""",""
329
327
$version = $version -Replace " ","-"
330
328
echo "version=$version" >> $env:GITHUB_OUTPUT
331
329
332
330
- uses : actions/upload-artifact@v4
333
331
with :
334
- name : ' ImageMagick-${{steps.package.outputs.version}}-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.platform }}'
332
+ name : ' ImageMagick-${{steps.package.outputs.version}}-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.architecture }}'
335
333
path : portable
0 commit comments