Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Wheels

on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
Expand All @@ -23,7 +28,7 @@ jobs:

- name: Build sdist
env:
BLAZINGMQ_PYTHON_NO_PKGCONFIG: ’1’
BLAZINGMQ_PYTHON_NO_PKGCONFIG: '1'
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -85,11 +90,10 @@ jobs:
run: |
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
- name: Build wheels
uses: pypa/cibuildwheel@v2.19.2
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }}
CIBW_BUILD: ${{ matrix.cibw_python }}-*
CIBW_PRERELEASE_PYTHONS: True
CIBW_TEST_COMMAND: python3 -m pytest {project}/tests/unit
CIBW_TEST_REQUIRES: pytest mock pkgconfig
- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -130,12 +134,11 @@ jobs:
run: |
echo "CFLAGS=-target arm64-apple-macos14" >> $GITHUB_ENV
- name: Build wheels
uses: pypa/cibuildwheel@v2.19.2
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }}
CIBW_BUILD: ${{ matrix.cibw_python }}-*
CIBW_BUILD_VERBOSITY: 1
CIBW_PRERELEASE_PYTHONS: True
CIBW_TEST_COMMAND: python3 -m pytest {project}/tests/unit
CIBW_TEST_REQUIRES: pytest mock pkgconfig
MACOSX_DEPLOYMENT_TARGET: "14.0"
Expand Down
33 changes: 14 additions & 19 deletions bin/build-macos-universal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@

# This script builds BlazingMQ and all of its dependencies for MacOS 11.0.
#
# Before running this script, install following prerequisites, if not present
# yet, by copy-and-pasting the commands between `<<PREREQUISITES` and
# `PREREQUISITES` below:
# shellcheck disable=SC2188
<<PREREQUISITES
brew install \
curl \
pkgconfig \
ninja \
flex \
zlib \
bison \
flex \
google-benchmark \
googletest \
cmake
PREREQUISITES
# Before running this script, install the following prerequisites if not
# present yet:
#
# brew install \
# cmake \
# ninja \
# flex \
# bison \
# zlib \
# google-benchmark \
# googletest

set -e
set -u
Expand Down Expand Up @@ -53,7 +47,7 @@ PATH="${DIR_THIRDPARTY}/bde-tools/bin:$PATH"

if [ ! -e "${DIR_BUILD}/bde/.complete" ]; then
pushd "${DIR_THIRDPARTY}/bde"
eval "$(bbs_build_env -u opt_64_pic_cpp17 -b "${DIR_BUILD}/bde" -i ${DIR_INSTALL})"
eval "$(bbs_build_env -p clang -u opt_64_pic_cpp17 -b "${DIR_BUILD}/bde" -i ${DIR_INSTALL})"
bbs_build configure --prefix="${DIR_INSTALL}"
bbs_build build -j 16
bbs_build install --install_dir "/" --prefix="${DIR_INSTALL}"
Expand All @@ -72,6 +66,7 @@ if [ ! -e "${DIR_BUILD}/ntf-core/.complete" ]; then
--with-zlib \
--without-lz4 \
--without-zstd \
--without-openssl \
--without-warnings-as-errors \
--without-usage-examples \
--without-applications
Expand Down Expand Up @@ -103,7 +98,7 @@ if [ ! -e "${DIR_BUILD}/blazingmq/.complete" ]; then
-DCMAKE_INSTALL_PREFIX="${DIR_INSTALL}" \
-DCMAKE_MODULE_PATH="${DIR_ROOT}" \
-DCMAKE_PREFIX_PATH="${DIR_THIRDPARTY}/bde-tools" \
-DCMAKE_TOOLCHAIN_FILE="${DIR_THIRDPARTY}/bde-tools/BdeBuildSystem/toolchains/darwin/gcc-default.cmake" \
-DCMAKE_TOOLCHAIN_FILE="${DIR_THIRDPARTY}/bde-tools/BdeBuildSystem/toolchains/darwin/clang-default.cmake" \
-DFLEX_ROOT="${FLEX_ROOT}"
-G "Ninja")
cmake -B "${DIR_BUILD}/blazingmq" -S "." "${CMAKE_OPTIONS[@]}"
Expand Down
24 changes: 13 additions & 11 deletions bin/build-manylinux.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#!/usr/bin/env bash

# This script builds BlazingMQ and all of its dependencies on RHEL7.
# This script builds BlazingMQ and all of its dependencies on AlmaLinux 8
# (manylinux_2_28).
#
# Before running this script, install the following prerequisites if not
# present yet:
#
# sudo yum install -y \
# gdb \
# curl \
# pkgconfig \
# ninja-build \
# flex-devel \
# zlib-devel \
# openssl-devel \
# m4
# sudo dnf install -y \
# gdb \
# curl \
# pkgconfig \
# ninja-build \
# flex \
# flex-devel \
# zlib-devel \
# zlib-static

set -e
set -u
Expand Down Expand Up @@ -116,9 +117,10 @@ if [ ! -e "${DIR_BUILD}/ntf-core/.complete" ]; then
--output "${DIR_BUILD}/ntf-core" \
--ufid opt_64_pic_cpp17 \
--generator "Ninja" \
--with-zlib \
--without-zlib \
--without-lz4 \
--without-zstd \
--without-openssl \
--without-warnings-as-errors \
--without-usage-examples \
--without-applications
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ requires = ['setuptools>=39.2.0',
'Cython>=0.28.4, <3; python_version < "3.8"',
'Cython >= 3, <4; python_version >= "3.8"',
'wheel>=0.31.0',
'packaging>=24.2',
'pkgconfig>1.5.0']

build-backend = "setuptools.build_meta"
Expand Down Expand Up @@ -53,8 +54,7 @@ directory = "news"
[tool.cibuildwheel]
build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
skip = "*-musllinux_*"
Comment thread
pniedzielski marked this conversation as resolved.
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
manylinux-x86_64-image = "manylinux_2_28"

[tool.cibuildwheel.linux.environment]
PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig"
Expand All @@ -64,13 +64,13 @@ PKG_CONFIG_PATH="install/lib/pkgconfig"

[tool.cibuildwheel.linux]
before-all = [
"yum install -y gdb curl pkgconfig ninja-build flex flex-devel zlib-devel openssl-devel",
"dnf install -y gdb curl pkgconfig ninja-build flex flex-devel zlib-devel zlib-static",
"DIR_INSTALL=/usr/local bash bin/build-manylinux.sh"
]

[tool.cibuildwheel.macos]
before-all = [
"brew install cmake ninja flex bison zlib google-benchmark",
"brew install cmake ninja flex bison zlib google-benchmark googletest",
"bash bin/build-macos-universal.sh"
]
before-test = [
Expand All @@ -82,6 +82,6 @@ before-test = [
[[tool.cibuildwheel.overrides]]
select = "*-musllinux*"
before-all = [
"apk add --update gdb curl pkgconfig ninja flex flex-dev zlib-dev openssl-dev",
"apk add --update gdb curl pkgconfig ninja flex flex-dev zlib-dev",
"DIR_INSTALL=/usr/local bash bin/build-manylinux.sh"
]
Loading