Skip to content

Commit

Permalink
ENH: Read / Write windows pointers (ANTsX#442)
Browse files Browse the repository at this point in the history
* ENH: Bump ANTs version to read Windows pointers

* ENH: Run tests on all wheels
  • Loading branch information
cookpa authored Mar 22, 2023
1 parent a6cef12 commit 3ae3b11
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 23 deletions.
74 changes: 54 additions & 20 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,83 @@
name: Build

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build_wheels:
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}
name: Build wheel for cp${{ matrix.cibw_python }}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Have to specify python version twice so that the same python is used to build and test
# Need to quote decimal versions as string to avoid the "Norway problem"

# Windows 64-bit
- os: windows-latest
python: 37
python: '3.7'
cibw_python: 37
platform_id: win_amd64
- os: windows-latest
python: 38
python: '3.8'
cibw_python: 38
platform_id: win_amd64
- os: windows-latest
python: 39
python: '3.9'
cibw_python: 39
platform_id: win_amd64
- os: windows-latest
python: 310
python: '3.10'
cibw_python: 310
platform_id: win_amd64

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

# macOS on Intel 64-bit
- os: macos-latest
python: 37
python: '3.7'
cibw_python: 37
arch: x86_64
platform_id: macosx_x86_64
- os: macos-latest
python: 38
python: '3.8'
cibw_python: 38
arch: x86_64
platform_id: macosx_x86_64
- os: macos-latest
python: 39
python: '3.9'
cibw_python: 39
arch: x86_64
platform_id: macosx_x86_64
- os: macos-latest
python: 310
python: '3.10'
cibw_python: 310
arch: x86_64
platform_id: macosx_x86_64

Expand All @@ -81,7 +103,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python host for cibuildwheel
with:
python-version: '3.9'
python-version: ${{ matrix.python }}

# Visual Studio
- name: Set up MSVC x64
Expand Down Expand Up @@ -110,7 +132,7 @@ jobs:
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_BUILD: cp${{ matrix.cibw_python }}-${{ matrix.platform_id }}

# Include latest Python beta
CIBW_PRERELEASE_PYTHONS: True
Expand All @@ -129,9 +151,21 @@ jobs:
CIBW_ENVIRONMENT_MACOS: |
CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}
run: python -m cibuildwheel --output-dir wheelhouse/cp${{ matrix.python }}-${{ matrix.platform_id }}
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: |
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-')
run: |
python -m pip install --find-links=.\wheelhouse\cp${{ matrix.cibw_python }}-${{matrix.platform_id }} antspyx
tests\run_tests.bat
- uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_NAME }}-${{ env.PACKAGE_VERSION }}-cp${{ matrix.python }}-${{ matrix.platform_id }}
path: ./wheelhouse/cp${{ matrix.python }}-${{ matrix.platform_id }}/*.whl
name: ${{ env.PACKAGE_NAME }}-${{ env.PACKAGE_VERSION }}-cp${{ matrix.cibw_python }}-${{ matrix.platform_id }}
path: ./wheelhouse/cp${{ matrix.cibw_python }}-${{ matrix.platform_id }}/*.whl
2 changes: 1 addition & 1 deletion scripts/configure_ANTsPy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY data\* %USERPROFILE%\.antspy

:: clone ANTs and move all files into library directory
SET antsgit=https://github.com/ANTsX/ANTs.git
SET antstag=8cb575a08aaab579934ca181134db97cd069fe74
SET antstag=276cf0717945d3dd3c4298c607d9d6a788ba574e
echo "ANTS;%antstag%" REM UNKNOWN: {"type":"Redirect","op":{"text":">>","type":"dgreat"},"file":{"text":"./data/softwareVersions.csv","type":"Word"}}
cd ants\lib
echo "123"
Expand Down
2 changes: 1 addition & 1 deletion scripts/configure_ANTsPy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cp data/* ~/.antspy/
# clone ANTs and move all files into library directory

antsgit=https://github.com/ANTsX/ANTs.git
antstag=871cad073908952b095e4b520335fc441e059264
antstag=276cf0717945d3dd3c4298c607d9d6a788ba574e
echo "ANTS;${antstag}" >> ./data/softwareVersions.csv

cd ants/lib # go to lib dir
Expand Down
2 changes: 1 addition & 1 deletion scripts/configure_ANTsPy_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cp data/* ~/.antspy/
# clone ANTs and move all files into library directory

antsgit=https://github.com/ANTsX/ANTs.git
antstag=8cb575a08aaab579934ca181134db97cd069fe74 #
antstag=276cf0717945d3dd3c4298c607d9d6a788ba574e
echo "ANTS;${antstag}" >> ./data/softwareVersions.csv

cd ants/lib # go to lib dir
Expand Down

0 comments on commit 3ae3b11

Please sign in to comment.