Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
gwang74 committed May 31, 2024
1 parent c4f0e32 commit b720fb2
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 102 deletions.
202 changes: 101 additions & 101 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,79 +23,79 @@ jobs:
python: '3.9'
cibw_python: 39
platform_id: win_amd64
- os: windows-latest
python: '3.10'
cibw_python: 310
platform_id: win_amd64
- os: windows-latest
python: '3.11'
cibw_python: 311
platform_id: win_amd64
- os: windows-latest
python: '3.12'
cibw_python: 312
platform_id: win_amd64
# - os: windows-latest
# python: '3.10'
# cibw_python: 310
# platform_id: win_amd64
# - os: windows-latest
# python: '3.11'
# cibw_python: 311
# platform_id: win_amd64
# - os: windows-latest
# python: '3.12'
# cibw_python: 312
# platform_id: win_amd64

# Linux 64-bit
- os: ubuntu-latest
python: '3.8'
cibw_python: 38
platform_id: manylinux_x86_64
- os: ubuntu-latest
python: '3.9'
cibw_python: 39
platform_id: manylinux_x86_64
- os: ubuntu-latest
python: '3.10'
cibw_python: 310
platform_id: manylinux_x86_64
- os: ubuntu-latest
python: '3.11'
cibw_python: 311
platform_id: manylinux_x86_64
- os: ubuntu-latest
python: '3.12'
cibw_python: 312
platform_id: manylinux_x86_64
# - os: ubuntu-latest
# python: '3.8'
# cibw_python: 38
# platform_id: manylinux_x86_64
# - os: ubuntu-latest
# python: '3.9'
# cibw_python: 39
# platform_id: manylinux_x86_64
# - os: ubuntu-latest
# python: '3.10'
# cibw_python: 310
# platform_id: manylinux_x86_64
# - os: ubuntu-latest
# python: '3.11'
# cibw_python: 311
# platform_id: manylinux_x86_64
# - os: ubuntu-latest
# python: '3.12'
# cibw_python: 312
# platform_id: manylinux_x86_64

# macOS on Intel 64-bit
- os: macos-12
python: '3.9'
cibw_python: 39
arch: x86_64
platform_id: macosx_x86_64
- os: macos-12
python: '3.10'
cibw_python: 310
arch: x86_64
platform_id: macosx_x86_64
- os: macos-12
python: '3.11'
cibw_python: 311
arch: x86_64
platform_id: macosx_x86_64
- os: macos-12
python: '3.12'
cibw_python: 312
arch: x86_64
platform_id: macosx_x86_64
# - os: macos-12
# python: '3.9'
# cibw_python: 39
# arch: x86_64
# platform_id: macosx_x86_64
# - os: macos-12
# python: '3.10'
# cibw_python: 310
# arch: x86_64
# platform_id: macosx_x86_64
# - os: macos-12
# python: '3.11'
# cibw_python: 311
# arch: x86_64
# platform_id: macosx_x86_64
# - os: macos-12
# python: '3.12'
# cibw_python: 312
# arch: x86_64
# platform_id: macosx_x86_64

# macOS on Apple M1 64-bit, supported for Python 3.10 and later
- os: macos-14
python: '3.10'
cibw_python: 310
arch: arm64
platform_id: macosx_arm64
- os: macos-14
python: '3.11'
cibw_python: 311
arch: arm64
platform_id: macosx_arm64
- os: macos-14
python: '3.12'
cibw_python: 312
arch: arm64
platform_id: macosx_arm64
# - os: macos-14
# python: '3.10'
# cibw_python: 310
# arch: arm64
# platform_id: macosx_arm64
# - os: macos-14
# python: '3.11'
# cibw_python: 311
# arch: arm64
# platform_id: macosx_arm64
# - os: macos-14
# python: '3.12'
# cibw_python: 312
# arch: arm64
# platform_id: macosx_arm64

steps:
- uses: actions/checkout@v4
Expand All @@ -115,11 +115,11 @@ jobs:
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2 setuptools toml

- name: Get package name and version (Linux / Mac)
if: ${{ ! startsWith(matrix.os, 'windows-') }}
run: |
echo "PACKAGE_NAME=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])" )" >> $GITHUB_ENV
echo "PACKAGE_VERSION=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])" )" >> $GITHUB_ENV
# - name: Get package name and version (Linux / Mac)
# if: ${{ ! startsWith(matrix.os, 'windows-') }}
# run: |
# echo "PACKAGE_NAME=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])" )" >> $GITHUB_ENV
# echo "PACKAGE_VERSION=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])" )" >> $GITHUB_ENV

# Some shells require "-Encoding utf8" to append to GITHUB_ENV
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions?tool=powershell#environment-files
Expand All @@ -129,50 +129,50 @@ jobs:
echo "PACKAGE_NAME=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])" )" | Out-File -FilePath $env:GITHUB_ENV ` -Append
echo "PACKAGE_VERSION=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])" )" | Out-File -FilePath $env:GITHUB_ENV ` -Append
- name: Determine macOS version
if: startsWith(matrix.os, 'macos-')
run: |
macos_version=$(sw_vers -productVersion | awk -F '.' '{print $1".0"}')
echo "MACOSX_DEPLOYMENT_TARGET=${macos_version}" >> $GITHUB_ENV
# - name: Determine macOS version
# if: startsWith(matrix.os, 'macos-')
# run: |
# macos_version=$(sw_vers -productVersion | awk -F '.' '{print $1".0"}')
# echo "MACOSX_DEPLOYMENT_TARGET=${macos_version}" >> $GITHUB_ENV

