Skip to content

Commit

Permalink
feat: Support building Windows arm64 wheel
Browse files Browse the repository at this point in the history
Since the ARM64 Windows wheel is built leveraging cross-compilation on a
Windows 64-bit runner, there is no testing available.

See https://cibuildwheel.readthedocs.io/en/stable/options/#archs
  • Loading branch information
jcfr committed Feb 27, 2024
1 parent 91a3d75 commit 056e423
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,18 @@ jobs:
- run: pipx run twine check --strict all/*/*

build_wheels:
name: Wheel on ${{ matrix.os }}
name: Wheel on ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

include:
- os: windows-latest
arch: "ARM64"
test-skip: "*-win_arm64"

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -94,6 +99,8 @@ jobs:
- uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_BUILD: "cp312-*"
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_TEST_SKIP: "${{ matrix.test-skip }}"

- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down
7 changes: 6 additions & 1 deletion s5cmdUrls.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ set(win32_sha256 "ee667eb01b955a7dda588456bd102982f8344bed393a8b63b5d4c9c
set(win64_filename "s5cmd_${version}_Windows-64bit.zip")
set(win64_sha256 "f7c311907c78efa56e27a25fba1f87520754c402bbe1cb4901d3522f12a75497")

set(winarm64_filename "s5cmd_${version}_Windows-arm64.zip")
set(winarm64_sha256 "61e0adf3635334fa62714a5cf221e03f3549392e9613f9a7591a03d8e6fe0d64")

cmake_host_system_information(RESULT is_64bit QUERY IS_64BIT)

Expand All @@ -40,8 +42,11 @@ endif()

if(WIN32)
set(archive "win32")
if(is_64bit AND NOT (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64"))
if(is_64bit)
set(archive "win64")
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64" OR "$ENV{SETUPTOOLS_EXT_SUFFIX}" MATCHES arm64)
set(archive "winarm64")
endif()
endif()
endif()

Expand Down

0 comments on commit 056e423

Please sign in to comment.