Skip to content

Commit

Permalink
Update github pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernrennfanz committed Nov 6, 2023
1 parent 1badff0 commit 27abb57
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install:
- 7z x swigwin.zip -oC:\ > NUL
- set PATH=C:\swigwin-4.1.1;%PATH%
# install pylon
- appveyor-retry curl -sSfL -o pylon_installer.exe %PYLON_DOWNLOAD_URL_BASE%Basler_pylon_7.2.1.25747.exe
- appveyor-retry curl -sSfL -o pylon_installer.exe %PYLON_DOWNLOAD_URL_BASE%basler_pylon_7_4_0_14900.exe
- pylon_installer.exe /quiet /install="Runtime;GigE_Support;USB_Support;Camera_Link_Support;CoaXPress_Support;GenTL_Consumer_Support;CamEmu_Support;SDKs"
# PYLON_DEV_DIR is not available in the shell after installation, so we set it manually
- set PYLON_DEV_DIR=%PROGRAMFILES%\Basler\pylon 7\Development
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ jobs:
- name: Installer list
run: |
tee pylon-installer.txt <<"EOF"
${PYLON_DOWNLOAD_URL_BASE_7_2}pylon_7.2.1.25747_x86_64_setup.tar.gz
${PYLON_DOWNLOAD_URL_BASE_7_2}pylon_7.2.1.25747_aarch64_setup.tar.gz
${PYLON_DOWNLOAD_URL_BASE_7_4}pylon_7.4.0.14900_linux_x86_64_setup.tar.gz
${PYLON_DOWNLOAD_URL_BASE_7_4}pylon_7.4.0.14900_linux_aarch64_setup.tar.gz
${PYLON_DOWNLOAD_URL_BASE}pylon_6.2.0.21487_armhf_setup.tar.gz
${PYLON_DOWNLOAD_URL_BASE}pylon-6.2.0.21487.dmg
${PYLON_DOWNLOAD_ARM64_URL_BASE}pylon_7.3.1.0006_Darwin-arm64_SDK.selfsh
${PYLON_DOWNLOAD_URL_BASE}pylon_7_3_1_0011.dmg
EOF
- uses: actions/cache@v3
id: cache
Expand All @@ -49,7 +48,7 @@ jobs:
PYLON_DOWNLOAD_URL_BASE: ${{ secrets.PYLON_DOWNLOAD_URL_BASE }}
PYLON_DOWNLOAD_URL_BASE_6_2: ${{ secrets.PYLON_DOWNLOAD_URL_BASE_6_2 }}
PYLON_DOWNLOAD_URL_BASE_6_3: ${{ secrets.PYLON_DOWNLOAD_URL_BASE_6_3 }}
PYLON_DOWNLOAD_URL_BASE_7_2: ${{ secrets.PYLON_DOWNLOAD_URL_BASE_7_2 }}
PYLON_DOWNLOAD_URL_BASE_7_4: ${{ secrets.PYLON_DOWNLOAD_URL_BASE_7_4 }}
PYLON_DOWNLOAD_ARM64_URL_BASE: ${{ secrets.PYLON_DOWNLOAD_ARM64_URL_BASE }}
run: |
mkdir pylon-installer && cd pylon-installer
Expand Down Expand Up @@ -81,7 +80,7 @@ jobs:
fail-fast: false
matrix:
a: [cp36m, cp37m, cp38, cp39, cp3_10, cp3_11]
p: [manylinux_2_28_x86_64, manylinux_2_28_aarch64, manylinux_2_28_armv7l]
p: [manylinux_2_31_x86_64, manylinux_2_31_aarch64, manylinux_2_28_armv7l]

env:
P: ${{ matrix.p }}
Expand Down Expand Up @@ -147,21 +146,16 @@ jobs:

