diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d1e309bd2..a69117a55 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,139 +2,89 @@ name: main on: push: - branches: ["main"] + branches: ["main", "fix-build"] jobs: - macos_wheel: - runs-on: macos-15-intel + build_wheels: strategy: + fail-fast: false matrix: - arch: [x86_64] - cw_build: ["cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"] - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: build wheels - uses: pypa/cibuildwheel@v2.23.2 - env: - CIBW_ARCHS: ${{ matrix.arch }} - CIBW_BUILD: ${{ matrix.cw_build }} - SPLINEPY_GITHUB_ACTIONS_BUILD: True - SKBUILD_INSTALL_COMPONENTS: PythonModule - - - uses: actions/upload-artifact@v4 - with: - name: wheels-macos-15-intel-${{ strategy.job-index }} - path: ./wheelhouse/*.whl - retention-days: 1 - - macos_wheel-m1: - runs-on: macos-latest - strategy: - matrix: - arch: [arm64] - cw_build: ["cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"] - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: build wheels - uses: pypa/cibuildwheel@v2.23.2 - env: - CIBW_ARCHS: ${{ matrix.arch }} - CIBW_BUILD: ${{ matrix.cw_build }} - SPLINEPY_GITHUB_ACTIONS_BUILD: True - SKBUILD_INSTALL_COMPONENTS: PythonModule - - - uses: actions/upload-artifact@v4 - with: - name: wheels-macos-${{ strategy.job-index }} - path: ./wheelhouse/*.whl - retention-days: 1 - - linux_wheel: - runs-on: ubuntu-latest - strategy: - matrix: - arch: [x86_64] - cw_build: ["cp310*many*", "cp311*many*", "cp312*many*", "cp313*many*", "cp314*many*"] - + include: + # macOS Intel + - os: macos-15-intel + arch: x86_64 + build: ["cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"] + platform: macos + # macOS ARM (M1/M2) + - os: macos-latest + arch: arm64 + build: ["cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"] + platform: macos + # Linux + - os: ubuntu-latest + arch: x86_64 + build: ["cp310*many*", "cp311*many*", "cp312*many*", "cp313*many*", "cp314*many*"] + platform: linux + skip: "cp314t-*" + # Windows + - os: windows-latest + arch: AMD64 + build: ["cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"] + platform: windows + test_skip: "*-win_arm64" + + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: recursive - - name: build wheels - uses: pypa/cibuildwheel@v2.23.2 - env: - CIBW_ARCHS: ${{ matrix.arch }} - CIBW_BUILD: ${{ matrix.cw_build }} - SPLINEPY_GITHUB_ACTIONS_BUILD: True - SKBUILD_INSTALL_COMPONENTS: PythonModule - - - uses: actions/upload-artifact@v4 - with: - name: wheels-linux-${{ strategy.job-index }} - path: ./wheelhouse/*.whl - retention-days: 1 - windows_wheel: - runs-on: windows-latest - strategy: - matrix: - arch: [AMD64] - cw_build: ["cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"] - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: build wheels - uses: pypa/cibuildwheel@v2.23.2 + - name: Build wheels + uses: pypa/cibuildwheel@v4.1.0 env: CIBW_ARCHS: ${{ matrix.arch }} - CIBW_BUILD: ${{ matrix.cw_build }} - CIBW_TEST_SKIP: "*-win_arm64" + CIBW_BUILD: ${{ join(matrix.build, ' ') }} + CIBW_SKIP: ${{ matrix.skip || '' }} + CIBW_TEST_SKIP: ${{ matrix.test_skip || '' }} SPLINEPY_GITHUB_ACTIONS_BUILD: True SKBUILD_INSTALL_COMPONENTS: PythonModule - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: - name: wheels-windows-${{ strategy.job-index }} + name: wheels-${{ matrix.platform }}-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl - retention-days: 1 + retention-days: 7 - source_dist: + build_sdist: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: recursive - - name: Build sdist + - name: Build source distribution run: pipx run build --sdist - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: wheels-source path: ./dist/* - retention-days: 1 - + retention-days: 7 upload_pypi: - needs: [macos_wheel, macos_wheel-m1, linux_wheel, windows_wheel, source_dist] + needs: [build_wheels, build_sdist] runs-on: ubuntu-latest permissions: id-token: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v7 with: pattern: wheels-* merge-multiple: true path: dist - - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish to PyPI + if: github.ref == 'refs/heads/main' + uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true diff --git a/.gitignore b/.gitignore index 8d55e5683..80dda6ca8 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ docs/source/_generated **/CMakeFiles/ **/Makefile **/cmake_install.cmake + +# +examples/not_upload/ diff --git a/docs/source/conf.py b/docs/source/conf.py index c86207e02..2c26a5d50 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,7 +48,7 @@ "icon_links": [ { "name": "GitHub", - "url": "https://github.com/tataratat/splinepy", + "url": "https://github.com/isosuite/splinepy", "icon": "fa-brands fa-square-github", }, {