summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml74
1 files changed, 22 insertions, 52 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 418829a..9bdb3de 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -72,7 +72,6 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
- matrix_win: ${{ steps.set-matrix.outputs.matrix_win }}
steps:
@@ -96,7 +95,11 @@ jobs:
cibuildwheel --print-build-identifiers --platform linux \
| sed 's/.*/{"cibw-only": "&", "os": "ubuntu-20.04"}/' \
&& cibuildwheel --print-build-identifiers --platform macos \
- | sed 's/.*/{"cibw-only": "&", "os": "macos-13" }/'
+ | sed 's/.*/{"cibw-only": "&", "os": "macos-13" }/' \
+ && CIBW_ARCHS_WINDOWS=AMD64 cibuildwheel --print-build-identifiers --platform windows \
+ | sed 's/.*/{"cibw-only": "&", "os": "windows-2022", "arch": "AMD64" }/' \
+ && CIBW_ARCHS_WINDOWS=x86 cibuildwheel --print-build-identifiers --platform windows \
+ | sed 's/.*/{"cibw-only": "&", "os": "windows-2022", "arch": "x86" }/'
} | jq --slurp --compact-output '{"include": .}'
)
echo matrix="$MATRIX" >> $GITHUB_OUTPUT
@@ -120,6 +123,12 @@ jobs:
with:
python-version: '3.11'
+ - name: Set up MSYS2
+ if: runner.os == 'Windows'
+ uses: ./.github/actions/setup-msys2
+ with:
+ arch: ${{ matrix.arch }}
+
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
@@ -132,62 +141,23 @@ jobs:
python -m cibuildwheel --only ${{ matrix.cibw-only }} --print-build-identifiers
- name: Build wheels
- if: ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) || matrix.cibw-only == 'cp310-manylinux_x86_64' }}
+ if: |
+ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) ||
+ matrix.cibw-only == 'cp310-manylinux_x86_64' ||
+ matrix.cibw-only == 'cp310-win_amd64' ||
+ matrix.cibw-only == 'cp310-win32'
uses: pypa/cibuildwheel@v2.17.0
with:
only: ${{ matrix.cibw-only }}
-
- - uses: actions/upload-artifact@v3
- if: ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) || matrix.cibw-only == 'cp310-manylinux_x86_64' }}
- with:
- path: ./wheelhouse/*.whl
-
- build_wheels_win:
- name: Build Windows wheel
-
- runs-on: windows-2022
-
- strategy:
- matrix:
- arch: ["AMD64", "x86"]
-
- steps:
-
- - uses: actions/checkout@v4
-
- - name: Use Python 3.11
- uses: actions/setup-python@v5
- with:
- python-version: '3.11'
-
- - name: Set up MSYS2
- uses: ./.github/actions/setup-msys2
- with:
- arch: ${{ matrix.arch }}
-
- - name: Print build identifiers
- run: |
- python -m pip install cibuildwheel==2.17.0
- python -m cibuildwheel --print-build-identifiers
- env:
- CIBW_ARCHS: ${{ matrix.arch }}
-
- - name: Build wheels
- if: ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) }}
- uses: pypa/cibuildwheel@v2.17.0
- env:
- CIBW_ARCHS: ${{ matrix.arch }}
- CIBW_ENVIRONMENT: ${{ matrix.arch == 'x86' && 'CC=i686-w64-mingw32-gcc.exe' || '' }}
-
- - name: Build wheels
- if: ${{ !(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) }}
- uses: pypa/cibuildwheel@v2.17.0
- with:
- only: ${{ matrix.arch == 'x86' && 'cp310-win32' || 'cp310-win_amd64' }}
env:
- CIBW_ENVIRONMENT: ${{ matrix.arch == 'x86' && 'CC=i686-w64-mingw32-gcc.exe' || '' }}
+ CIBW_ENVIRONMENT: ${{ runner.os == 'Windows' && matrix.arch == 'x86' && 'CC=i686-w64-mingw32-gcc.exe' || '' }}
- uses: actions/upload-artifact@v3
+ if: |
+ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) ||
+ matrix.cibw-only == 'cp310-manylinux_x86_64' ||
+ matrix.cibw-only == 'cp310-win_amd64' ||
+ matrix.cibw-only == 'cp310-win32'
with:
path: ./wheelhouse/*.whl