- name: Setup pylon
run: |
# install x86_64
# install universal
cd pylon-installer
hdiutil attach pylon-*.dmg
hdiutil attach pylon_*.dmg
sudo installer -pkg /Volumes/pylon\ *\ Camera\ Software\ Suite/pylon-*.pkg -target /
hdiutil detach /Volumes/pylon\ *\ Camera\ Software\ Suite
# install arm64
chmod a+x pylon_7.3.1.0006_Darwin-arm64_SDK.selfsh
./pylon_7.3.1.0006_Darwin-arm64_SDK.selfsh --accept
mkdir /tmp/pylon_framework
cp -pr pylon/Frameworks/* /tmp/pylon_framework
- name: Build wheels
uses: pypa/[email protected]
env:
PYLON_FRAMEWORK_ARM64: /tmp/pylon_framework
PYLON_FRAMEWORK_ARM64: /Library/Frameworks
PYLON_FRAMEWORK_X86_64: /Library/Frameworks

- uses: actions/upload-artifact@v3
Expand Down
32 changes: 17 additions & 15 deletions scripts/build/build-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ while [ $# -gt 0 ]; do
done

BASE_IMAGE=""
BASE_IMAGE32=""
BASE_IMAGE64=""
QEMU_ARCH=""
PYTHON="python"
PYLON_ARCH=""
Expand All @@ -54,12 +56,12 @@ if [ $BUILD_DISTRO = "debian" ]; then

#Note: Be careful when changing the base image. Not every image is available for every architecture.
case $ABI_TAG in
cp36m) BASE_IMAGE="python:3.6.15-buster" ;;
cp37m) BASE_IMAGE="python:3.7.16-buster" ;;
cp38) BASE_IMAGE="python:3.8.16-buster" ;;
cp39) BASE_IMAGE="python:3.9.16-buster" ;;
cp3_10) BASE_IMAGE="python:3.10.11-buster" ;;
cp3_11) BASE_IMAGE="python:3.11.3-buster" ;;
cp36m) BASE_IMAGE32="python:3.6.15-buster"; BASE_IMAGE64="python:3.6.15-bullseye" ;;
cp37m) BASE_IMAGE32="python:3.7.16-buster"; BASE_IMAGE64="python:3.7.16-bullseye" ;;
cp38) BASE_IMAGE32="python:3.8.16-buster"; BASE_IMAGE64="python:3.8.16-bullseye" ;;
cp39) BASE_IMAGE32="python:3.9.16-buster"; BASE_IMAGE64="python:3.9.16-bullseye" ;;
cp3_10) BASE_IMAGE32="python:3.10.11-buster"; BASE_IMAGE64="python:3.10.11-bullseye" ;;
cp3_11) BASE_IMAGE32="python:3.11.3-buster"; BASE_IMAGE64="python:3.11.3-bullseye" ;;
*)
echo "Unsupported abi '$ABI_TAG'. Supported tags: cp36m, cp37m, cp38, cp39, cp3_10, cp3_11"
exit 1
Expand All @@ -83,19 +85,19 @@ fi
CMD_WRAPPER=linux64

case $PLATFORM_TAG in
linux_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="amd64/$BASE_IMAGE"; PYLON_ARCH=x86_64 ;;
linux_i686) QEMU_ARCH="i386"; BASE_IMAGE="i386/$BASE_IMAGE"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;;
linux_armv7l) QEMU_ARCH="arm"; BASE_IMAGE="arm32v7/$BASE_IMAGE"; PYLON_ARCH=armhf CMD_WRAPPER=linux32 ;;
linux_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="arm64v8/$BASE_IMAGE"; PYLON_ARCH=aarch64 ;;
manylinux_2_28_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="amd64/$BASE_IMAGE"; PYLON_ARCH=x86_64 ;;
manylinux_2_28_i686) QEMU_ARCH="i386"; BASE_IMAGE="i386/$BASE_IMAGE"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;;
manylinux_2_28_armv7l) QEMU_ARCH="arm"; BASE_IMAGE="arm32v7/$BASE_IMAGE"; PYLON_ARCH=armhf CMD_WRAPPER=linux32 ;;
manylinux_2_28_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="arm64v8/$BASE_IMAGE"; PYLON_ARCH=aarch64 ;;
linux_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="amd64/$BASE_IMAGE64"; PYLON_ARCH=x86_64 ;;
linux_i686) QEMU_ARCH="i386"; BASE_IMAGE="i386/$BASE_IMAGE32"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;;
linux_armv7l) QEMU_ARCH="arm"; BASE_IMAGE="arm32v7/$BASE_IMAGE32"; PYLON_ARCH=armhf CMD_WRAPPER=linux32 ;;
linux_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="arm64v8/$BASE_IMAGE64"; PYLON_ARCH=aarch64 ;;
manylinux_2_31_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="amd64/$BASE_IMAGE64"; PYLON_ARCH=x86_64 ;;
manylinux_2_28_i686) QEMU_ARCH="i386"; BASE_IMAGE="i386/$BASE_IMAGE32"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;;
manylinux_2_28_armv7l) QEMU_ARCH="arm"; BASE_IMAGE="arm32v7/$BASE_IMAGE32"; PYLON_ARCH=armhf CMD_WRAPPER=linux32 ;;
manylinux_2_31_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="arm64v8/$BASE_IMAGE64"; PYLON_ARCH=aarch64 ;;
manylinux2014_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="quay.io/pypa/manylinux2014_x86_64"; PYLON_ARCH=x86_64 ;;
manylinux2014_i686) QEMU_ARCH="i386"; BASE_IMAGE="quay.io/pypa/manylinux2014_i686"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;;
manylinux2014_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="quay.io/pypa/manylinux2014_aarch64"; PYLON_ARCH=aarch64 ;;
*)
echo "Unsupported platform tag '$PLATFORM_TAG'. Supported platforms: linux_x86_64, linux_i686, linux_armv7l, linux_aarch64, manylinux2014_x86_64, manylinux2014_i686, manylinux2014_aarch64, manylinux_2_28_<arch>"
echo "Unsupported platform tag '$PLATFORM_TAG'. Supported platforms: linux_x86_64, linux_i686, linux_armv7l, linux_aarch64, manylinux2014_x86_64, manylinux2014_i686, manylinux2014_aarch64, manylinux_2_28_<arch>, manylinux_2_31_<arch>"
exit 1
esac

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
from pathlib import Path
# The pylon version this source tree was designed for, by platform
ReferencePylonVersion = {
"Windows": "7.2.1",
"Windows": "7.4.0",
# ATTENTION: This version is the pylon core version reported by pylon-config,
# which is not equal to the version on the outer tar.gz
"Linux": "7.2.1",
"Linux": "7.4.0",
"Linux_armv7l": "6.2.0",
"Darwin": "6.2.0",
"Darwin": "7.3.0",
"Darwin_arm64": "7.3.1"
}

Expand Down

0 comments on commit 27abb57

Please sign in to comment.