Skip to content

Commit

Permalink
Update pyproject.toml to add rust installation to cibuildwheel for li…
Browse files Browse the repository at this point in the history
…nux (#1135)

update pyproject.toml to add rust installation to cibuildwheel for linux
  • Loading branch information
yunchu authored Aug 30, 2023
1 parent 7019fb7 commit 01b4f35
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/publish_sdist_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Installing Rust toolchain
uses: actions-rs/toolchain@v1
- name: Installing python
uses: actions/setup-python@v4
with:
profile: minimal
toolchain: stable
override: true
python-version: "3.11"
cache: pip
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.15.0
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.1
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ omit = [
[tool.cibuildwheel]
build = "cp38-*_x86_64 cp39-*_x86_64 cp310-*_x86_64 cp311-*_x86_64 cp38-*_amd64 cp39-*_amd64 cp310-*_amd64 cp311-*_amd64"

[tool.cibuildwheel.linux]
before-all = [
"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh",
"sh ./rustup-init.sh -y --default-toolchain stable --profile minimal"
]

environment = { PATH="$HOME/.cargo/bin:$PATH" }

[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
Expand Down

0 comments on commit 01b4f35

Please sign in to comment.