11
2- name : Test Binary Wheels
2+ name : Binary Wheels
33
4- on : workflow_dispatch
4+ on :
5+ workflow_dispatch :
6+ release :
7+ types : [ published ]
58
69concurrency :
710 group : ${{ github.workflow }}-${{ github.ref }}
1821 matrix :
1922 include :
2023 # Linux 64 bit manylinux
21- - os : ubuntu-latest
22- arch : x86_64
23- python : 38
24- builder : manylinux
2524 - os : ubuntu-latest
2625 arch : x86_64
2726 python : 39
3433 arch : x86_64
3534 python : 311
3635 builder : manylinux
36+ - os : ubuntu-latest
37+ arch : x86_64
38+ python : 312
39+ builder : manylinux
40+ # - os: ubuntu-latest
41+ # arch: x86_64
42+ # python: 313
43+ # builder: manylinux
3744
3845 # MacOS x86_64. The macos-13 runner is the last
3946 # Intel-based runner version. At some point we'll
@@ -42,27 +49,80 @@ jobs:
4249 arch : x86_64
4350 python : 39
4451 builder : macosx
52+ deploy : 13.0
4553 - os : macos-13
4654 arch : x86_64
4755 python : 310
4856 builder : macosx
57+ deploy : 13.0
4958 - os : macos-13
5059 arch : x86_64
5160 python : 311
5261 builder : macosx
62+ deploy : 13.0
63+ - os : macos-13
64+ arch : x86_64
65+ python : 312
66+ builder : macosx
67+ deploy : 13.0
68+ # - os: macos-13
69+ # arch: x86_64
70+ # python: 313
71+ # builder: macosx
72+ # deploy: 13.0
73+
74+ # MacOS arm64
75+ - os : macos-latest
76+ arch : arm64
77+ python : 310
78+ builder : macosx
79+ deploy : 14.0
80+ - os : macos-latest
81+ arch : arm64
82+ python : 311
83+ builder : macosx
84+ deploy : 14.0
85+ - os : macos-latest
86+ arch : arm64
87+ python : 312
88+ builder : macosx
89+ deploy : 14.0
90+ # - os: macos-latest
91+ # arch: arm64
92+ # python: 313
93+ # builder: macosx
94+ # deploy: 14.0
5395 env :
5496 CIBW_BUILD : cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }}
5597 CIBW_MANYLINUX_X86_64_IMAGE : ${{ matrix.builder }}2014
5698 CIBW_MANYLINUX_I686_IMAGE : ${{ matrix.builder }}2014
5799 CIBW_BUILD_VERBOSITY : 3
58- CIBW_ENVIRONMENT_LINUX : " CC=gcc CXX=g++ CFLAGS='-O3 -fPIC' CXXFLAGS='-O3 -fPIC -std=c++14' BOOST_ROOT=/usr/local"
59- CIBW_ENVIRONMENT_MACOS : " MACOSX_DEPLOYMENT_TARGET=13.0 CC=gcc-14 CXX=g++-14 CFLAGS='-O3 -fPIC' CXXFLAGS='-O3 -fPIC -std=c++14' BOOST_ROOT=/usr/local FLAC_ROOT=/usr/local BLAS_LIBRARIES=/usr/local/lib/libscipy_openblas.dylib"
100+ CIBW_ENVIRONMENT_LINUX : >
101+ CC=gcc
102+ CXX=g++
103+ CFLAGS='-O3 -fPIC'
104+ CXXFLAGS='-O3 -fPIC -std=c++14'
105+ BOOST_ROOT=/usr/local
106+ FLAC_ROOT=/usr/local
107+ SO3G_BUILD_BLAS_LIBRARIES='-L/usr/local/lib -lopenblas -fopenmp -lm -lgfortran'
108+ CIBW_ENVIRONMENT_MACOS : >
109+ MACOSX_DEPLOYMENT_TARGET=${{ matrix.deploy }}
110+ CC=gcc-14
111+ CXX=g++-14
112+ CFLAGS='-O3 -fPIC'
113+ CXXFLAGS='-O3 -fPIC -std=c++14'
114+ CPATH='/usr/local/include'
115+ BOOST_ROOT=/usr/local
116+ FLAC_ROOT=/usr/local
117+ SO3G_BUILD_BLAS_LIBRARIES='/usr/local/lib/libopenblas.dylib'
60118 CIBW_BEFORE_BUILD_LINUX : ./wheels/install_deps_linux.sh
61- CIBW_BEFORE_BUILD_MACOS : ./wheels/install_deps_osx.sh ${{ matrix.builder }}_${{ matrix.arch }}
119+ CIBW_BEFORE_BUILD_MACOS : >
120+ ln -s $(dirname $(readlink -f $(which python3)))/python3-config $(dirname $(which python3))/python3-config &&
121+ ./wheels/install_deps_osx.sh
62122 CIBW_REPAIR_WHEEL_COMMAND_LINUX : ./wheels/repair_wheel_linux.sh {dest_dir} {wheel}
63123 CIBW_REPAIR_WHEEL_COMMAND_MACOS : ./wheels/repair_wheel_macos.sh {dest_dir} {wheel} {delocate_archs}
64124 CIBW_BEFORE_TEST : export OMP_NUM_THREADS=2
65- CIBW_TEST_REQUIRES : pytest
125+ CIBW_TEST_REQUIRES : pytest pixell
66126 CIBW_TEST_COMMAND : >
67127 python -c 'import so3g.smurf.reader; from spt3g import core' &&
68128 python -m pytest {package}/test
@@ -73,17 +133,36 @@ jobs:
73133 - uses : actions/setup-python@v5
74134 name : Install Python
75135 with :
76- python-version : ' 3.10 '
136+ python-version : ' 3.12 '
77137
78138 - name : Install cibuildwheel
79139 run : |
80- python -m pip install cibuildwheel==2.20 .0
140+ python -m pip install cibuildwheel==2.22 .0
81141
82142 - name : Build wheel
83143 run : |
84144 python -m cibuildwheel --output-dir wheelhouse
85145
86146 - uses : actions/upload-artifact@v4
87147 with :
88- name : wheels_cp${{ matrix.python }}-${{ matrix.builder }}
89- path : ./wheelhouse/so3g*cp${{ matrix.python }}-${{ matrix.builder }}*.whl
148+ name : wheels_cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }}
149+ path : ./wheelhouse/so3g*cp${{ matrix.python }}-${{ matrix.builder }}*${{ matrix.arch }}*.whl
150+
151+ upload_pypi :
152+ needs : build_wheels
153+ runs-on : ubuntu-latest
154+ environment : pypi
155+ permissions :
156+ id-token : write
157+ if : github.event_name == 'release' && github.event.action == 'published'
158+ steps :
159+ - name : Download artifacts
160+ uses : actions/download-artifact@v4
161+ with :
162+ # unpacks all CIBW artifacts into dist/
163+ pattern : wheels_*
164+ path : dist
165+ merge-multiple : true
166+
167+ - name : Publish package distributions to PyPI
168+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments