@@ -128,7 +128,16 @@ jobs:
128128 github.event.pull_request.user.login == 'dependabot[bot]' ||
129129 contains(github.event.pull_request.labels.*.name, 'safe to test')
130130
131- runs-on : windows-latest
131+ runs-on : ${{ matrix.runs-on }}
132+
133+ strategy :
134+ fail-fast : false
135+ matrix :
136+ include :
137+ - runs-on : windows-latest
138+ python-version : " 3.10"
139+ - runs-on : windows-11-arm
140+ python-version : " 3.11" # win-arm runner needs 3.11 atleast
132141
133142 steps :
134143 - name : Checkout repository
@@ -137,9 +146,20 @@ jobs:
137146 - name : Set up Python
138147 uses : actions/setup-python@v5
139148 with :
140- python-version : " 3.10 "
149+ python-version : ${{ matrix.python-version }}
141150 cache : " pip"
142151
152+ - name : Install ARM64 OpenSSL via vcpkg (Windows ARM64)
153+ if : matrix.runs-on == 'windows-11-arm'
154+ shell : pwsh
155+ run : |
156+ # Pre-installed OpenSSL on runner fails build.
157+ # Static OpenSSL to avoid runtime DLL load complexities.
158+ & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md
159+ $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md"
160+ echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV
161+ echo "OPENSSL_STATIC=1" >> $env:GITHUB_ENV
162+
143163 - name : Install project dependencies
144164 run : python -m pip install -r requirements.txt
145165
@@ -277,13 +297,17 @@ jobs:
277297 python-version : " 3.10"
278298 architecture : ${{ matrix.target }}
279299 artifact-name : wheels-windows-${{ matrix.target }}
280- runs-on : windows-latest
300+ runs-on : ${{ matrix.runs-on }}
281301 c2pa-version : ${{ needs.read-version.outputs.c2pa-native-version }}
282302 secrets :
283303 github-token : ${{ secrets.GITHUB_TOKEN }}
284304 strategy :
285305 matrix :
286- target : [x64]
306+ include :
307+ - target : x64
308+ runs-on : windows-latest
309+ - target : arm64
310+ runs-on : windows-11-arm
287311 if : |
288312 github.event_name != 'pull_request' ||
289313 github.event.pull_request.author_association == 'COLLABORATOR' ||
@@ -294,10 +318,17 @@ jobs:
294318 test-built-windows-wheel :
295319 name : Test Windows built wheel
296320 needs : build-windows-wheel
297- runs-on : windows-latest
321+ runs-on : ${{ matrix.runs-on }}
298322 strategy :
323+ fail-fast : false
299324 matrix :
300- target : [x64]
325+ include :
326+ - target : x64
327+ runs-on : windows-latest
328+ python-version : " 3.10"
329+ - target : arm64
330+ runs-on : windows-11-arm
331+ python-version : " 3.11" # win-arm runner needs 3.11 atleast
301332 if : |
302333 github.event_name != 'pull_request' ||
303334 github.event.pull_request.author_association == 'COLLABORATOR' ||
@@ -312,7 +343,7 @@ jobs:
312343 - name : Set up Python
313344 uses : actions/setup-python@v5
314345 with :
315- python-version : " 3.10 "
346+ python-version : ${{ matrix.python-version }}
316347 cache : " pip"
317348
318349 - name : Download wheel artifacts
@@ -321,6 +352,16 @@ jobs:
321352 name : wheels-windows-${{ matrix.target }}
322353 path : dist
323354
355+ - name : Install ARM64 OpenSSL via vcpkg (Windows ARM64)
356+ if : matrix.runs-on == 'windows-11-arm'
357+ shell : pwsh
358+ run : |
359+ # Static linking avoids runtime DLL load issues.
360+ & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md
361+ $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md"
362+ echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV
363+ echo "OPENSSL_STATIC=1" >> $env:GITHUB_ENV
364+
324365 - name : Create and activate virtual environment
325366 run : |
326367 python -m venv venv
@@ -332,15 +373,7 @@ jobs:
332373 $wheel = Get-ChildItem -Path dist -Filter "c2pa_python-*.whl" | Select-Object -First 1
333374 if (-not $wheel) { Write-Error "No wheel file found in dist directory"; exit 1 }
334375 pip install $wheel.FullName
335-
336- - name : Run unittest tests on installed wheel
337- run : |
338- .\venv\Scripts\activate
339- python .\tests\test_unit_tests.py
340-
341- - name : Install pytest (in venv)
342- run : |
343- .\venv\Scripts\activate
376+ pip install -r requirements.txt
344377 pip install pytest
345378
346379 - name : Run tests with pytest (venv)
0 commit comments