Skip to content

Commit

Permalink
Prepare for 1.4 (#477)
Browse files Browse the repository at this point in the history
* cleanup and restructure

* enable python 3.12

* fix typing

* update most EOL deps

* all failing checks hopefully pass now

* update precommit hook versions

* fixing some problems

* fix ruff error

* again fix all problems
  • Loading branch information
gijzelaerr authored May 1, 2024
1 parent 7fb4bcb commit d51b193
Show file tree
Hide file tree
Showing 53 changed files with 3,054 additions and 3,214 deletions.
6 changes: 0 additions & 6 deletions .github/actions/linux_armv7l/Dockerfile

This file was deleted.

28 changes: 0 additions & 28 deletions .github/actions/manylinux_2_24_aarch64/action.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .github/actions/manylinux_2_24_x86_64/entrypoint.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/pypa/manylinux_2_24_aarch64:latest
FROM quay.io/pypa/manylinux_2_28_aarch64:latest

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'linux_armv7l'
description: 'Builds linux_armv7l package'
name: 'manylinux_2_28_aarch64'
description: 'Builds manylinux_2_28_aarch64 package'
inputs:
script:
description: 'Specifies the path to the build script'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/pypa/manylinux_2_24_x86_64:latest
FROM quay.io/pypa/manylinux_2_28_x86_64:latest

COPY /entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'manylinux_2_24_x86_64'
description: 'Builds manylinux_2_24_x86_64 package'
name: 'manylinux_2_28_x86_64'
description: 'Builds manylinux_2_28_x86_64 package'
inputs:
script:
description: 'Specifies the path to the build script'
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/build-and-test-arm32v7.yml

This file was deleted.

26 changes: 13 additions & 13 deletions .github/workflows/build-and-test-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,52 @@ on:
jobs:
linux-build-aarch64:
name: Build wheel for linux arm64
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare snap7 archive
uses: ./.github/actions/prepare_snap7

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Build wheel
uses: ./.github/actions/manylinux_2_24_aarch64
uses: ./.github/actions/manylinux_2_28_aarch64
with:
script: ./.github/build_scripts/build_package.sh
platform: manylinux_2_24_aarch64
platform: manylinux_2_28_aarch64
makefile: aarch64-linux-gnu.mk
python: /opt/python/cp38-cp38/bin/python

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: wheelhouse/*.whl

test-wheels-aarch64:
name: Testing wheel
needs: linux-build-aarch64
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

Expand All @@ -61,8 +61,8 @@ jobs:
docker run --rm --interactive -v $PWD/tests:/tests \
-v $PWD/pyproject.toml:/pyproject.toml \
-v $PWD/wheelhouse:/wheelhouse \
"arm64v8/python:${{ matrix.python-version }}-buster" /bin/bash -s <<EOF
"arm64v8/python:${{ matrix.python-version }}-bullseye" /bin/bash -s <<EOF
python3 -m pip install $(ls wheelhouse/*_aarch64.whl)
python3 -m pip install pytest pytest-asyncio
python3 -m pip install pytest
python -m pytest tests/ -m "server or util or client or mainloop or partner"
EOF
34 changes: 17 additions & 17 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@ on:
jobs:
linux-build-86_64:
name: Build wheel for linux x86_64
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare snap7 archive
uses: ./.github/actions/prepare_snap7

- name: Build wheel
uses: ./.github/actions/manylinux_2_24_x86_64
uses: ./.github/actions/manylinux_2_28_x86_64
with:
script: ./.github/build_scripts/build_package.sh
platform: manylinux_2_24_x86_64
platform: manylinux_2_28_x86_64
makefile: x86_64_linux.mk
python: /opt/python/cp38-cp38/bin/python
wheeldir: wheelhouse/${{ runner.os }}/

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: wheelhouse/*/*.whl

windows-build:
name: Build wheel for windows
runs-on: windows-latest
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare snap7 archive
uses: ./.github/actions/prepare_snap7
Expand All @@ -49,17 +49,17 @@ jobs:
cp dist/*.whl wheelhouse/${{ runner.os }}/
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: wheelhouse/*/*.whl

osx-build:
name: Build wheel for osx
runs-on: macos-11
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare snap7 archive
uses: ./.github/actions/prepare_snap7
Expand All @@ -84,7 +84,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: wheelhouse/*/*.whl
Expand All @@ -96,24 +96,24 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-20.04, windows-2022, macos-14]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install pytest
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pytest pytest-asyncio
python3 -m pip install pytest
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update -qq
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ env:
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build container image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update -qq
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:gijzelaar/snap7
sudo apt-get update -qq
sudo apt-get install -y libsnap7-dev libsnap7-1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update -qq
Expand Down
Loading

0 comments on commit d51b193

Please sign in to comment.