Skip to content

Commit

Permalink
fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Денис Петров committed May 1, 2024
1 parent 7fb4bcb commit e09405f
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/actions/linux_armv7l/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/nikteliy/manylinux_2_24_armv7l:python3.7
FROM ghcr.io/nikteliy/manylinux_2_24_armv7l:python3.8

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
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: 'manylinux_2_24_aarch64'
description: 'Builds manylinux_2_24_aarch64 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
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
8 changes: 7 additions & 1 deletion .github/actions/prepare_snap7/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ runs:

- name: Update wheel
shell: bash
run: python3 -m pip install --upgrade pip wheel build
if: ${{ runner.os != 'macOS' }}
run: python3 -m pip install --upgrade pip wheel build setuptools

- name: Update wheel
shell: bash
if: ${{ runner.os == 'macOS' }}
run: python3 -m pip install --upgrade pip wheel build setuptools --break-system-packages
4 changes: 2 additions & 2 deletions .github/build_scripts/build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ make -f "${INPUT_MAKEFILE}" install
popd
mkdir -p snap7/lib/
cp /usr/lib/libsnap7.so snap7/lib/
${INPUT_PYTHON} -m pip install wheel build auditwheel patchelf
${INPUT_PYTHON} -m build . --wheel -C="--build-option=--plat-name=${INPUT_PLATFORM}"
${INPUT_PYTHON} -m pip install --upgrade pip wheel build auditwheel patchelf setuptools
${INPUT_PYTHON} -m build . --wheel -C="--plat-name=${INPUT_PLATFORM}"

auditwheel repair dist/*${INPUT_PLATFORM}.whl --plat ${INPUT_PLATFORM} -w ${INPUT_WHEELDIR}
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-arm32v7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
docker run --platform linux/arm/v7 --rm --interactive -v $PWD/tests:/tests \
-v $PWD/pyproject.toml:/pyproject.toml \
-v $PWD/wheelhouse:/wheelhouse \
"arm32v7/python:${{ matrix.python-version }}-buster" /bin/bash -s <<EOF
"arm32v7/python:${{ matrix.python-version }}-bookworm" /bin/bash -s <<EOF
python -m pip install pytest pytest-asyncio $(ls wheelhouse/*manylinux_2_24_armv7l.whl)
python -m pytest tests/ -m "server or util or client or mainloop or partner"
EOF
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
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

Expand Down Expand Up @@ -61,7 +61,7 @@ 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 }}-bookworm" /bin/bash -s <<EOF
python3 -m pip install $(ls wheelhouse/*_aarch64.whl)
python3 -m pip install pytest pytest-asyncio
python -m pytest tests/ -m "server or util or client or mainloop or partner"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
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 }}/
Expand All @@ -44,7 +44,7 @@ jobs:
run: |
mkdir -p snap7/lib/
Copy-Item .\snap7-full-1.4.2\release\Windows\Win64\snap7.dll .\snap7\lib
python3 -m build . --wheel -C="--build-option=--plat-name=win_amd64"
python3 -m build . --wheel -C="--plat-name=win_amd64"
mkdir -p wheelhouse/${{ runner.os }}/
cp dist/*.whl wheelhouse/${{ runner.os }}/
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Build wheel
run: |
python3 -m build . --wheel -C="--build-option=--plat-name=macosx_10_9_universal2"
python3 -m build . --wheel -C="--plat-name=macosx_10_9_universal2"
mkdir -p wheelhouse/${{ runner.os }}/
cp dist/*.whl wheelhouse/${{ runner.os }}/
Expand All @@ -96,7 +96,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-11]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [master]
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
- name: Install snap7
run: brew install snap7
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
run: python3 -m pip install --upgrade pip setuptools --break-system-packages
- name: Install python-snap7
run: python3 -m pip install .[test]
run: python3 -m pip install -e .[test] --break-system-packages
- name: Run pytest
run: |
pytest -m "server or util or client or mainloop"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=68.0.0", "wheel"]
requires = ["setuptools>=69.4.2", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand Down

0 comments on commit e09405f

Please sign in to comment.