add eigen (#4) #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build package wheels | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build_wheels: | |
| name: Wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, windows-2022, macos-14] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache dependencies | |
| id: cache-vcpkg-deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: vcpkg_installed | |
| key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }} | |
| - name: Acquire vcpkg | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: "Microsoft/vcpkg" | |
| path: vcpkg | |
| ref: c9c17dcea3016bc241df0422e82b8aea212dcb93 | |
| - name: Install libraries with vcpkg.json (macOS/Linux) | |
| shell: bash | |
| run: | | |
| case "${RUNNER_OS}" in | |
| "Windows") | |
| VCPKG_HOST_TRIPLET="x64-mingw-dynamic" | |
| ;; | |
| "Linux") | |
| VCPKG_HOST_TRIPLET="x64-linux-dynamic" | |
| ;; | |
| "macOS") | |
| VCPKG_HOST_TRIPLET="arm64-osx-dynamic" | |
| ;; | |
| *) | |
| echo "Unsupported RUNNER_OS: ${RUNNER_OS}" | |
| exit 1 | |
| ;; | |
| esac | |
| echo VCPKG_HOST_TRIPLET="$VCPKG_HOST_TRIPLET" >> $GITHUB_ENV | |
| echo $VCPKG_HOST_TRIPLET | |
| - uses: pypa/cibuildwheel@v3.1.3 | |
| env: | |
| CIBW_BUILD: "cp313-*" | |
| CIBW_SKIP: "*musllinux* *win32*" | |
| CIBW_BEFORE_ALL_WINDOWS: bash tools\cibw_before.sh | |
| CIBW_ENVIRONMENT_WINDOWS: "CMAKE_PREFIX_PATH=D:/a/pycpp/pycpp/pybind11/pybind11/share/cmake" | |
| CIBW_ENVIRONMENT_PASS_LINUX: "VCPKG_HOST_TRIPLET RUNNER_OS" | |
| CIBW_BEFORE_ALL_LINUX: "source tools/cibw_before.sh" | |
| CIBW_ENVIRONMENT_LINUX: "CMAKE_PREFIX_PATH=/project/pybind11/pybind11/share/cmake" | |
| CIBW_BEFORE_ALL_MACOS: "source tools/cibw_before.sh" | |
| CIBW_ENVIRONMENT_MACOS: "CMAKE_PREFIX_PATH=${{ github.workspace }}/pybind11/pybind11/share/cmake" | |
| MACOSX_DEPLOYMENT_TARGET: "14.0" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl | |
| merge_wheels: | |
| runs-on: ubuntu-22.04 | |
| needs: build_wheels | |
| steps: | |
| - name: Merge Artifacts | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: wheels | |
| delete-merged: true |