Skip to content

Commit

Permalink
fix: use classic linker with AppleClang 15+ (#3167)
Browse files Browse the repository at this point in the history
* ci: try macos 13

Signed-off-by: Henry Schreiner <[email protected]>

* fix: try classic linker

Signed-off-by: Henry Schreiner <[email protected]>

* fix: base on AppleClang version

Signed-off-by: Henry Schreiner <[email protected]>

* style: pre-commit fixes

* fix: require CMake 3.29+ on macos from Python

Signed-off-by: Henry Schreiner <[email protected]>

* ci: add pass job for tests

Signed-off-by: Henry Schreiner <[email protected]>

---------

Signed-off-by: Henry Schreiner <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
henryiii and pre-commit-ci[bot] authored Jul 18, 2024
1 parent 7fce3d4 commit 0eff78c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on:
- windows-latest
- ubuntu-latest
- macos-11
- macos-13
python-version:
- '3.12'
- '3.11'
Expand Down Expand Up @@ -256,3 +256,13 @@ jobs:

- name: Test
run: python -m pytest -vv -rs tests -k cppyy


pass-tests:
if: always()
needs: [ run-tests, Linux-ROOT, Linux-cppyy ]
runs-on: ubuntu-latest
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
10 changes: 9 additions & 1 deletion awkward-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE

cmake_minimum_required(VERSION 3.15...3.26)
cmake_minimum_required(VERSION 3.15...3.30)

# Project must be near the top
project(
Expand All @@ -11,6 +11,14 @@ project(
message(STATUS "CMake version ${CMAKE_VERSION}")
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")

if(CMAKE_CXX_COMPILER_ID MATCHES AppleClang AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL
15)
if(CMAKE_VERSION VERSION_LESS 3.29)
message(WARNING "CMake should be 3.29+ to support AppleClang 15+. Trying anyway.")
endif()
set(CMAKE_LINKER_TYPE APPLE_CLASSIC)
endif()

# Check for header-only libraries
if(NOT (EXISTS "header-only" AND EXISTS "include/awkward/kernels.h"))
message(
Expand Down
8 changes: 6 additions & 2 deletions awkward-cpp/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"scikit-build-core[pyproject]>=0.2.0",
"scikit-build-core>=0.9",
"pybind11",
]
build-backend = "scikit_build_core.build"
Expand Down Expand Up @@ -59,7 +59,7 @@ Releases = "https://github.com/scikit-hep/awkward-1.0/releases"


[tool.scikit-build]
minimum-version = "0.2"
minimum-version = "0.9"
build-dir = "build/{cache_tag}"
sdist.reproducible = true
sdist.include = [
Expand All @@ -71,3 +71,7 @@ sdist.include = [
"tests-cpu-kernels",
"tests-cpu-kernels-explicit"
]

[[tool.scikit-build.overrides]]
if.platform-system = "darwin"
cmake.version = ">=3.29"

0 comments on commit 0eff78c

Please sign in to comment.