Skip to content

Commit

Permalink
Update dependencies and relicense as MIT/Apache2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Jan 3, 2025
1 parent 663b285 commit ff86d50
Show file tree
Hide file tree
Showing 25 changed files with 595 additions and 198 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build Wheels (Linux v3)
name: Build Wheels (Linux)

on:
workflow_dispatch:
inputs:
platform:
archs:
required: true
default: x86_64 i686 aarch64 ppc64le s390x armv7l

Expand All @@ -27,11 +27,12 @@ jobs:

- id: set-matrix
run: |
TARGETS="$(python -m cibuildwheel --archs "${{ github.event.inputs.platform }}" --print-build-identifiers)"
TARGETS="$(python -m cibuildwheel --archs "${{ github.event.inputs.archs }}" --print-build-identifiers)"
echo 'matrix=["'$(echo $TARGETS | sed -e 's/ /","/g')'"]' >> $GITHUB_OUTPUT
shell: bash
env:
CIBW_BUILD_FRONTEND: build
CIBW_SKIP: 'cp27-* pp*'
CIBW_SKIP: 'cp27-* cp36-* pp*'
CIBW_DEPENDENCY_VERSIONS: pinned
CIBW_PLATFORM: linux

Expand All @@ -57,7 +58,7 @@ jobs:
- name: Cache pip
uses: actions/cache@v4
with:
key: cache--${{ hashFiles('./requirements-dev.txt') }}
key: linux--${{ hashFiles('./requirements-dev.txt') }}
path: ~/.cache/pip

- name: Setup python
Expand Down Expand Up @@ -99,6 +100,7 @@ jobs:
find -name '*.zip' -exec rm '{}' +
find -name '*.whl' -exec mv -t. '{}' +
find -type d -delete
shell: bash
working-directory: ./wheelhouse
- uses: actions/upload-artifact@v4
with:
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Build Wheels (MacOS)

on:
workflow_dispatch:
inputs:
archs:
required: true
default: x86_64 arm64 universal2

jobs:
define-matrix:
runs-on: macos-13
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- run: python -m pip install -U pip wheel setuptools
- run: python -m pip install -U 'cibuildwheel==2.*'

- id: set-matrix
run: |
TARGETS="$(python -m cibuildwheel --archs "${{ github.event.inputs.archs }}" --print-build-identifiers)"
echo 'matrix=["'$(echo $TARGETS | sed -e 's/ /","/g')'"]' >> $GITHUB_OUTPUT
shell: bash
env:
CIBW_BUILD_FRONTEND: build
CIBW_SKIP: 'cp27-* cp36-* pp*'
CIBW_DEPENDENCY_VERSIONS: pinned
CIBW_PLATFORM: macos

build:
runs-on: macos-13

needs:
- define-matrix
strategy:
matrix:
only: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Cache pip
uses: actions/cache@v4
with:
key: windows--${{ hashFiles('./requirements-dev.txt') }}
path: ~/.cache/pip

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- run: python -m pip install -U pip wheel setuptools
- run: python -m pip install -Ur requirements-dev.txt
- run: python -m pip install -U 'cibuildwheel==2.*'

- run: make prepare

- run: python -m cibuildwheel --output-dir wheelhouse --only ${{ matrix.only }}
env:
CIBW_BUILD_FRONTEND: build
CIBW_SKIP: 'cp27-* pp*'
CIBW_DEPENDENCY_VERSIONS: pinned
CIBW_PLATFORM: linux
CIBW_TEST_COMMAND: python {project}/scripts/run-tests.py

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.only }}
path: ./wheelhouse
retention-days: 1

combine:
runs-on: ubuntu-latest
needs:
- define-matrix
- build
steps:
- uses: actions/download-artifact@v4
with:
path: ./wheelhouse
- run: |
find -name '*.zip' -exec unzip '{}' ';'
find -name '*.zip' -exec rm '{}' +
find -name '*.whl' -exec mv -t. '{}' +
find -type d -delete
shell: bash
working-directory: ./wheelhouse
- uses: actions/upload-artifact@v4
with:
name: wheelhouse
path: ./wheelhouse
68 changes: 0 additions & 68 deletions .github/workflows/build_wheels_windows.yml

This file was deleted.

103 changes: 103 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Build Wheels (Windows)

on:
workflow_dispatch:
inputs:
archs:
required: true
default: AMD64 x86 ARM64

jobs:
define-matrix:
runs-on: windows-2022
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- run: python -m pip install -U pip wheel setuptools
- run: python -m pip install -U 'cibuildwheel==2.*'

- id: set-matrix
run: |
TARGETS="$(python -m cibuildwheel --archs "${{ github.event.inputs.archs }}" --print-build-identifiers)"
echo 'matrix=["'$(echo $TARGETS | sed -e 's/ /","/g')'"]' >> $GITHUB_OUTPUT
shell: bash
env:
CIBW_BUILD_FRONTEND: build
CIBW_SKIP: 'cp27-* cp36-* pp*'
CIBW_DEPENDENCY_VERSIONS: pinned
CIBW_PLATFORM: windows

build:
runs-on: windows-2022

needs:
- define-matrix
strategy:
matrix:
only: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Cache pip
uses: actions/cache@v4
with:
key: windows--${{ hashFiles('./requirements-dev.txt') }}
path: ~/.cache/pip

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- run: python -m pip install -U pip wheel setuptools
- run: python -m pip install -Ur requirements-dev.txt
- run: python -m pip install -U 'cibuildwheel==2.*'

- run: make prepare

- run: python -m cibuildwheel --output-dir wheelhouse --only ${{ matrix.only }}
env:
CIBW_BUILD_FRONTEND: build
CIBW_SKIP: 'cp27-* pp*'
CIBW_DEPENDENCY_VERSIONS: pinned
CIBW_PLATFORM: linux
CIBW_TEST_COMMAND: python {project}/scripts/run-tests.py

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.only }}
path: ./wheelhouse
retention-days: 1

combine:
runs-on: ubuntu-latest
needs:
- define-matrix
- build
steps:
- uses: actions/download-artifact@v4
with:
path: ./wheelhouse
- run: |
find -name '*.zip' -exec unzip '{}' ';'
find -name '*.zip' -exec rm '{}' +
find -name '*.whl' -exec mv -t. '{}' +
find -type d -delete
shell: bash
working-directory: ./wheelhouse
- uses: actions/upload-artifact@v4
with:
name: wheelhouse
path: ./wheelhouse
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
- macos-latest
- windows-latest
python:
- '3.8'
- '3.11'
- '3.10'
- '3.13'

steps:
Expand Down Expand Up @@ -69,7 +68,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.13'

- name: Display Python version
run: python -c 'import sys; print(sys.version)'
Expand All @@ -82,6 +81,3 @@ jobs:

- name: Compile project
run: make install

- name: Run black
run: python -m black --check ./*.py ./src/
Loading

0 comments on commit ff86d50

Please sign in to comment.