Skip to content

Commit

Permalink
Merge pull request #564 from hugovk/add-3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 15, 2022
2 parents 203f311 + b5ce312 commit d84c832
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.10"]
os: [ubuntu-20.04]
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ jobs:
os: [windows-latest, macOS-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: pip
cache-dependency-path: ".github/workflows/deploy.yml"

- name: Install dependencies
run: |
python -m pip install cibuildwheel==2.3.0
python -m pip install cibuildwheel==2.10.0
python -m pip install -U twine
- name: Build wheels
Expand All @@ -47,14 +48,12 @@ jobs:
CIBW_ARCHS_MACOS: "x86_64 arm64"
# Build only on Linux architectures that don't need qemu emulation.
CIBW_ARCHS_LINUX: "x86_64 i686"
# Don't build with prerelease Python versions.
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7,<3.11"
# Run the test suite after each build.
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: pytest {package}/tests

- name: Upload as build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl
Expand All @@ -81,53 +80,55 @@ jobs:
strategy:
fail-fast: false
matrix:
architecture: ["aarch64"]
python-version:
- pp37
- pp38
- pp39
- cp37
- cp38
- cp39
- cp310
- cp311

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: pip
cache-dependency-path: ".github/workflows/deploy.yml"

- name: Install dependencies
run: |
python -m pip install cibuildwheel==2.3.0
python -m pip install cibuildwheel==2.10.0
python -m pip install -U twine
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build wheels
run: python -m cibuildwheel --output-dir dist
# Options are supplied via environment variables:
env:
# Build only the currently selected Linux architecture (so we can
# parallelise for speed).
CIBW_ARCHS_LINUX: "${{ matrix.architecture }}"
CIBW_ARCHS_LINUX: "aarch64"
# Likewise, select only one Python version per job to speed this up.
CIBW_BUILD: "${{ matrix.python-version }}-*"
# Run the test suite after each build.
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: pytest {package}/tests

- name: Upload as build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl
Expand All @@ -150,18 +151,18 @@ jobs:
twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*.whl
build-sdist:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: ['build-native-wheels', 'build-QEMU-emulated-wheels']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"
cache: pip
cache-dependency-path: "setup.py"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: micnncim/action-label-syncer@v1
with:
prune: false
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on: [push, pull_request, workflow_dispatch]

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- uses: pre-commit/action@v2.0.3
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.0
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
- { python-version: "pypy-3.8", os: macos-latest }
- { python-version: "3.10", os: windows-latest }
- { python-version: "3.10", os: macos-latest }
- { python-version: "3.11-dev", os: windows-latest }
- { python-version: "3.11-dev", os: macos-latest }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand All @@ -48,7 +50,7 @@ jobs:
python -m pytest
- name: Test with coverage
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.9' }}
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.10' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
Expand All @@ -66,7 +68,7 @@ jobs:
matrix:
architecture: [ppc64le, s390x, aarch64, arm/v6, 386]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

# https://github.com/docker/setup-qemu-action
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
download_url = https://github.com/ultrajson/ultrajson
project_urls =
Source=https://github.com/ultrajson/ultrajson
Expand Down

0 comments on commit d84c832

Please sign in to comment.