-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from InsightSoftwareConsortium/manylinux-options
ENH: Introduce manylinux option with ARM
- Loading branch information
Showing
2 changed files
with
35 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ on: | |
description: 'Git tag or commit hash for ITKPythonPackage build scripts to use' | ||
required: false | ||
type: string | ||
default: 'aa3b0767801ecc489f6219777ead2652f7ac4ccf' | ||
default: 'cc3cbd2edd350d193536d78c5f8ee5ace1e6defd' | ||
itk-python-package-org: | ||
description: 'Github organization name for fetching ITKPythonPackage build scripts' | ||
required: false | ||
|
@@ -30,17 +30,24 @@ on: | |
# example: InsightSoftwareConsortium/ITKMeshToPolyData@3ad8f08:InsightSoftwareConsortium/[email protected] | ||
required: false | ||
type: string | ||
manylinux-platforms: | ||
description: 'JSON-formatted array of "<manylinux-image>-<arch>" specializations' | ||
required: false | ||
type: string | ||
default: '["_2_28-x64","2014-x64","_2_28-aarch64"]' | ||
secrets: | ||
pypi_password: | ||
required: false # Packages will not be uploaded to PyPI if not set | ||
|
||
jobs: | ||
build-linux-python-packages: | ||
|
||
build-linux-py: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
python-version: ["37", "38", "39", "310", "311"] | ||
manylinux-platform: ${{ fromJSON(inputs.manylinux-platforms) }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -76,12 +83,13 @@ jobs: | |
CMAKE_OPTIONS="--cmake_options ${{ inputs.cmake-options }}" | ||
fi | ||
for manylinux_version in "_2_28" "2014"; do | ||
rm -rf ITKPythonPackage | ||
export MANYLINUX_VERSION=${manylinux_version} | ||
echo "Building for manylinux specialization ${MANYLINUX_VERSION}" | ||
./dockcross-manylinux-download-cache-and-build-module-wheels.sh cp${{ matrix.python-version }} $CMAKE_OPTIONS | ||
done | ||
MANYLINUX_PLATFORM=${{ matrix.manylinux-platform }} | ||
echo "Manylinux platform ${MANYLINUX_PLATFORM}" | ||
rm -rf ITKPythonPackage | ||
export MANYLINUX_VERSION=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 1)` | ||
export TARGET_ARCH=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 2)` | ||
echo "Building for manylinux specialization ${MANYLINUX_VERSION} and target architecture ${TARGET_ARCH}" | ||
./dockcross-manylinux-download-cache-and-build-module-wheels.sh cp${{ matrix.python-version }} $CMAKE_OPTIONS | ||
- name: Publish Python package as GitHub Artifact | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -191,7 +199,7 @@ jobs: | |
|
||
publish-python-packages-to-pypi: | ||
needs: | ||
- build-linux-python-packages | ||
- build-linux-py | ||
- build-macos-python-packages | ||
- build-windows-python-packages | ||
runs-on: ubuntu-22.04 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,6 +282,24 @@ to direct workflow execution. | |
itk-module-deps: 'InsightSoftwareConsortium/ITKMeshToPolyData@3ad8f08:InsightSoftwareConsortium/[email protected]' | ||
``` | ||
|
||
- `manylinux-platforms`: Array of [manylinux](https://github.com/pypa/manylinux) | ||
specialization build targets for Linux Python module wheels. Manylinux "provides | ||
a convenient way to distribute binary Python extensions as wheels on Linux"; | ||
see the [manylinux README](https://github.com/pypa/manylinux#manylinux) for more details. | ||
An array entry includes both the name of the manylinux specialization, which is | ||
related to the toolset to be used, and the platform architecture to target. | ||
All supported specialization and architecture pairs are enabled by default | ||
and listed in the example below, but can be disabled by removing them from the | ||
input array in the calling external module workflow. | ||
The array follows [JavaScript Object Notation (JSON)](https://www.json.org/json-en.html) syntax | ||
and GHA jobs will launch in the order provided. | ||
The array is formatted as '["<specialization>-<target_arch>","<specialization>-<target_arch>"]'. | ||
|
||
```yaml | ||
with: | ||
manylinux-platforms: '["_2_28-x64","2014-x64","_2_28-aarch64"]' | ||
``` | ||
|
||
## Contributing | ||
|
||
Community contributions to `ITKRemoteModuleBuildTestPackageAction` are welcome! | ||
|