Skip to content

CI: Fix wheel builds and build wheels on every PR - #79

Merged
pniedzielski merged 11 commits into
bloomberg:mainfrom
pniedzielski:ci/fix-wheel-build
Aug 25, 2026
Merged

pniedzielski merged 11 commits into
bloomberg:mainfrom
pniedzielski:ci/fix-wheel-build

Conversation

@pniedzielski

@pniedzielski pniedzielski commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

On every pull request, we run a series of build, test, and lint jobs that must pass before the pull request can be merged. These are contained in the build.yaml job. However, we also run a nightly build to ensure that we can build native wheels on Linux and on MacOS, which is necessary for releasing and submitting to PyPI. But, this means we don't find out that native wheels fail to build until after we've merged a pull request, and sometimes even until we try to make a release. That is the place we're currently in.

This pull request contains a series of patches that, together, get us out of this situation. Although there are many individual patches, all but the Style: patches are required in order to do so. Rather than separate out patches into separate pull requests that would individually fail to build wheels, I've decided to keep them all in one pull request, so the result of merging this pull request is that we can properly build wheels again.

The patches are grouped as follows:

  1. The first patches fix our MacOS wheel build, which fails for independent reasons to our Linux wheel build.

    • Fix: Install GTest during MacOS wheel build job
    • Style: Remove heredoc comment from MacOS build script
    • CI: Use Clang preset for MacOS wheel build
  2. The next patches update the Linux wheel build environment (manylinux version and cibuildwheel job) to a more modern, still-supported one.

    • CI: Upgrade manylinux version
    • CI: Support Python 3.14 when building wheels
  3. The next few patches correct our build script so that wheels build without errors:

    • CI: Add explicit dependency on packaging`
    • CI: Build NTF without OpenSSL
    • CI: Build NTF without zlib support
    • Style: Make build script dependency comments match CI commands
    • Style: Remove curly quote usage in environment variable
  4. The final patch turns on wheel builds in CI on each pull request, so that we get warned in a timely manner if a change would prevent us from releasing:

    • CI: Build wheels on every PR

Please see individual commit messages for details on each change.

@pniedzielski
pniedzielski force-pushed the ci/fix-wheel-build branch 16 times, most recently from 0f95728 to dabd522 Compare March 6, 2026 19:55
@pniedzielski
pniedzielski force-pushed the ci/fix-wheel-build branch 2 times, most recently from fde423b to a11a076 Compare June 24, 2026 15:13
@pniedzielski
pniedzielski force-pushed the ci/fix-wheel-build branch 4 times, most recently from 575f03c to e86f508 Compare August 25, 2026 17:42
Because BlazingMQ now requires GTest as a build dependency, commit
ac01847 taught our normal CI build job to install GTest and also
taught our Linux wheel build job to build GTest from source.  This
commit did not correctly add GTest as a build dependency to our MacOS
wheel build job, instead only changing a command in a heredoc
“comment”.  Because of this, MacOS wheel builds now fail.  Because we
do not build wheels as part of our per-PR CI, we didn’t notice this
until after the PR had been merged.

This patch makes MacOS wheel builds install Google Test as a
dependency from homebrew, fixing the missing dependency issue.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Like the Manylinux build script, the MacOS build script has a comment
at the top that contains a command to install third-party packaged
dependencies.  Unlike the Manylinux build script, though, the MacOS
build script’s comment is in the form of an unevaluated heredoc.
While it is in principle nice that a user can copy-and-paste the
command directly, using a heredoc comment like this is naughty; it
requires silencing a shellcheck warning, and it does not look like a
comment if you’re just skimming through.  This last issue seems to be
the root cause of the issue fixed by the previous commit, wherein a
dependency was added to this comment, not realizing that the comment
was unevaluated.

Rather than prioritize a hypothetical user who may need to remove some
hash characters to run a command once, this patch makes the change to
use a real comment, so it’s obvious that the command is unevaluated.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
@pniedzielski
pniedzielski force-pushed the ci/fix-wheel-build branch 3 times, most recently from 3f36c9e to 2ef2de3 Compare August 25, 2026 19:43
When building the MacOS wheel build, we notice many, harmless warnings
on each translation unit during both the we BDE build and the
BlazingMQ build.  Several of these are due to GCC flags being passed
to the system Clang compiler, which the latter does not understand.
There are two sources of this, a different one for BDE and BlazingMQ.
For BDE, we need to explicitly pass the compiler we’re using, or BDE
will default to GCC on MacOS.  For BlazingMQ, we have been
accidentally passing a GCC CMake preset file during configuration,
resulting in those flags that the system Clang compiler does not
understand to be passed.

This patch fixes both issues, explicitly telling BDE to use Clang, and
passing the Clang CMake preset to BlazingMQ, removing many of these
warnings.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
We build our wheels with an ancient version of manylinux, dating back
to 2014.  While we don’t want to be too cutting edge, we do not need
to support such an old version with our wheels.  This patch bumps the
version of manylinux we use to build wheels to manylinux 2.28, and
removes the 32-bit wheel build that is no longer supported.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
The older version of the cibuildwheel action we were using did not
support Python 3.14.  This patch bumps it so that we can build wheels
for Python 3.14.  This also allows us to remove the flag for
supporting prerelease Python versions, because all the Python versions
we now support are known to be full releases by the cibuildwheel
action.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Now that NTF supports TLS, our CI build environment needs to either
provide a statically-linked library of OpenSSL for it to link against,
or to disable OpenSSL support in NTF.  Although BlazingMQ will soon
support TLS, it does not right now.  So, this patch disables OpenSSL
support in NTF, punting the manual build down the road for when
BlazingMQ gains support for TLS.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
@pniedzielski pniedzielski changed the title CI: Build wheels on every PR CI: Fix wheel builds and build wheels on every PR Aug 25, 2026
We do not use the channel compression feature of NTF, so there is not
any benefit in building our NTF library with zlib support.  This patch
turns it off.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Our two build scripts start with header comments that include a
command that needs to be run to install packaged dependencies.  These
comments, though, have drifted from the commands we actually run to
install packaged dependencies in our CI.  This patch updates the
comments to match the commands we actually run.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
In our wheel build CI job configuration, there is an accidental use of
curly quotes where we wanted straight quotes.  This does not seem to
matter, but this patch cleans it up.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
@pniedzielski

Copy link
Copy Markdown
Contributor Author

Every now and again I'm seeing sporadic failures when building wheels, but these all look like GitHub Actions failures (timeouts when connecting to brew repos, or cloning repos, etc). I've only seen this today, though, not in any other wheel build failures.

@pniedzielski
pniedzielski marked this pull request as ready for review August 25, 2026 20:46
@pniedzielski
pniedzielski requested review from a team and a lite review from Copilot August 25, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the wheel-building pipeline so native wheels (Linux + macOS) are reliably buildable again and are built on every PR to catch regressions before merges/releases.

Changes:

  • Update cibuildwheel/manylinux configuration and Linux/macOS build scripts to restore successful wheel builds (including dependency/toolchain adjustments).
  • Add missing build prerequisites (e.g., packaging, googletest) and adjust NTF build options (disable OpenSSL, adjust compression settings).
  • Enable wheel builds on PRs by expanding the GitHub Actions workflow triggers and updating the cibuildwheel action version.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
pyproject.toml Adds build dependency and updates cibuildwheel/manylinux + pre-build dependency installation commands.
bin/build-manylinux.sh Updates manylinux base assumptions and adjusts NTF configure flags for the Linux wheel build.
bin/build-macos-universal.sh Cleans up prerequisites docs and updates macOS build to use clang preset/toolchain; disables OpenSSL in NTF.
.github/workflows/build_wheels.yml Runs wheel builds on PRs and updates cibuildwheel action/config used by CI.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml Resolved
Comment thread .github/workflows/build_wheels.yml Resolved
This patch enables the `build_wheel.yml` workflow to run on each pull
request.

Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
@pniedzielski
pniedzielski requested a review from hallfox August 25, 2026 20:56
@pniedzielski pniedzielski added the skip news No news entry is required label Aug 25, 2026
@pniedzielski
pniedzielski merged commit 3f78f32 into bloomberg:main Aug 25, 2026
27 checks passed
@pniedzielski
pniedzielski deleted the ci/fix-wheel-build branch August 25, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news No news entry is required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants