From f22435f1e510cfb97d59558c0ec349c7e798c874 Mon Sep 17 00:00:00 2001 From: Emmett Lalish Date: Mon, 18 Nov 2024 02:01:00 -0800 Subject: [PATCH] Fix publishing (#1056) * try to fix npm artifacts * fix python SDist * cibuildwheel: build universal binary for macos * try to build all binaries * skip builds on incompatible architecture * again * typo... * typo? * update --------- Co-authored-by: pca006132 --- .github/workflows/build_wheels.yml | 8 +++++++- .github/workflows/deploy.yml | 2 +- .github/workflows/publish_npm.yml | 4 ++-- CMakeLists.txt | 8 +++++--- pyproject.toml | 3 +-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 18e2f092d..fa6290d81 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -11,11 +11,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2019, macos-latest] + # macos-13: x86-64 + # macos-14: arm64 + os: [ubuntu-22.04, windows-2019, macos-14, macos-13] steps: - run: | git config --global submodule.fetchJobs 8 git config --global core.longpaths true + - if: matrix.os == 'macos-13' + run: echo "CIBW_ARCHS=x86_64" >> "$GITHUB_ENV" + - if: matrix.os == 'macos-14' + run: echo "CIBW_ARCHS=arm64 universal2" >> "$GITHUB_ENV" - uses: actions/checkout@v4 - name: Build wheels uses: pypa/cibuildwheel@v2.19 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e7593c31d..ca03f9683 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: mv ./docs ./public - name: Download built examples - uses: dawidd6/action-download-artifact@v3 + uses: dawidd6/action-download-artifact@v6 with: workflow: manifold.yml workflow_conclusion: completed diff --git a/.github/workflows/publish_npm.yml b/.github/workflows/publish_npm.yml index cc31b9fee..2f2a19a7a 100644 --- a/.github/workflows/publish_npm.yml +++ b/.github/workflows/publish_npm.yml @@ -15,11 +15,11 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 20 registry-url: 'https://registry.npmjs.org' - name: Download built examples - uses: dawidd6/action-download-artifact@v3 + uses: dawidd6/action-download-artifact@v6 with: workflow: manifold.yml workflow_conclusion: completed diff --git a/CMakeLists.txt b/CMakeLists.txt index ab9d0c5f3..5a7a1a325 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,9 +211,11 @@ include(${PROJECT_SOURCE_DIR}/cmake/configHelper.cmake) add_subdirectory(src) add_subdirectory(bindings) -add_subdirectory(samples) -add_subdirectory(test) -add_subdirectory(extras) +if(MANIFOLD_TEST) + add_subdirectory(samples) + add_subdirectory(test) + add_subdirectory(extras) +endif() include(${PROJECT_SOURCE_DIR}/cmake/info.cmake) diff --git a/pyproject.toml b/pyproject.toml index a5958ad36..fe2c47766 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,9 +63,8 @@ before-all = "git clone --depth 1 --branch v2021.10.0 https://github.com/oneapi- "cmake.define.FETCHCONTENT_UPDATES_DISCONNECTED" = "ON" [tool.cibuildwheel.macos] -archs = ["x86_64", "arm64"] +archs = ["x86_64", "arm64", "universal2"] environment = "MACOSX_DEPLOYMENT_TARGET=10.14" -test-skip = "*-macosx_arm64 *-macosx_universal2:arm64" [tool.cibuildwheel.windows] before-build = "pip install delvewheel"