Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/python-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, windows-11-arm, macos-latest]
steps:
- uses: actions/checkout@v4

- name: Set up MSVC x64
if: matrix.os == 'windows-latest'
- name: Set up MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ runner.arch }}

- name: Set up QEMU
if: runner.os == 'Linux'
Expand All @@ -32,7 +34,7 @@ jobs:
env:
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
CIBW_ARCHS_LINUX: "x86_64 i686 aarch64" # ppc64le s390x really slow
CIBW_ARCHS_WINDOWS: "AMD64" # ARM64 Seems ARM64 will rebuild amd64 wheel for unknow reason.
CIBW_ARCHS_WINDOWS: "auto64" # AMD64 on windows-latest, ARM64 on windows-11-arm
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: ""
with:
Expand All @@ -44,12 +46,12 @@ jobs:
name: artifacts-${{ matrix.os }}

- name: Check binaries (Windows)
if: matrix.os == 'windows-latest'
if: runner.os == 'Windows'
run: |
python3.exe suite/check_wheel_bin_arch.py ./wheelhouse/

- name: Check binaries (Unix)
if: matrix.os != 'windows-latest'
if: runner.os != 'Windows'
run: |
./suite/check_wheel_bin_arch.py ./wheelhouse/

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
matrix:
os: [ubuntu-24.04, windows-2022, macOS-14]
python-version: ["3.8", "3.12"]
include:
# CPython does not have a Windows ARM64 release before 3.11
- os: windows-11-arm
python-version: "3.12"

steps:
- uses: actions/checkout@v4
Expand All @@ -24,6 +28,8 @@ jobs:
- name: Setup MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ runner.arch }}

- name: Build and install capstone
run: pip install ./bindings/python
Expand Down
3 changes: 2 additions & 1 deletion suite/check_wheel_bin_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
archs = {
"universal2": ["x86_64", "arm64"],
"x86_64": [r"x86[_-]64"],
"arm64": ["arm64"],
# file reports Windows ARM64 binaries as "ARM64" or "Aarch64", depending on its version
"arm64": [r"arm64|ARM64|Aarch64"],
"aarch64": ["ARM aarch64"],
"i686": ["Intel 80386"],
"win32": [r"INVALID"],
Expand Down
Loading