1010
1111jobs :
1212 build_wheels_windows :
13- name : Build wheels on Windows
14- runs-on : windows-latest
15- strategy :
16- matrix :
17- architecture : [x64]
13+ name : Build wheels on Windows
14+ runs-on : windows-latest
15+ strategy :
16+ matrix :
17+ architecture : [x64]
1818
19- steps :
20- - uses : actions/checkout@v3
19+ steps :
20+ - uses : actions/checkout@v3
2121
22- - name : Set up Python 3.10
23- uses : actions/setup-python@v4
24- with :
25- python-version : ' 3.10'
26- architecture : ${{ matrix.architecture }}
22+ - name : Setup MSVC
23+ uses : ilammy/msvc-dev-cmd@v1
24+ with :
25+ arch : ${{ matrix.architecture }}
2726
28- - name : Install Miniconda
29- uses : conda-incubator/setup-miniconda@v3
30- with :
31- auto-update-conda : true
32- python-version : ' 3.10'
33- architecture : ${{ matrix.architecture }}
27+ - name : Set up Python 3.10
28+ uses : actions/setup-python@v4
29+ with :
30+ python-version : ' 3.10'
31+ architecture : ${{ matrix.architecture }}
3432
35- - name : Install SLEEF and other dependencies
36- shell : bash -l {0}
37- run : |
38- conda config --add channels conda-forge
39- conda config --set channel_priority strict
40- conda install -y sleef numpy
41- conda list
42- ls -l "$CONDA_PREFIX/Library/include/sleef.h"
43- ls -l "$CONDA_PREFIX/Library/lib/sleef"*
33+ - name : Install Miniconda
34+ uses : conda-incubator/setup-miniconda@v3
35+ with :
36+ auto-update-conda : true
37+ python-version : ' 3.10'
38+ architecture : ${{ matrix.architecture }}
4439
45- - name : Install build dependencies
46- shell : bash -l {0}
47- run : |
48- pip install -U pip
49- pip install cibuildwheel==2.20.0 ninja meson meson-python numpy delvewheel pytest
40+ - name : Install SLEEF and other dependencies
41+ shell : bash -l {0}
42+ run : |
43+ conda config --add channels conda-forge
44+ conda config --set channel_priority strict
45+ conda install -y sleef numpy
46+ conda list
47+ if [ ! -f "$CONDA_PREFIX/Library/include/sleef.h" ]; then
48+ echo "sleef.h not found. Installation may have failed."
49+ exit 1
50+ fi
51+ ls -l "$CONDA_PREFIX/Library/include/sleef.h"
52+ ls -l "$CONDA_PREFIX/Library/lib/sleef"*
5053
51- - name : Build wheels
52- env :
53- CIBW_BUILD : ' cp310-* cp311-* cp312-*'
54- CIBW_SKIP : ' pp* cp36-* cp37-* cp38-* cp39-* cp313-*'
55- CIBW_ARCHS_WINDOWS : ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }}
56- CIBW_BUILD_VERBOSITY : ' 1'
57- DISTUTILS_USE_SDK : ' 1'
58- MSSdk : ' 1'
59- CIBW_ENVIRONMENT : >-
60- PATH="$CONDA_PREFIX/Library/bin;$CONDA_PREFIX/Library/lib;$PATH"
61- CIBW_BEFORE_BUILD : |
62- where link
63- where cl
64- pip install meson meson-python ninja numpy
65- meson setup builddir
66- meson compile -C builddir
67- CIBW_REPAIR_WHEEL_COMMAND : ' delvewheel repair -w {dest_dir} {wheel}'
68- CIBW_TEST_COMMAND : |
69- pip install {package}[test]
70- pytest {project}/tests
71- CIBW_TEST_EXTRAS : ' test'
72- CIBW_TEST_FAIL_FAST : 1
73- shell : bash -l {0}
74- run : |
75- python -m cibuildwheel --output-dir wheelhouse
76- working-directory : ./quaddtype
54+ - name : Set environment variables
55+ shell : pwsh
56+ run : |
57+ echo "CONDA_PREFIX=$env:CONDA_PREFIX" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
58+ $numpy_path = python -c "import numpy; import os; print(os.path.abspath(numpy.get_include()).replace(os.sep, '/'))"
59+ echo "NUMPY_INCLUDE_DIR=$numpy_path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
7760
78- - uses : actions/upload-artifact@v4
79- with :
80- path : ./quaddtype/wheelhouse/*.whl
81- name : wheels-windows-${{ matrix.architecture }}
61+ - name : Install build dependencies
62+ shell : bash -l {0}
63+ run : |
64+ pip install -U pip
65+ pip install cibuildwheel==2.20.0 ninja meson meson-python numpy delvewheel pytest
66+
67+ - name : Build wheels
68+ env :
69+ CONDA_PREFIX : ${{ env.CONDA_PREFIX }}
70+ CIBW_BUILD : ' cp310-* cp311-* cp312-*'
71+ CIBW_SKIP : ' pp* cp36-* cp37-* cp38-* cp39-* cp313-*'
72+ CIBW_ARCHS_WINDOWS : ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }}
73+ CIBW_BUILD_VERBOSITY : ' 1'
74+ SLEEF_INCLUDE_DIR : ${{ env.CONDA_PREFIX }}\Library\include
75+ SLEEF_LIBRARY : ${{ env.CONDA_PREFIX }}\Library\lib
76+ DISTUTILS_USE_SDK : ' 1'
77+ MSSdk : ' 1'
78+ NUMPY_INCLUDE_DIR : ${{ env.NUMPY_INCLUDE_DIR }}
79+ CIBW_ENVIRONMENT : >-
80+ NUMPY_INCLUDE_DIR="${{ env.NUMPY_INCLUDE_DIR }}"
81+ SLEEF_INCLUDE_DIR="${{ env.CONDA_PREFIX }}/Library/include"
82+ SLEEF_LIBRARY="${{ env.CONDA_PREFIX }}/Library/lib"
83+ CIBW_BEFORE_BUILD : pip install meson meson-python ninja numpy
84+ CIBW_REPAIR_WHEEL_COMMAND : ' delvewheel repair -w {dest_dir} {wheel}'
85+ CIBW_TEST_COMMAND : |
86+ pip install {package}[test]
87+ pytest {project}/tests
88+ CIBW_TEST_EXTRAS : ' test'
89+ CIBW_TEST_FAIL_FAST : 1
90+ shell : pwsh
91+ run : |
92+ python -m cibuildwheel --output-dir wheelhouse
93+ if (-not (Test-Path wheelhouse/*.whl)) { throw "Wheel was not created" }
94+ working-directory : ./quaddtype
95+
96+ - uses : actions/upload-artifact@v4
97+ with :
98+ path : ./quaddtype/wheelhouse/*.whl
99+ name : wheels-windows-${{ matrix.architecture }}
0 commit comments