Skip to content

Commit

Permalink
redo
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Oct 16, 2024
1 parent 512fb6c commit 0bf7f6c
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ permissions:
jobs:
build-wheels:
name: Wheel - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }}
needs: build-sdist
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -125,34 +126,27 @@ jobs:
- name: Clean workspace
uses: Chia-Network/actions/clean-workspace@main

- name: Checkout code
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
fetch-depth: 0
name: packages-sdist
path: ./target/wheels/

- uses: Chia-Network/actions/setup-python@main
with:
python-version: ${{ matrix.python.major-dot-minor }}

- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Set up rust
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
run: |
python -m pip install maturin
- name: Build MacOs with maturin on Python ${{ matrix.python }}
if: matrix.os.matrix == 'macos'
env:
MACOSX_DEPLOYMENT_TARGET: "13.0"
run: |
python${{ matrix.python.major-dot-minor }} -m venv venv
. venv/bin/activate
maturin build -i python --release -m wheel/Cargo.toml
pip install build
python -m build target/wheels/*.tar.gz
- name: Build Linux with maturin on Python ${{ matrix.python }}
if: matrix.os.matrix == 'ubuntu'
Expand All @@ -166,9 +160,8 @@ jobs:
rustup target add ${{ matrix.python.by-arch[matrix.arch.matrix].rustup-target }} && \
python${{ matrix.python.major-dot-minor }} -m venv /venv && \
. /venv/bin/activate && \
pip install --upgrade pip && \
pip install maturin && \
CC=gcc maturin build --release --manylinux ${{ matrix.python.by-arch[matrix.arch.matrix].manylinux-version }} -m wheel/Cargo.toml \
pip install build && \
CC=gcc python -m build target/wheels/*.tar.gz \
'
- name: Build Windows with maturin on Python ${{ matrix.python }}
Expand All @@ -179,7 +172,8 @@ jobs:
run: |
py -${{ matrix.python.major-dot-minor }} -m venv venv
. .\venv\Scripts\Activate.ps1
maturin build -i python --release -m wheel/Cargo.toml
pip install build
python -m build target/wheels/*.tar.gz
- uses: Chia-Network/actions/create-venv@main
id: create-venv
Expand Down Expand Up @@ -271,8 +265,8 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: packages-sdist-${{ matrix.os.name }}-${{ matrix.python.major-dot-minor }}-${{ matrix.arch.name }}
path: ./target/wheels/
name: packages-sdist
path: ./target/wheels/*.tar.gz

fmt:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 0bf7f6c

Please sign in to comment.