diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51ef4d671f..ef7e3e3c0e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,7 @@ env: COMMON_PATCHES: > .github/setup-py-version-post4.patch .github/setup-py-windows-cmake-options.patch + .github/setup-py-windows-arm64-platform.patch .github/python-hide-symbols.patch .github/python-wasm-side-module.patch .github/hdf5-dont-atexit-emscripten.patch @@ -24,6 +25,7 @@ jobs: # platform CIBW_PLATFORM (default auto) # build CIBW_BUILD (default *, i.e. all) # patches space-separated setup patches (default: Windows one) + # artifact artifact-name suffix override (default: build || arch) # sdist also build + upload the sdist artifact (default: off) include: - os: ubuntu-22.04 @@ -38,11 +40,11 @@ jobs: env: ADIOS2: "OFF" - # builds faster on Travis-CI: - #- os: ubuntu-20.04 - # arch: "aarch64" + - os: ubuntu-24.04-arm + arch: "aarch64" - # builds faster on Travis-CI: + # ppc64le was only ever built on the (now retired) Travis-CI; there is no + # free GitHub-hosted ppc64le runner, so these wheels are no longer produced. #- os: ubuntu-20.04 # arch: "ppc64le" @@ -63,6 +65,14 @@ jobs: CMAKE_GENERATOR_PLATFORM: "Win32" ADIOS2: "OFF" # 32-bit: no 32-bit ADIOS2 CI; BP read segfaults (see i686) + - os: windows-11-arm + arch: "ARM64" + build: "cp311-* cp312-* cp313-* cp314-*" + artifact: "ARM64" # build has '*'/spaces; not a valid artifact name + env: + ADIOS2: "OFF" + CMAKE_GENERATOR_PLATFORM: "ARM64" + - os: macos-15-intel arch: "x86_64" env: @@ -235,8 +245,8 @@ jobs: CIBW_TEST_REQUIRES_PYODIDE: numpy CIBW_TEST_COMMAND: > python {project}/.github/check_wheel_libs.py && - python -c "import sys, openpmd_api as io; v = io.variants; - need_adios2 = sys.maxsize > 2**32; + python -c "import openpmd_api as io; v = io.variants; + need_adios2 = '${{ matrix.env.ADIOS2 || 'ON' }}' == 'ON'; assert v['hdf5'] and v['json'] and (v['adios2'] or not need_adios2), v; print('openPMD', io.__version__, dict(v))" && python {project}/.github/smoke_roundtrip.py @@ -257,8 +267,9 @@ jobs: name: Publish as GitHub artifact with: # Include matrix.build so the two wasm legs (cp313 / cp314, which share - # os=ubuntu-24.04 + arch=wasm32) get DISTINCT artifact names. - name: wheels-${{ matrix.os }}-${{ matrix.build || matrix.arch }} + # os=ubuntu-24.04 + arch=wasm32) get DISTINCT artifact names. matrix.artifact + # overrides it where build holds glob chars invalid in a name (Windows ARM64). + name: wheels-${{ matrix.os }}-${{ matrix.artifact || matrix.build || matrix.arch }} path: ./wheelhouse overwrite: true diff --git a/.travis.yml b/.travis.yml index 6997bb669a..02932bc1eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -134,12 +134,12 @@ install: - git clone --branch ${OPENPMD_GIT_REF} --depth 1 https://github.com/openPMD/openPMD-api.git src - cp library_builders.sh list_library_deps.py check_wheel_libs.py smoke_roundtrip.py src/.github/ # Wheels-only re-release: bump the package version (same source). - - (cd src && git apply ../setup-py-version-post2.patch) + - (cd src && git apply ../setup-py-version-post4.patch) # Keep statically-embedded deps (HDF5/ADIOS2/openPMD) private so the wheel can # be co-loaded with another extension that also embeds them (ImpactX/WarpX). - (cd src && git apply ../python-hide-symbols.patch) - python -m pip install --upgrade pip setuptools wheel - - python -m pip install cibuildwheel==3.2.1 + - python -m pip install cibuildwheel==4.1.0 # twine & cryptography: see # https://github.com/scikit-build/cmake-python-distributions/blob/4730aeee240917303f293dffc89a8d8d5a4787c4/requirements-deploy.txt # https://github.com/pyca/cryptography/issues/6086 diff --git a/library_builders.bat b/library_builders.bat index 6f89532c73..02dc84cc27 100644 --- a/library_builders.bat +++ b/library_builders.bat @@ -288,10 +288,14 @@ exit /b 0 :main call :install_buildessentials call :build_zlib -call :build_sqlite -:: build_bzip2 -:: build_szip -call :build_zfp -call :build_blosc2 call :build_hdf5 -call :build_adios2 + +rem ADIOS2 and its exclusive dependencies +if /I "%openPMD_CMAKE_openPMD_USE_ADIOS2%"=="ON" ( + call :build_sqlite + rem build_bzip2 + rem build_szip + call :build_zfp + call :build_blosc2 + call :build_adios2 +) diff --git a/setup-py-windows-arm64-platform.patch b/setup-py-windows-arm64-platform.patch new file mode 100644 index 0000000000..ee5403df36 --- /dev/null +++ b/setup-py-windows-arm64-platform.patch @@ -0,0 +1,18 @@ +diff --git a/setup.py b/setup.py +index e44e942..0000001 100644 +--- a/setup.py ++++ b/setup.py +@@ -104,8 +104,11 @@ + os.path.join(extdir, "openpmd_api") + ) + ] +- if sys.maxsize > 2**32: +- cmake_args += ['-A', 'x64'] ++ generator_platform = os.environ.get("CMAKE_GENERATOR_PLATFORM") ++ if generator_platform: ++ cmake_args += ['-A', generator_platform] ++ elif sys.maxsize > 2**32: ++ cmake_args += ['-A', 'x64'] + build_args += ['--', '/m'] + else: + cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]