From 1c8bfdfa74728d91f3cf0e87470253cef7bbe0a7 Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 18:50:24 -0700 Subject: [PATCH 01/14] fix: winarm build --- .github/workflows/build-wheel.yml | 12 +++++++++-- .github/workflows/build.yml | 34 ++++++++++++++++++++++++------- setup.py | 1 + 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 78f53b34..e9291e79 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -88,7 +88,7 @@ jobs: echo "Verifying wheels using twine check" twine check dist/* - - name: Build Windows wheel (x64) + - name: Build Windows wheel if: runner.os == 'Windows' shell: pwsh run: | @@ -107,6 +107,7 @@ jobs: # Download native artifacts Write-Host "Starting artifact download process..." Write-Host "C2PA_VERSION: $env:C2PA_VERSION" + Write-Host "Architecture: ${{ inputs.architecture }}" python scripts/download_artifacts.py "$env:C2PA_VERSION" @@ -115,8 +116,15 @@ jobs: Write-Host "src/c2pa/libs directory contents:" Get-ChildItem -Recurse -Path src/c2pa/libs + # Set platform tag based on architecture + if ("${{ inputs.architecture }}" -eq "arm64") { + $PLATFORM_TAG = "win_arm64" + } else { + $PLATFORM_TAG = "win_amd64" + } + # Build wheel - python setup.py bdist_wheel --plat-name win_amd64 + python setup.py bdist_wheel --plat-name $PLATFORM_TAG # Verify wheel structure twine check dist/* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6cab3c53..9c61fd75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -128,7 +128,16 @@ jobs: github.event.pull_request.user.login == 'dependabot[bot]' || contains(github.event.pull_request.labels.*.name, 'safe to test') - runs-on: windows-latest + runs-on: ${{ matrix.runs-on }} + + strategy: + fail-fast: false + matrix: + include: + - runs-on: windows-latest + python-version: "3.10" + - runs-on: windows-11-arm + python-version: "3.11" # 3.10 has no win-arm64 build in actions/python-versions steps: - name: Checkout repository @@ -137,7 +146,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: ${{ matrix.python-version }} cache: "pip" - name: Install project dependencies @@ -277,13 +286,17 @@ jobs: python-version: "3.10" architecture: ${{ matrix.target }} artifact-name: wheels-windows-${{ matrix.target }} - runs-on: windows-latest + runs-on: ${{ matrix.runs-on }} c2pa-version: ${{ needs.read-version.outputs.c2pa-native-version }} secrets: github-token: ${{ secrets.GITHUB_TOKEN }} strategy: matrix: - target: [x64] + include: + - target: x64 + runs-on: windows-latest + - target: arm64 + runs-on: windows-11-arm if: | github.event_name != 'pull_request' || github.event.pull_request.author_association == 'COLLABORATOR' || @@ -294,10 +307,17 @@ jobs: test-built-windows-wheel: name: Test Windows built wheel needs: build-windows-wheel - runs-on: windows-latest + runs-on: ${{ matrix.runs-on }} strategy: + fail-fast: false matrix: - target: [x64] + include: + - target: x64 + runs-on: windows-latest + python-version: "3.10" + - target: arm64 + runs-on: windows-11-arm + python-version: "3.11" # 3.10 has no win-arm64 build in actions/python-versions if: | github.event_name != 'pull_request' || github.event.pull_request.author_association == 'COLLABORATOR' || @@ -312,7 +332,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: ${{ matrix.python-version }} cache: "pip" - name: Download wheel artifacts diff --git a/setup.py b/setup.py index 489472c1..d482b6fd 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,7 @@ def get_version(): 'aarch64-apple-darwin': 'dylib', 'x86_64-apple-darwin': 'dylib', 'x86_64-pc-windows-msvc': 'dll', + 'aarch64-pc-windows-msvc': 'dll', 'x86_64-unknown-linux-gnu': 'so', 'aarch64-unknown-linux-gnu': 'so', } From c6af85634e5f36f46110ae00902552089f23ee45 Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 18:56:13 -0700 Subject: [PATCH 02/14] fix: Update build --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c61fd75..5b489d21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,6 +149,14 @@ jobs: python-version: ${{ matrix.python-version }} cache: "pip" + - name: Install OpenSSL via vcpkg (Windows ARM64) + if: matrix.runs-on == 'windows-11-arm' + shell: pwsh + run: | + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows + $opensslRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + echo "OPENSSL_DIR=$opensslRoot" >> $env:GITHUB_ENV + - name: Install project dependencies run: python -m pip install -r requirements.txt From 6859f82b0b85bc8eae0f986068169d481086b450 Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 19:10:40 -0700 Subject: [PATCH 03/14] fix: Update build --- scripts/download_artifacts.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/download_artifacts.py b/scripts/download_artifacts.py index c3394494..b0cd33f4 100644 --- a/scripts/download_artifacts.py +++ b/scripts/download_artifacts.py @@ -91,7 +91,7 @@ def get_platform_identifier(target_arch=None): else: return "universal-apple-darwin" elif system == "windows": - if target_arch == "arm64": + if target_arch == "arm64" or machine in ["arm64", "aarch64"]: return "aarch64-pc-windows-msvc" else: return "x86_64-pc-windows-msvc" diff --git a/setup.py b/setup.py index d482b6fd..ddf6e985 100644 --- a/setup.py +++ b/setup.py @@ -79,7 +79,7 @@ def get_platform_identifier(target_arch=None) -> str: else: return "universal-apple-darwin" elif system == "windows": - if target_arch == "arm64": + if target_arch == "arm64" or platform.machine().lower() in ["arm64", "aarch64"]: return "aarch64-pc-windows-msvc" else: return "x86_64-pc-windows-msvc" From 6c6da63c92704fa6d0989ad43b27a0e50adc662b Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 19:26:04 -0700 Subject: [PATCH 04/14] fix: Update build --- src/c2pa/lib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/c2pa/lib.py b/src/c2pa/lib.py index e14f3d6b..37da8cc3 100644 --- a/src/c2pa/lib.py +++ b/src/c2pa/lib.py @@ -37,7 +37,8 @@ def get_platform_identifier() -> str: - universal-apple-darwin (for Mac universal) - aarch64-apple-darwin (for Mac ARM64) - x86_64-apple-darwin (for Mac x86_64) - - x86_64-pc-windows-msvc (for Windows 64-bit) + - x86_64-pc-windows-msvc (for Windows x64) + - aarch64-pc-windows-msvc (for Windows ARM64) - x86_64-unknown-linux-gnu (for Linux 64-bit) - aarch64-unknown-linux-gnu (for Linux ARM) """ @@ -54,6 +55,8 @@ def get_platform_identifier() -> str: else: return "universal-apple-darwin" elif system == "windows": + if _get_architecture() in [CPUArchitecture.ARM64.value, CPUArchitecture.AARCH64.value]: + return "aarch64-pc-windows-msvc" return "x86_64-pc-windows-msvc" elif system == "linux": if _get_architecture() in [CPUArchitecture.ARM64.value, CPUArchitecture.AARCH64.value]: From 2a692d71191c60d59c0ff10d40b2e2d04568c97c Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 19:39:23 -0700 Subject: [PATCH 05/14] fix: Update build --- .github/workflows/build.yml | 4 ++-- src/c2pa/lib.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b489d21..fb3c6108 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,7 +137,7 @@ jobs: - runs-on: windows-latest python-version: "3.10" - runs-on: windows-11-arm - python-version: "3.11" # 3.10 has no win-arm64 build in actions/python-versions + python-version: "3.11" # 3.11 only viable option for win arm actions steps: - name: Checkout repository @@ -325,7 +325,7 @@ jobs: python-version: "3.10" - target: arm64 runs-on: windows-11-arm - python-version: "3.11" # 3.10 has no win-arm64 build in actions/python-versions + python-version: "3.11" # 3.11 only viable option for win arm actions if: | github.event_name != 'pull_request' || github.event.pull_request.author_association == 'COLLABORATOR' || diff --git a/src/c2pa/lib.py b/src/c2pa/lib.py index 37da8cc3..b1caa104 100644 --- a/src/c2pa/lib.py +++ b/src/c2pa/lib.py @@ -84,7 +84,7 @@ def _get_architecture() -> str: elif sys.platform == "win32": # win32 will cover all Windows versions # (the 32 is a historical quirk) - return platform.machine() + return platform.machine().lower() else: raise RuntimeError(f"Unsupported platform: {sys.platform}") From 7f3fb45f997b883b0d76182a7e3c51c2d0a8fb14 Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 19:57:28 -0700 Subject: [PATCH 06/14] fix: Update build --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb3c6108..0e99c072 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -156,6 +156,7 @@ jobs: & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows $opensslRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" echo "OPENSSL_DIR=$opensslRoot" >> $env:GITHUB_ENV + echo "$opensslRoot\bin" >> $env:GITHUB_PATH - name: Install project dependencies run: python -m pip install -r requirements.txt From c5e40a33627c2b5e57eb11e95ecd5240dbb7a945 Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 20:17:33 -0700 Subject: [PATCH 07/14] fix: Update build --- .github/workflows/build.yml | 19 +------------------ requirements-dev.txt | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e99c072..54282c4d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,15 +149,6 @@ jobs: python-version: ${{ matrix.python-version }} cache: "pip" - - name: Install OpenSSL via vcpkg (Windows ARM64) - if: matrix.runs-on == 'windows-11-arm' - shell: pwsh - run: | - & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows - $opensslRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" - echo "OPENSSL_DIR=$opensslRoot" >> $env:GITHUB_ENV - echo "$opensslRoot\bin" >> $env:GITHUB_PATH - - name: Install project dependencies run: python -m pip install -r requirements.txt @@ -361,15 +352,7 @@ jobs: $wheel = Get-ChildItem -Path dist -Filter "c2pa_python-*.whl" | Select-Object -First 1 if (-not $wheel) { Write-Error "No wheel file found in dist directory"; exit 1 } pip install $wheel.FullName - - - name: Run unittest tests on installed wheel - run: | - .\venv\Scripts\activate - python .\tests\test_unit_tests.py - - - name: Install pytest (in venv) - run: | - .\venv\Scripts\activate + pip install -r requirements.txt pip install pytest - name: Run tests with pytest (venv) diff --git a/requirements-dev.txt b/requirements-dev.txt index ab7ae804..34298971 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,7 +16,7 @@ autopep8==2.0.4 # For automatic code formatting flake8==7.3.0 # Test dependencies (for callback signers) -cryptography==47.0.0 +cryptography>=46.0.0 # Documentation Sphinx>=7.3.0 diff --git a/requirements.txt b/requirements.txt index 481efa9f..6a79640c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ # only used in the training example -cryptography>=47.0.0 +cryptography>=46.0.0 From cbc2a0fa93c4cc3a614aab1991d23e20a452623c Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 20:23:57 -0700 Subject: [PATCH 08/14] fix: Update build --- .github/workflows/build-wheel.yml | 23 +++++++++++++++ .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++ requirements-dev.txt | 2 +- requirements.txt | 2 +- 4 files changed, 72 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index e9291e79..d61bca85 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -88,6 +88,29 @@ jobs: echo "Verifying wheels using twine check" twine check dist/* + - name: Set OPENSSL_DIR for Windows ARM64 + if: runner.os == 'Windows' && inputs.architecture == 'arm64' + shell: pwsh + run: | + $candidates = @( + "C:\Program Files\OpenSSL", + "C:\Program Files\OpenSSL-Win64", + "C:\OpenSSL-Win64", + "C:\OpenSSL" + ) + $found = $candidates | Where-Object { Test-Path "$_\include\openssl\ssl.h" } | Select-Object -First 1 + if ($found) { + Write-Host "Found OpenSSL at: $found" + echo "OPENSSL_DIR=$found" >> $env:GITHUB_ENV + echo "$found\bin" >> $env:GITHUB_PATH + } else { + Write-Host "OpenSSL not found in standard locations, installing via vcpkg..." + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV + echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH + } + - name: Build Windows wheel if: runner.os == 'Windows' shell: pwsh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54282c4d..69c5eda8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,6 +149,30 @@ jobs: python-version: ${{ matrix.python-version }} cache: "pip" + - name: Set OPENSSL_DIR for Windows ARM64 + if: matrix.runs-on == 'windows-11-arm' + shell: pwsh + run: | + # Find pre-installed OpenSSL (runner ships with OpenSSL 3.x) + $candidates = @( + "C:\Program Files\OpenSSL", + "C:\Program Files\OpenSSL-Win64", + "C:\OpenSSL-Win64", + "C:\OpenSSL" + ) + $found = $candidates | Where-Object { Test-Path "$_\include\openssl\ssl.h" } | Select-Object -First 1 + if ($found) { + Write-Host "Found OpenSSL at: $found" + echo "OPENSSL_DIR=$found" >> $env:GITHUB_ENV + echo "$found\bin" >> $env:GITHUB_PATH + } else { + Write-Host "OpenSSL not found in standard locations, installing via vcpkg..." + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV + echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH + } + - name: Install project dependencies run: python -m pip install -r requirements.txt @@ -341,6 +365,29 @@ jobs: name: wheels-windows-${{ matrix.target }} path: dist + - name: Set OPENSSL_DIR for Windows ARM64 + if: matrix.runs-on == 'windows-11-arm' + shell: pwsh + run: | + $candidates = @( + "C:\Program Files\OpenSSL", + "C:\Program Files\OpenSSL-Win64", + "C:\OpenSSL-Win64", + "C:\OpenSSL" + ) + $found = $candidates | Where-Object { Test-Path "$_\include\openssl\ssl.h" } | Select-Object -First 1 + if ($found) { + Write-Host "Found OpenSSL at: $found" + echo "OPENSSL_DIR=$found" >> $env:GITHUB_ENV + echo "$found\bin" >> $env:GITHUB_PATH + } else { + Write-Host "OpenSSL not found, installing via vcpkg..." + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV + echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH + } + - name: Create and activate virtual environment run: | python -m venv venv diff --git a/requirements-dev.txt b/requirements-dev.txt index 34298971..ee2f324e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,7 +16,7 @@ autopep8==2.0.4 # For automatic code formatting flake8==7.3.0 # Test dependencies (for callback signers) -cryptography>=46.0.0 +cryptography>=47.0.0 # Documentation Sphinx>=7.3.0 diff --git a/requirements.txt b/requirements.txt index 6a79640c..481efa9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ # only used in the training example -cryptography>=46.0.0 +cryptography>=47.0.0 From ad3bc30100b7ca36e1d4fac6db3138b8a6ca82f7 Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 20:24:39 -0700 Subject: [PATCH 09/14] fix: Update build --- requirements-dev.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index ee2f324e..17adee70 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,8 +16,8 @@ autopep8==2.0.4 # For automatic code formatting flake8==7.3.0 # Test dependencies (for callback signers) -cryptography>=47.0.0 - +cryptography=47.0.0 + # Documentation Sphinx>=7.3.0 sphinx-autoapi>=3.0.0 From a6ac1a5132b690359575871cdb35108f2e8c90e5 Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 20:25:06 -0700 Subject: [PATCH 10/14] fix: Update build --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 17adee70..1077f810 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,7 +16,7 @@ autopep8==2.0.4 # For automatic code formatting flake8==7.3.0 # Test dependencies (for callback signers) -cryptography=47.0.0 +cryptography==47.0.0 # Documentation Sphinx>=7.3.0 From dcad2b009ce8259633cf1601a9dbd7592776b50c Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 20:28:38 -0700 Subject: [PATCH 11/14] fix: Update build --- .github/workflows/build-wheel.yml | 25 ++++----------- .github/workflows/build.yml | 51 ++++++++----------------------- 2 files changed, 18 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index d61bca85..5f5ae337 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -88,28 +88,15 @@ jobs: echo "Verifying wheels using twine check" twine check dist/* - - name: Set OPENSSL_DIR for Windows ARM64 + - name: Install ARM64 OpenSSL via vcpkg (Windows ARM64) if: runner.os == 'Windows' && inputs.architecture == 'arm64' shell: pwsh run: | - $candidates = @( - "C:\Program Files\OpenSSL", - "C:\Program Files\OpenSSL-Win64", - "C:\OpenSSL-Win64", - "C:\OpenSSL" - ) - $found = $candidates | Where-Object { Test-Path "$_\include\openssl\ssl.h" } | Select-Object -First 1 - if ($found) { - Write-Host "Found OpenSSL at: $found" - echo "OPENSSL_DIR=$found" >> $env:GITHUB_ENV - echo "$found\bin" >> $env:GITHUB_PATH - } else { - Write-Host "OpenSSL not found in standard locations, installing via vcpkg..." - & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows - $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" - echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV - echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH - } + # Pre-installed OpenSSL on runner is x64 — unusable for ARM64 cargo builds. + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV + echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH - name: Build Windows wheel if: runner.os == 'Windows' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69c5eda8..61740e4c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,29 +149,16 @@ jobs: python-version: ${{ matrix.python-version }} cache: "pip" - - name: Set OPENSSL_DIR for Windows ARM64 + - name: Install ARM64 OpenSSL via vcpkg (Windows ARM64) if: matrix.runs-on == 'windows-11-arm' shell: pwsh run: | - # Find pre-installed OpenSSL (runner ships with OpenSSL 3.x) - $candidates = @( - "C:\Program Files\OpenSSL", - "C:\Program Files\OpenSSL-Win64", - "C:\OpenSSL-Win64", - "C:\OpenSSL" - ) - $found = $candidates | Where-Object { Test-Path "$_\include\openssl\ssl.h" } | Select-Object -First 1 - if ($found) { - Write-Host "Found OpenSSL at: $found" - echo "OPENSSL_DIR=$found" >> $env:GITHUB_ENV - echo "$found\bin" >> $env:GITHUB_PATH - } else { - Write-Host "OpenSSL not found in standard locations, installing via vcpkg..." - & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows - $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" - echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV - echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH - } + # Pre-installed OpenSSL on runner is x64 — unusable for ARM64 cargo builds. + # Use vcpkg to get ARM64-native OpenSSL libs. + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV + echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH - name: Install project dependencies run: python -m pip install -r requirements.txt @@ -365,28 +352,14 @@ jobs: name: wheels-windows-${{ matrix.target }} path: dist - - name: Set OPENSSL_DIR for Windows ARM64 + - name: Install ARM64 OpenSSL via vcpkg (Windows ARM64) if: matrix.runs-on == 'windows-11-arm' shell: pwsh run: | - $candidates = @( - "C:\Program Files\OpenSSL", - "C:\Program Files\OpenSSL-Win64", - "C:\OpenSSL-Win64", - "C:\OpenSSL" - ) - $found = $candidates | Where-Object { Test-Path "$_\include\openssl\ssl.h" } | Select-Object -First 1 - if ($found) { - Write-Host "Found OpenSSL at: $found" - echo "OPENSSL_DIR=$found" >> $env:GITHUB_ENV - echo "$found\bin" >> $env:GITHUB_PATH - } else { - Write-Host "OpenSSL not found, installing via vcpkg..." - & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows - $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" - echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV - echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH - } + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV + echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH - name: Create and activate virtual environment run: | From 292b5519491e40151883affd36fa74b07c70437b Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 20:44:38 -0700 Subject: [PATCH 12/14] fix: Update build --- .github/workflows/build-wheel.yml | 9 +++++---- .github/workflows/build.yml | 17 ++++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 5f5ae337..096d28f4 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -92,11 +92,12 @@ jobs: if: runner.os == 'Windows' && inputs.architecture == 'arm64' shell: pwsh run: | - # Pre-installed OpenSSL on runner is x64 — unusable for ARM64 cargo builds. - & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows - $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + # Static-md triplet: static OpenSSL libs, dynamic CRT. + # Static linking avoids runtime DLL load issues. + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md" echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV - echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH + echo "OPENSSL_STATIC=1" >> $env:GITHUB_ENV - name: Build Windows wheel if: runner.os == 'Windows' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61740e4c..32d66188 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -154,11 +154,12 @@ jobs: shell: pwsh run: | # Pre-installed OpenSSL on runner is x64 — unusable for ARM64 cargo builds. - # Use vcpkg to get ARM64-native OpenSSL libs. - & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows - $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + # Use static-md triplet: static OpenSSL libs, dynamic CRT (matches Python). + # Static linking avoids runtime DLL search issues (Python 3.8+ ignores PATH for .pyd deps). + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md" echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV - echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH + echo "OPENSSL_STATIC=1" >> $env:GITHUB_ENV - name: Install project dependencies run: python -m pip install -r requirements.txt @@ -356,10 +357,12 @@ jobs: if: matrix.runs-on == 'windows-11-arm' shell: pwsh run: | - & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows - $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows" + # Static-md triplet: static OpenSSL libs, dynamic CRT. + # Static linking avoids runtime DLL load issues. + & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md + $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md" echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV - echo "$vcpkgRoot\bin" >> $env:GITHUB_PATH + echo "OPENSSL_STATIC=1" >> $env:GITHUB_ENV - name: Create and activate virtual environment run: | From f01f4bcd3cba0ac19b5ba8c4743b8578e024fe6f Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 21:03:40 -0700 Subject: [PATCH 13/14] fix: Update build --- .github/workflows/build.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32d66188..e970c93a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,7 +137,7 @@ jobs: - runs-on: windows-latest python-version: "3.10" - runs-on: windows-11-arm - python-version: "3.11" # 3.11 only viable option for win arm actions + python-version: "3.11" # win-arm runner needs 3.11 atleast steps: - name: Checkout repository @@ -153,9 +153,8 @@ jobs: if: matrix.runs-on == 'windows-11-arm' shell: pwsh run: | - # Pre-installed OpenSSL on runner is x64 — unusable for ARM64 cargo builds. - # Use static-md triplet: static OpenSSL libs, dynamic CRT (matches Python). - # Static linking avoids runtime DLL search issues (Python 3.8+ ignores PATH for .pyd deps). + # Pre-installed OpenSSL on runner fails build. + # Static OpenSSL to avoid runtime DLL load complexities. & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md" echo "OPENSSL_DIR=$vcpkgRoot" >> $env:GITHUB_ENV @@ -329,7 +328,7 @@ jobs: python-version: "3.10" - target: arm64 runs-on: windows-11-arm - python-version: "3.11" # 3.11 only viable option for win arm actions + python-version: "3.11" # win-arm runner needs 3.11 atleast if: | github.event_name != 'pull_request' || github.event.pull_request.author_association == 'COLLABORATOR' || @@ -357,7 +356,6 @@ jobs: if: matrix.runs-on == 'windows-11-arm' shell: pwsh run: | - # Static-md triplet: static OpenSSL libs, dynamic CRT. # Static linking avoids runtime DLL load issues. & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md" From ff8b375bd5f8751270524a9a17e638cbb892bd6d Mon Sep 17 00:00:00 2001 From: tmathern <60901087+tmathern@users.noreply.github.com> Date: Mon, 25 May 2026 21:04:35 -0700 Subject: [PATCH 14/14] Update build-wheel.yml --- .github/workflows/build-wheel.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 096d28f4..33352fb8 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -92,7 +92,6 @@ jobs: if: runner.os == 'Windows' && inputs.architecture == 'arm64' shell: pwsh run: | - # Static-md triplet: static OpenSSL libs, dynamic CRT. # Static linking avoids runtime DLL load issues. & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md $vcpkgRoot = "$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md" @@ -207,4 +206,4 @@ jobs: with: name: ${{ inputs.artifact-name }} path: dist - if-no-files-found: error \ No newline at end of file + if-no-files-found: error