Skip to content

Commit

Permalink
[CI] build wheels macOS and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Dec 2, 2024
1 parent ed7ec5b commit e7a88e5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ jobs:
# will use its default cross-compilation settings for Windows on ARM64.
# For macOS, we build universal wheels that work on both Intel and ARM macs.
build-macos-windows:
if: false
name: Build wheels for ${{ matrix.os }}
needs: [build-sdist]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ environment = { PY_BUILD_CMAKE_VERBOSE = "1" }
test-command = "pytest {package}/python/test"
test-extras = ["test"]

[tool.cibuildwheel.config-settings]
--local = "scripts/ci/py-build-cmake.toml"

[tool.cibuildwheel.macos]
archs = ["universal2"]
before-build = [
Expand Down
3 changes: 3 additions & 0 deletions scripts/ci/pre-build-macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
print(profile)

opts = dict(shell=True, check=True)
if not Path("recipes").exists():
run(f"git clone https://github.com/tttapa/conan-recipes recipes", **opts)
run(f"conan remote add tttapa-conan-recipes recipes --force", **opts)
for c in ("Debug", "Release"):
run(
"conan install . -pr:h ./cibw.profile --build=missing -s build_type=" + c,
Expand Down
5 changes: 4 additions & 1 deletion scripts/ci/pre-build-windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@
print(profile)

opts = dict(shell=True, check=True)
if not Path("recipes").exists():
run(f"git clone https://github.com/tttapa/conan-recipes recipes", **opts)
run(f"conan remote add tttapa-conan-recipes recipes --force", **opts)
for c in ("RelWithDebInfo", "Release"):
run(
"conan install . -pr:h ./cibw.profile --build=missing -s build_type=Release",
"conan install . -pr:h ./cibw.profile --build=missing -s build_type=" + c,
**opts,
)
2 changes: 2 additions & 0 deletions scripts/ci/py-build-cmake.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO = "/INCREMENTAL:NO /DEBUG:FULL /OPT:REF
ALPAQA_PYTHON_DEBUG_CONFIG = "RelWithDebInfo"
[windows.cmake.10]
install_config = "RelWithDebInfo"
preset = "conan-python-relwithdebinfo"
build_presets = "conan-python-relwithdebinfo"
build_path="build/python-relwithdebinfo"

0 comments on commit e7a88e5

Please sign in to comment.