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 627f2d8 commit 84bd4ee
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,23 @@ 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

- run: tar czf include-Xcode_15.4.tar.gz -C /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr include
- uses: actions/upload-artifact@v4
with:
name: include-Xcode_15.4
path: include-Xcode_15.4.tar.gz

- name: Download sdist
uses: actions/download-artifact@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,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
3 changes: 3 additions & 0 deletions scripts/ci/pre-build-windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,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 ("RelWithDebInfo", "Release"):
run(
"conan install . -pr:h ./cibw.profile --build=missing -s build_type=Release",
Expand Down
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 84bd4ee

Please sign in to comment.