Skip to content

Commit 318c523

Browse files
committed
fix(ci): Fix Eigen3 version compatibility and macOS runner in publish workflow
- CMakeLists.txt: Fall back to FetchContent when system Eigen3 is incompatible (Homebrew ships Eigen 5.x which fails version check) - publish.yml: Replace deprecated macos-13 with macos-15 runner - publish.yml: Add fail-fast: false to prevent one platform failure from canceling all wheel builds
1 parent 211256d commit 318c523

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161

6262
python-wheels:
6363
strategy:
64+
fail-fast: false
6465
matrix:
6566
include:
6667
- os: ubuntu-latest
@@ -75,10 +76,7 @@ jobs:
7576
arch: arm64
7677
plat_tag: macosx_11_0_arm64
7778
lib_name: libsonare.dylib
78-
- os: macos-13
79-
arch: x86_64
80-
plat_tag: macosx_10_15_x86_64
81-
lib_name: libsonare.dylib
79+
# macOS x86_64 omitted: GitHub no longer provides Intel macOS runners
8280
runs-on: ${{ matrix.os }}
8381
steps:
8482
- uses: actions/checkout@v4
@@ -116,7 +114,7 @@ jobs:
116114
117115
- name: Test wheel
118116
run: |
119-
pip install bindings/python/dist/*.whl
117+
pip install bindings/python/dist/*.whl pytest
120118
python3 -c "import libsonare; print(f'Version: {libsonare.version()}')"
121119
cd bindings/python && python3 -m pytest tests/ -x -q
122120
@@ -126,7 +124,8 @@ jobs:
126124
path: bindings/python/dist/*.whl
127125

128126
publish-pypi:
129-
needs: [publish-npm, python-wheels]
127+
needs: [python-wheels]
128+
if: always() && needs.python-wheels.result == 'success'
130129
runs-on: ubuntu-latest
131130
environment:
132131
name: pypi

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ if(ENABLE_COVERAGE)
4040
endif()
4141

4242
# Eigen3
43-
if(BUILD_WASM)
44-
# For WASM, use FetchContent to get Eigen3
43+
find_package(Eigen3 3.3 QUIET NO_MODULE)
44+
if(NOT Eigen3_FOUND)
45+
# Fallback: fetch Eigen3 (for WASM or when system Eigen is incompatible)
4546
include(FetchContent)
4647
FetchContent_Declare(
4748
Eigen3
@@ -50,8 +51,6 @@ if(BUILD_WASM)
5051
GIT_SHALLOW TRUE
5152
)
5253
FetchContent_MakeAvailable(Eigen3)
53-
else()
54-
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
5554
endif()
5655

5756
# サブディレクトリ

0 commit comments

Comments
 (0)