Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: build fixes for v4.6 #97

Merged
merged 19 commits into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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