diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index ae9b3a13b..ffce1b5ba 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -14,7 +14,7 @@ global_job_config: - checkout - mkdir artifacts blocks: - - name: "Wheels: OSX x64" + - name: "Wheels: OSX x64 - Python 3.6-3.12" run: when: "tag =~ '.*'" dependencies: [] @@ -30,10 +30,33 @@ blocks: jobs: - name: Build commands: - - PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse + - PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse 2.16.2 - tar -czf wheelhouse-macOS-${ARCH}.tgz wheelhouse - artifact push workflow wheelhouse-macOS-${ARCH}.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}.tgz/ - - name: "Wheels: OSX arm64" + - name: "Wheels: OSX x64 - Python 3.13" + run: + when: "tag =~ '.*'" + dependencies: [] + task: + agent: + machine: + type: s1-prod-macos-13-5-amd64 + env_vars: + - name: OS_NAME + value: osx + - name: ARCH + value: x64 + - name: CIBW_SKIP + value: cp36-* cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* + - name: CIBW_ENVIRONMENT_MACOS + value: MACOSX_DEPLOYMENT_TARGET=13 + jobs: + - name: Build + commands: + - PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse + - tar -czf wheelhouse-macOS-${ARCH}-py313.tgz wheelhouse + - artifact push workflow wheelhouse-macOS-${ARCH}-py313.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}-py313.tgz/ + - name: "Wheels: OSX arm64 - Python 3.8-3.12" run: when: "tag =~ '.*'" dependencies: [] @@ -51,9 +74,34 @@ blocks: jobs: - name: Build commands: - - PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse + - PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse 2.16.2 - tar -czf wheelhouse-macOS-${ARCH}.tgz wheelhouse - artifact push workflow wheelhouse-macOS-${ARCH}.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}.tgz/ + - name: "Wheels: OSX arm64 - Python 3.13" + run: + when: "tag =~ '.*'" + dependencies: [] + task: + agent: + machine: + type: s1-prod-macos-13-5-arm64 + env_vars: + - name: OS_NAME + value: osx + - name: CIBW_ARCHS + value: arm64 + - name: ARCH + value: arm64 + - name: CIBW_SKIP + value: cp38-* cp39-* cp310-* cp311-* cp312-* + - name: CIBW_ENVIRONMENT_MACOS + value: MACOSX_DEPLOYMENT_TARGET=13 + jobs: + - name: Build + commands: + - PIP_INSTALL_OPTIONS="--user" tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse + - tar -czf wheelhouse-macOS-${ARCH}-py313.tgz wheelhouse + - artifact push workflow wheelhouse-macOS-${ARCH}-py313.tgz --destination artifacts/wheels-${OS_NAME}-${ARCH}-py313.tgz/ - name: "Wheels: Linux arm64" run: when: "tag =~ '.*'" @@ -206,8 +254,10 @@ blocks: run: when: "tag =~ '.*'" dependencies: - - "Wheels: OSX x64" - - "Wheels: OSX arm64" + - "Wheels: OSX x64 - Python 3.6-3.12" + - "Wheels: OSX x64 - Python 3.13" + - "Wheels: OSX arm64 - Python 3.8-3.12" + - "Wheels: OSX arm64 - Python 3.13" - "Wheels: Linux arm64" - "Wheels: Linux x64" - "Wheels: Windows" diff --git a/tools/build-manylinux.sh b/tools/build-manylinux.sh index 1bbf501ce..f3a596a73 100755 --- a/tools/build-manylinux.sh +++ b/tools/build-manylinux.sh @@ -15,7 +15,7 @@ # docker run -t -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64:latest /io/tools/build-manylinux.sh LIBRDKAFKA_VERSION=$1 -PYTHON_VERSIONS=("cp36" "cp37" "cp38" "cp39" "cp310" "cp311" "cp312") +PYTHON_VERSIONS=("cp36" "cp37" "cp38" "cp39" "cp310" "cp311" "cp312" "cp313") if [[ -z "$LIBRDKAFKA_VERSION" ]]; then echo "Usage: $0 " @@ -92,7 +92,7 @@ for PYBIN in /opt/python/cp*/bin; do "${PYBIN}/pip" -V "${PYBIN}/pip" install --no-index -f /io/wheelhouse confluent_kafka "${PYBIN}/python" -c 'import confluent_kafka; print(confluent_kafka.libversion())' - "${PYBIN}/pip" install -r /io/tests/requirements.txt + "${PYBIN}/pip" install pytest "${PYBIN}/pytest" /io/tests/test_Producer.py echo "## Uninstalling $PYBIN" "${PYBIN}/pip" uninstall -y confluent_kafka diff --git a/tools/mingw-w64/semaphore_commands.sh b/tools/mingw-w64/semaphore_commands.sh index f0a751ac0..c6ecd4957 100644 --- a/tools/mingw-w64/semaphore_commands.sh +++ b/tools/mingw-w64/semaphore_commands.sh @@ -8,4 +8,4 @@ export MAKE=mingw32-make # so that Autotools can find it cmd /c mklink /D C:\Python38\python3.exe C:\Python38\python.exe -python -m pip install cibuildwheel==2.16.2 +python -m pip install cibuildwheel==2.21.3 diff --git a/tools/wheels/build-wheels.bat b/tools/wheels/build-wheels.bat index 5e7203407..d23ef4311 100644 --- a/tools/wheels/build-wheels.bat +++ b/tools/wheels/build-wheels.bat @@ -13,9 +13,9 @@ set WHEELHOUSE=%4 if [%WHEELHOUSE%]==[] goto usage echo on -set CIBW_BUILD=cp36-%BW_ARCH% cp37-%BW_ARCH% cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH% cp311-%BW_ARCH% cp312-%BW_ARCH% +set CIBW_BUILD=cp36-%BW_ARCH% cp37-%BW_ARCH% cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH% cp311-%BW_ARCH% cp312-%BW_ARCH% cp313-%BW_ARCH% set CIBW_BEFORE_BUILD=python -m pip install delvewheel==1.1.4 -set CIBW_TEST_REQUIRES=-r tests/requirements.txt +set CIBW_TEST_REQUIRES=pytest set CIBW_TEST_COMMAND=pytest {project}\tests\test_Producer.py rem set CIBW_BUILD_VERBOSITY=3 set include=%cd%\%DEST%\build\native\include diff --git a/tools/wheels/build-wheels.sh b/tools/wheels/build-wheels.sh index c0f21f882..5ccf0b0b1 100755 --- a/tools/wheels/build-wheels.sh +++ b/tools/wheels/build-wheels.sh @@ -10,15 +10,14 @@ this_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Skip PyPy, Python2, old Python3 versions, musl, and x86 builds. export CIBW_SKIP="pp* cp27-* cp35-* *i686 *musllinux* $CIBW_SKIP" # Run a simple test suite -export CIBW_TEST_REQUIRES="-r tests/requirements.txt" +export CIBW_TEST_REQUIRES="pytest" export CIBW_TEST_COMMAND="pytest {project}/tests/test_Producer.py" export CIBW_MANYLINUX_X86_64_IMAGE="manylinux_2_28" export CIBW_MANYLINUX_AARCH64_IMAGE="manylinux_2_28" - librdkafka_version=$1 wheeldir=$2 -cibuildwheel_version="2.16.2" +cibuildwheel_version=${3:-"2.21.3"} if [[ -z $wheeldir ]]; then echo "Usage: $0 "