Try to use rustup #113
Workflow file for this run
This file contains 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: Wheel Builds | |
on: | |
push: | |
branches: [ 'musl-build' ] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.11' | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.1 twine | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_BEFORE_ALL_LINUX: "apk add --no-cache rustup && rustup-init -y && source $HOME/.cargo/env && rustup install stable && rustup default stable" | |
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" CARGO_NET_GIT_FETCH_WITH_CLI="true"' | |
CIBW_MUSLLINUX_X86_64_IMAGE: quay.io/pypa/musllinux_1_1_x86_64:latest | |
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* | |
CIBW_BEFORE_BUILD: pip install -U setuptools-rust | |
CIBW_TEST_REQUIRES: networkx testtools fixtures | |
CIBW_BUILD_FRONTEND: "pip" | |
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests | |
CIBW_TEST_SKIP: cp312-* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Upload to PyPI | |
run: twine upload ./wheelhouse/*.whl | |
env: | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
TWINE_USERNAME: retworkx-ci |