Skip to content

Commit

Permalink
CI: build fixes for v4.6 (#97)
Browse files Browse the repository at this point in the history
- bump pypa/cibuildwheel to v2.20.0
- allow testing build by including `[ci test build]` in the commit message
  • Loading branch information
nfrasser authored Sep 10, 2024
1 parent 34ffa66 commit 0e4521b
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,32 @@ concurrency:
cancel-in-progress: true

jobs:
meta:
runs-on: ubuntu-latest
outputs:
commit-message: ${{ steps.get-commit-message.outputs.commit-message }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }} # gets correct commit message
- name: Show commit
run: git show -s
- name: Output commit message
id: get-commit-message
run: |
{
echo 'commit-message<<CI_EOF'
git show -s --format="%B"
echo CI_EOF
} >> "$GITHUB_OUTPUT"
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }} # gets correct commit message
- uses: actions/setup-python@v5
with:
python-version: "3.10"
Expand Down Expand Up @@ -63,7 +83,6 @@ jobs:
# https://github.com/actions/setup-python/issues/852
- os: macos-latest
python-version: "3.7"

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -87,9 +106,11 @@ jobs:
run: |
pytest -v --benchmark-disable -n auto
# NOTE: build step only runs on tag builds or when the commit message contains
# "[ci test build]" for testing
build:
needs: [test]
if: "startsWith(github.ref, 'refs/tags/')"
needs: [meta, test]
if: "${{ startsWith(github.ref, 'refs/tags/') || contains(needs.meta.outputs.commit-message, '[ci test build]') }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
Expand All @@ -104,7 +125,7 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: pypa/cibuildwheel@v2.17.0
- uses: pypa/cibuildwheel@v2.20.0
env:
CIBW_SKIP: cp36-* pp*-win* pp*-macosx* *_i686
CIBW_TEST_SKIP: "*-win_arm64"
Expand All @@ -118,10 +139,11 @@ jobs:
name: wheels-${{ runner.os }}
path: dist

# NOTE: release step only runs on tag builds
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: [build]
steps:
- uses: actions/download-artifact@v4
Expand Down

0 comments on commit 0e4521b

Please sign in to comment.