diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58143a0..238bce5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,6 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: matrix: @@ -53,5 +52,38 @@ jobs: pip install pytest-cov pip install -e . pytest + + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + name: Install Python + with: + python-version: '3.x' + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel twine wheel + - name: Build wheels + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- -y" + CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin"' + # CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 + CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest + CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest + CIBW_SKIP: cp36-* pp* *win32 *musl* + CIBW_PRERELEASE_PYTHONS: True + CIBW_BEFORE_BUILD: pip install -U setuptools-rust + # CIBW_TEST_REQUIRES: numpy scipy pandas requests