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

Updates the release workflow to support python 3.11 and MacOS arm64. #338

Merged
merged 6 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', 'pypy-3.8', 'pypy-3.10']
python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.8', 'pypy-3.10']
os: [ macos-latest, ubuntu-latest ]
fail-fast: false
steps:
Expand All @@ -21,7 +21,7 @@ jobs:

- name: Create a virtual environment
run: git submodule init && git submodule update && python3 -m venv ./venv && . venv/bin/activate

- run: pip install --upgrade setuptools
- run: pip install -r requirements.txt
- run: pip install -e .
- run: py.test
Expand All @@ -30,7 +30,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.9', '3.10', 'pypy-3.8', 'pypy-3.10' ]
python-version: ['3.9', '3.10', '3.11', 'pypy-3.8', 'pypy-3.10' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand All @@ -41,6 +41,7 @@ jobs:

- name: Create a virtual environment
run: git submodule init && git submodule update && python3 -m venv ./venv && . venv/Scripts/activate
- run: pip install --upgrade setuptools
- run: pip install -r requirements.txt
- run: pip install -e .
- run: py.test
25 changes: 17 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', 'pypy-3.8']
python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.8']
steps:
- uses: actions/checkout@v3
- name: Set up python
Expand All @@ -20,6 +20,7 @@ jobs:

- name: Create a virtual environment
run: git submodule init && git submodule update && python3 -m venv ./venv && . venv/bin/activate
- run: pip install --upgrade setuptools
- run: pip install -r requirements.txt
- run: pip install -e .
- run: py.test
Expand Down Expand Up @@ -91,8 +92,18 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: [ '3.10']
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- os: macos-latest
arch: x86_64
cibw_arch: "x86_64"
- os: macos-14 # https://github.com/actions/runner-images?tab=readme-ov-file#available-images
arch: arm64
cibw_arch: "arm64"
- os: windows-latest
cibw_arch: "auto"
- os: ubuntu-latest
cibw_arch: "auto aarch64"

steps:
- uses: actions/checkout@v3

Expand All @@ -108,15 +119,13 @@ jobs:
platforms: all

- name: Install cibuildwheel
run: python3 -m pip install cibuildwheel==2.4.0
run: python3 -m pip install cibuildwheel==2.16.5

- name: Build wheels
run: python3 -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "pp* *-win32"
CIBW_ARCHS_WINDOWS: "auto"
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "x86_64"
CIBW_SKIP: "pp* *-win32 cp36-* cp37-* cp38-*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer explicit including instead of accepting the cibuildwheel defaults and skipping some. That way we know that we are only building for arch/python version combinations that we have tested for and it won't change with cibuildwheel.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a comment about what these apparently arcane flags mean for the next dev that has to change this.

Copy link
Contributor Author

@cheqianh cheqianh Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a commit to

  1. Use the specific arch names instead of alias "auto",
  2. Use the specific python versions 3.9 to 3.11
  3. Add a link to the cibuildwheel flag document

I tried to add python 3.12 but the build failed due to a dependency issue. I'll open a new issue to track the 3.12 build issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened a new issue for adding 3.12 to the build workflow - #339

CIBW_ARCHS: ${{ matrix.cibw_arch }}

- name: Upload wheels to Github
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ iniconfig==1.1.1
jsonconversion==0.2.12
packaging==20.9
pluggy==0.13.1
py==1.10.0
py==1.11.0
pyparsing==2.4.7
pytest==6.2.4
pytest-runner==5.3.1
Expand Down
Loading