summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2022-09-19 14:34:53 +0100
committerMichael Williamson <mike@zwobble.org>2022-09-19 15:24:57 +0100
commit62d0cadd5c1dcb2450c33180c8b03c42cd3d5ab4 (patch)
tree6afa010170d9464b38af2cfc0e54d6475eebf816 /.github/workflows
parent00e953c710e8977486806d69b1708c9a0d3e4440 (diff)
Move CIBW env vars to job to remove duplication
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml23
1 files changed, 9 insertions, 14 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9a9ca37..ae56f71 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -77,11 +77,19 @@ jobs:
name: Build ${{ matrix.CIBW_BUILD }} wheel
needs: build_wheels_matrix
- runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJson(needs.build_wheels_matrix.outputs.matrix) }}
+ 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"
+
steps:
- uses: actions/checkout@v2
@@ -100,12 +108,6 @@ jobs:
- name: Build wheels
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') }}
uses: pypa/cibuildwheel@v2.9.0
- 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"
- name: Print build identifiers
if: ${{ !(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) }}
@@ -113,13 +115,6 @@ jobs:
python -m pip install cibuildwheel==2.9.0
python -m cibuildwheel --print-build-identifiers
- 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"
-
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl