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
14 changes: 13 additions & 1 deletion .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest] # windows-latest excluded for now
platform: [macos-latest, ubuntu-22.04, ubuntu-latest] # windows-latest excluded for now
python-version: ["3.7", "3.11"]
exclude:
# 3.7 is not available anymore on macos-latest
- platform: macos-latest
python-version: "3.7"
- platform: ubuntu-latest
python-version: "3.7"

runs-on: ${{ matrix.platform }}

Expand All @@ -35,6 +37,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Set up CMake >= 3.5
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update
sudo apt-get install -y cmake
elif [[ "$RUNNER_OS" == "macOS" ]]; then
brew install cmake
fi
cmake --version

- name: Add requirements
run: python -m pip install --upgrade wheel setuptools

Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ jobs:
submodules: true
fetch-depth: 0

- name: Install OpenSSL Development Libraries (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libssl-dev

- name: Install OpenSSL Development Libraries (macOS)
if: runner.os == 'macOS'
run: brew install openssl

- name: Write version.txt on release event
if: github.event_name == 'release'
run: echo ${{ github.event.release.tag_name }} > VERSION.txt
Expand All @@ -30,8 +38,9 @@ jobs:
- name: Check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: source-archive-${{ github.job }}
path: dist/*.tar.gz


Expand All @@ -48,6 +57,14 @@ jobs:
with:
submodules: true
fetch-depth: 0

- name: Install OpenSSL development libraries
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y libssl-dev

- name: Install OpenSSL for macOS
if: matrix.os == 'macos-latest'
run: brew install openssl

- name: Set up QEMU
if: runner.os == 'Linux'
Expand All @@ -63,16 +80,20 @@ jobs:
env:
CIBW_ARCHS_MACOS: auto universal2
CIBW_ARCHS_LINUX: auto aarch64
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64
CIBW_BEFORE_ALL_LINUX: dnf install -y libatomic
CIBW_SKIP: pp* cp36-* cp37-* *-musllinux_* *-manylinux_i686
MACOSX_DEPLOYMENT_TARGET: 10.15
CIBW_SKIP: pp* #Skip PyPy builds

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheelhouse-${{ matrix.os }}
path: wheelhouse/*.whl


Expand Down
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ pybind11_add_module(libmav

target_include_directories(libmav PRIVATE src/libmav/include)

# Link libatomic when available (required on some architectures like aarch64)
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_LIBRARIES atomic)
check_cxx_source_compiles("
#include <atomic>
int main() { std::atomic<bool> a{false}; return a.load(); }
" HAS_LIBATOMIC)
unset(CMAKE_REQUIRED_LIBRARIES)
if(HAS_LIBATOMIC)
target_link_libraries(libmav PRIVATE atomic)
endif()

# EXAMPLE_VERSION_INFO is defined by setup.py and passed into the C++ code as a
# define (VERSION_INFO) here.
target_compile_definitions(libmav
Expand Down
1 change: 1 addition & 0 deletions pybind11
Submodule pybind11 added at a2e59f
37 changes: 0 additions & 37 deletions pybind11/.appveyor.yml

This file was deleted.

38 changes: 0 additions & 38 deletions pybind11/.clang-format

This file was deleted.

72 changes: 0 additions & 72 deletions pybind11/.clang-tidy

This file was deleted.

73 changes: 0 additions & 73 deletions pybind11/.cmake-format.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions pybind11/.github/CODEOWNERS

This file was deleted.

Loading
Loading