Skip to content

Commit 5d375de

Browse files
committed
Use the pre-build dependencies in the Windows release build.
1 parent 2050830 commit 5d375de

File tree

1 file changed

+104
-106
lines changed

1 file changed

+104
-106
lines changed

.github/workflows/windows-release.yml

Lines changed: 104 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
name: windows release
1717
jobs:
1818
change_log:
19-
name: 'Create ChangeLog.md'
19+
name: Create ChangeLog.md
2020
runs-on: ubuntu-latest
2121

2222
steps:
@@ -43,7 +43,7 @@ jobs:
4343
path: artifacts
4444

4545
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}})
4747
needs:
4848
- change_log
4949
runs-on: windows-2022
@@ -55,46 +55,43 @@ jobs:
5555
strategy:
5656
fail-fast: false
5757
matrix:
58-
platform: [ x64, x86 ]
59-
type: [ dll, static ]
58+
architecture: [ x64, x86 ]
59+
buildType: [ dynamic, static ]
6060
quantum: [ Q8, Q16 ]
61-
hdri: [ HDRI, noHDRI ]
61+
hdri: [ hdri, noHdri ]
6262
exclude:
6363
- quantum: Q8
64-
hdri: HDRI
64+
hdri: hdri
6565
include:
66-
- platform: x64
66+
- architecture: x64
6767
bit: 64
68-
- platform: x86
68+
- architecture: x86
6969
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
7575
hdri_flag: '-HDRI'
7676

7777
steps:
78-
- uses: actions/checkout@v4
78+
- name: Clone ImageMagick
79+
uses: actions/checkout@v4
7980
with:
80-
repository: ImageMagick/ImageMagick-Windows
81-
path: ImageMagick-Windows
82-
ref: refs/heads/main
81+
path: ImageMagick
8382

84-
- name: Clone repositories
83+
- name: Download configure
8584
shell: cmd
8685
run: |
87-
cd ImageMagick-Windows
88-
CloneRepositories.IM6.cmd
86+
ImageMagick\.github\build\windows\download-configure.cmd
8987
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
9592
9693
- name: Install Strawberry Perl
97-
if: ${{matrix.type == 'dll'}}
94+
if: ${{matrix.buildType == 'dynamic'}}
9895
shell: cmd
9996
run: |
10097
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:
109106
110107
- name: Configure ImageMagick
111108
shell: cmd
109+
working-directory: Configure
112110
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}}
115112
116113
- name: Build ImageMagick
117114
shell: cmd
118115
run: |
119116
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}}
122118
123119
- name: Build PerlMagick
124-
if: ${{matrix.type == 'dll'}}
120+
if: ${{matrix.architecture == 'dynamic'}}
125121
shell: cmd
126122
run: |
127123
set PATH=
128124
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
129-
cd ImageMagick-Windows\ImageMagick\PerlMagick
125+
cd ImageMagick\PerlMagick
130126
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
131127
perl "Makefile.PL" "MAKE=nmake"
132128
nmake
@@ -140,98 +136,93 @@ jobs:
140136
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
141137
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
142138

143-
- name: Sign binaries
139+
- name: Install sign cli
144140
if: github.event_name != 'pull_request'
145-
uses: azure/[email protected]
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
154153

155154
- name: Create installer
156155
shell: cmd
157156
run: |
158157
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
160159
161160
- name: Sign installer
162161
if: github.event_name != 'pull_request'
163-
uses: azure/[email protected]
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
172170

173171
- name: Get version
174172
id: version
175173
shell: pwsh
176174
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
178176
$version = ($version | Select-String '".*"' -AllMatches | Select -Expand Matches | Select -Expand Value | Out-String)
179177
$version = $version -Replace "`n|`r|""",""
180178
$version = $version -Replace " ","-"
181179
echo "version=$version" >> $env:GITHUB_OUTPUT
182180
183181
- uses: actions/upload-artifact@v4
184182
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'
187185

188186
release_windows_source:
189-
name: 'Windows source'
187+
name: Windows source
190188
needs:
191189
- change_log
192190
runs-on: windows-latest
193191

194192
steps:
195-
- uses: actions/checkout@v4
193+
- name: Clone ImageMagick/Windows
194+
uses: actions/checkout@v4
196195
with:
197-
repository: ImageMagick/ImageMagick-Windows
198-
path: ImageMagick-Windows
196+
repository: ImageMagick/Windows
199197
ref: refs/heads/main
200198

201199
- name: Clone repositories
202200
shell: cmd
203201
run: |
204-
cd ImageMagick-Windows
205-
CloneRepositories.IM6.cmd
202+
clone-repositories-im6.cmd
206203
207204
- name: Download ChangeLog.md
208205
uses: actions/download-artifact@v4
209206
with:
210207
name: ChangeLog
211-
path: ImageMagick-Windows\ImageMagick
208+
path: ImageMagick
212209

213210
- name: Create source archive
214211
shell: cmd
215212
run: |
216-
cd ImageMagick-Windows
217213
mkdir Source
218-
move Build Source
219214
move Configure Source
220215
move Dependencies Source
221216
move ImageMagick Source
222-
move Installer Source
223-
move OptionalDependencies Source
224-
move Artifacts Source
225-
move Projects Source
226217
7z a ImageMagick6-Windows.7z .\Source\*
227218
228219
- uses: actions/upload-artifact@v4
229220
with:
230221
name: ImageMagick6-Windows
231-
path: 'ImageMagick-Windows\ImageMagick6-Windows.7z'
222+
path: ImageMagick6-Windows.7z
232223

233224
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}}
235226
needs:
236227
- change_log
237228
runs-on: windows-2022
@@ -243,51 +234,55 @@ jobs:
243234
strategy:
244235
fail-fast: false
245236
matrix:
246-
platform: [ x64, x86 ]
237+
architecture: [ x64, x86 ]
247238
quantum: [ Q8, Q16 ]
248-
hdri: [ HDRI, noHDRI ]
239+
hdri: [ hdri, noHdri ]
249240
exclude:
250241
- quantum: Q8
251-
hdri: HDRI
242+
hdri: hdri
252243
include:
253-
- platform: x64
244+
- architecture: x64
245+
bit: 64
246+
- architecture: arm64
254247
bit: 64
255-
- platform: x86
248+
- architecture: x86
256249
bit: 32
257-
- hdri: HDRI
250+
- hdri: hdri
258251
hdri_flag: '-HDRI'
259252

260253
steps:
261-
- uses: actions/checkout@v4
254+
- name: Clone ImageMagick
255+
uses: actions/checkout@v4
262256
with:
263-
repository: ImageMagick/ImageMagick-Windows
264-
path: ImageMagick-Windows
265-
ref: refs/heads/main
257+
path: ImageMagick
266258

267-
- name: Clone repositories
259+
- name: Download configure
268260
shell: cmd
269261
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
272268
273269
- name: Download ChangeLog.md
274270
uses: actions/download-artifact@v4
275271
with:
276272
name: ChangeLog
277-
path: ImageMagick-Windows\ImageMagick
273+
path: ImageMagick
278274

279275
- name: Configure ImageMagick
280276
shell: cmd
277+
working-directory: Configure
281278
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
284280
285281
- name: Build ImageMagick
286282
shell: cmd
287283
run: |
288284
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}}
291286
292287
- name: 'Azure CLI login with federated credential'
293288
if: github.event_name != 'pull_request'
@@ -297,39 +292,42 @@ jobs:
297292
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
298293
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
299294

295+
- name: Install sign cli
296+
if: github.event_name != 'pull_request'
297+
run: dotnet tool install --global sign --prerelease
298+
300299
- name: Sign executables
301300
if: github.event_name != 'pull_request'
302-
uses: azure/[email protected]
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
311309

312310
- name: Copy Files
313311
id: package
314312
shell: pwsh
315313
run: |
316314
[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"
320318
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"
325323
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
327325
$version = ($version | Select-String '".*"' -AllMatches | Select -Expand Matches | Select -Expand Value | Out-String)
328326
$version = $version -Replace "`n|`r|""",""
329327
$version = $version -Replace " ","-"
330328
echo "version=$version" >> $env:GITHUB_OUTPUT
331329
332330
- uses: actions/upload-artifact@v4
333331
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}}'
335333
path: portable

0 commit comments

Comments
 (0)