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

release #112

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
70 changes: 40 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,48 @@ jobs:
python -m pip install -U setuptools wheel pip
python setup.py sdist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.*

build-wheels:
build-wheels-matrix:
needs: validate-release-request
runs-on: ubuntu-latest
outputs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: pip install cibuildwheel==2.15.0
- id: set-matrix
run: |
MATRIX_INCLUDE=$(
{
cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \
&& cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}'
} | jq -sc
)
echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT

build-wheels:
needs: build-wheels-matrix
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.only }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
cibw_arch: ["auto64", "aarch64", "universal2"]
cibw_python:
- "cp38-*"
- "cp39-*"
- "cp310-*"
- "cp311-*"
- "cp312-*"
exclude:
- os: ubuntu-latest
cibw_arch: universal2
- os: macos-latest
cibw_arch: aarch64
- os: windows-latest
cibw_arch: universal2
- os: windows-latest
cibw_arch: aarch64
include: ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}

defaults:
run:
shell: bash

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v3
Expand All @@ -94,23 +109,18 @@ jobs:
submodules: true

- name: Set up QEMU
if: matrix.os == 'ubuntu-latest' && matrix.cibw_arch == 'aarch64'
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- uses: pypa/[email protected]
- uses: pypa/cibuildwheel@39a63b5912f086dd459cf6fcb13dcdd3fe3bc24d # v2.15.0
env:
with:
only: ${{ matrix.only }}
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: ${{ matrix.cibw_python }}
CIBW_ARCHS: ${{ matrix.cibw_arch }}
CIBW_TEST_EXTRAS: "test"
CIBW_TEST_COMMAND: "cd .. && python {project}/tests/__init__.py"
CIBW_TEST_COMMAND_WINDOWS: "cd .. && python {project}\\tests\\__init__.py"
CIBW_TEST_SKIP: "*universal2:arm64"
CIBW_ENVIRONMENT: "IMMU_SKIP_MYPY_TESTS=1"

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: dist
path: wheelhouse/*.whl
Expand Down
2 changes: 1 addition & 1 deletion immutables/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# supported platforms, publish the packages on PyPI, merge the PR
# to the target branch, create a Git tag pointing to the commit.

__version__ = '0.20.dev0'
__version__ = '0.20'
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "immutables"
description = "Immutable Collections"
authors = [{name = "MagicStack Inc", email = "[email protected]"}]
requires-python = '>=3.8.0'
readme = "README.rst"
license = {text = "Apache License, Version 2.0"}
dynamic = ["version"]
Expand Down Expand Up @@ -78,3 +79,16 @@ ignore_errors = true
[[tool.mypy.overrides]]
module = "immutables._testutils"
ignore_errors = true

[tool.cibuildwheel]
build-frontend = "build"
test-extras = "test"

[tool.cibuildwheel.macos]
test-command = "python {project}/tests/__init__.py"

[tool.cibuildwheel.windows]
test-command = "python {project}\\tests\\__init__.py"

[tool.cibuildwheel.linux]
test-command = "python {project}/tests/__init__.py"
Loading