- name: Build wheels
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
# CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BUILD: cp${{ matrix.cibw_python }}-${{ matrix.platform_id }}
CIBW_TEST_SKIP: "cp*" # We will test during install and test step

# Include latest Python beta
CIBW_PRERELEASE_PYTHONS: True

CIBW_BEFORE_ALL_LINUX: |
echo "Installing system dependencies with yum"
yum install -y gcc-c++ libpng-devel libpng
echo "pip installing cmake and ninja"
python -m pip install cmake ninja setuptools
# CIBW_BEFORE_ALL_LINUX: |
# echo "Installing system dependencies with yum"
# yum install -y gcc-c++ libpng-devel libpng
# echo "pip installing cmake and ninja"
# python -m pip install cmake ninja setuptools

CIBW_BEFORE_ALL_WINDOWS: |
python -m pip install cmake ninja setuptools
CIBW_ARCHS_MACOS: ${{ matrix.arch }}

CIBW_ENVIRONMENT_MACOS: |
CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} CMAKE_PREFIX_PATH=/usr/local
CIBW_BEFORE_ALL_MACOS: |
python -m pip install cmake ninja setuptools
brew update
if ! brew list libpng &>/dev/null; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install libpng
fi
#
# CIBW_ARCHS_MACOS: ${{ matrix.arch }}
#
# CIBW_ENVIRONMENT_MACOS: |
# CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} CMAKE_PREFIX_PATH=/usr/local
#
# CIBW_BEFORE_ALL_MACOS: |
# python -m pip install cmake ninja setuptools
# brew update
# if ! brew list libpng &>/dev/null; then
# HOMEBREW_NO_AUTO_UPDATE=1 brew install libpng
# fi

run: python -m cibuildwheel --output-dir wheelhouse/cp${{ matrix.cibw_python }}-${{matrix.platform_id }}

- name: Install and test (Linux / Mac)
if: ${{ ! startsWith(matrix.os, 'windows-') }}
run: |
python -m pip install wheelhouse/cp${{ matrix.cibw_python }}-${{matrix.platform_id }}/*.whl
tests/run_tests.sh
# - name: Install and test (Linux / Mac)
# if: ${{ ! startsWith(matrix.os, 'windows-') }}
# run: |
# python -m pip install wheelhouse/cp${{ matrix.cibw_python }}-${{matrix.platform_id }}/*.whl
# tests/run_tests.sh

- name: Install and test (Windows)
if: startsWith(matrix.os, 'windows-')
Expand Down
2 changes: 1 addition & 1 deletion scripts/configure_ITK.bat
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ echo "ITK;%itktag%" REM UNKNOWN: {"type":"Redirect","op":{"text":">>","type":"dg
mkdir itkbuild
cd itkbuild
SET compflags= -fPIC -O2
cmake -GNinja -DITK_USE_SYSTEM_PNG=OFF -DCMAKE_SH:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING="%CMAKE_BUILD_TYPE%" -DITK_USE_GIT_PROTOCOL:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DITK_LEGACY_REMOVE:BOOL=OFF -DITK_FUTURE_LEGACY_REMOVE:=BOOL=ON -DITK_BUILD_DEFAULT_MODULES:BOOL=OFF -DKWSYS_USE_MD5:BOOL=ON -DITK_WRAPPING:BOOL=OFF -DModule_MGHIO:BOOL=ON -DModule_ITKDeprecated:BOOL=OFF -DModule_ITKReview:BOOL=ON -DModule_ITKVtkGlue:BOOL=OFF -DModule_GenericLabelInterpolator:BOOL=ON -DITKGroup_Core=ON -DModule_ITKReview=ON -DITKGroup_Filtering=ON -DITKGroup_IO=ON -DITKGroup_Numerics=ON -DITKGroup_Registration=ON -DITKGroup_Segmentation=ON -DModule_AdaptiveDenoising:BOOL=ON -DModule_GenericLabelInterpolator:BOOL=ON -DCMAKE_C_VISIBILITY_PRESET:BOOL=hidden -DCMAKE_CXX_VISIBILITY_PRESET:BOOL=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN:BOOL=ON ..\itksource\
cmake -GNinja -DITK_USE_SYSTEM_PNG=OFF -DITK_USE_GPU:BOOL=ON -DCMAKE_SH:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING="%CMAKE_BUILD_TYPE%" -DITK_USE_GIT_PROTOCOL:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DITK_LEGACY_REMOVE:BOOL=OFF -DITK_FUTURE_LEGACY_REMOVE:=BOOL=ON -DITK_BUILD_DEFAULT_MODULES:BOOL=OFF -DKWSYS_USE_MD5:BOOL=ON -DITK_WRAPPING:BOOL=OFF -DModule_MGHIO:BOOL=ON -DModule_ITKDeprecated:BOOL=OFF -DModule_ITKReview:BOOL=ON -DModule_ITKVtkGlue:BOOL=OFF -DModule_GenericLabelInterpolator:BOOL=ON -DITKGroup_Core=ON -DModule_ITKReview=ON -DITKGroup_Filtering=ON -DITKGroup_IO=ON -DITKGroup_Numerics=ON -DITKGroup_Registration=ON -DITKGroup_Segmentation=ON -DModule_AdaptiveDenoising:BOOL=ON -DModule_GenericLabelInterpolator:BOOL=ON -DCMAKE_C_VISIBILITY_PRESET:BOOL=hidden -DCMAKE_CXX_VISIBILITY_PRESET:BOOL=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN:BOOL=ON ..\itksource\
ninja

cd ..\

0 comments on commit b720fb2

Please sign in to comment.