summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2022-09-19 14:42:19 +0100
committerMichael Williamson <mike@zwobble.org>2022-09-19 15:24:57 +0100
commit39f7717dd446cd756109a1054e44e94ae9dd9b5b (patch)
tree44b870c3b6e48270b9711933f5e252b23e9c309f
parent2af8e69f6af738826eda9a9a5de3893f74c6675c (diff)
Use --only to simplify use of cibuildwheel
-rw-r--r--.github/workflows/build.yml8
-rw-r--r--build-wheels-matrix.py6
2 files changed, 6 insertions, 8 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index db9b61e..8e832d2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -74,7 +74,7 @@ jobs:
run: python build-wheels-matrix.py
build_wheels:
- name: Build ${{ matrix.CIBW_BUILD }} wheel
+ name: Build ${{ matrix.cibw-only }} wheel
needs: build_wheels_matrix
@@ -84,8 +84,6 @@ jobs:
runs-on: ${{ matrix.os }}
env:
- CIBW_ARCHS: ${{ matrix.CIBW_ARCHS }}
- CIBW_BUILD: ${{ matrix.CIBW_BUILD }}
CIBW_BEFORE_BUILD: "pip install cython==0.29.32 && cython {project}/jq.pyx"
CIBW_TEST_REQUIRES: "-r test-requirements.txt"
CIBW_TEST_COMMAND: "py.test {project}/tests"
@@ -108,12 +106,14 @@ jobs:
- name: Build wheels
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') }}
uses: pypa/cibuildwheel@v2.10.1
+ with:
+ only: ${{ matrix.cibw-only }}
- name: Print build identifiers
if: ${{ !(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) }}
run: |
python -m pip install cibuildwheel==2.10.1
- python -m cibuildwheel --print-build-identifiers
+ python -m cibuildwheel --only ${{ matrix.cibw-only }} --print-build-identifiers
- uses: actions/upload-artifact@v2
with:
diff --git a/build-wheels-matrix.py b/build-wheels-matrix.py
index 2bb3df5..36c56ba 100644
--- a/build-wheels-matrix.py
+++ b/build-wheels-matrix.py
@@ -28,15 +28,13 @@ def _main():
"include": [
{
"os": "ubuntu-20.04",
- "CIBW_ARCHS": _configuration_to_architecture(configuration).value,
- "CIBW_BUILD": configuration.identifier,
+ "cibw-only": configuration.identifier,
}
for configuration in linux_python_configurations
] + [
{
"os": "macos-10.15",
- "CIBW_ARCHS": _configuration_to_architecture(configuration).value,
- "CIBW_BUILD": configuration.identifier,
+ "cibw-only": configuration.identifier,
}
for configuration in macos_python_configurations
]