From 0bf7f6c88c9239bb7e306b3dc3f35b5c1ec2ab96 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 16 Oct 2024 08:55:24 -0400 Subject: [PATCH] redo --- .github/workflows/build-wheels.yml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 27fd6a38..44af4d8e 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -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 @@ -125,26 +126,18 @@ 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: @@ -152,7 +145,8 @@ jobs: 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' @@ -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 }} @@ -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 @@ -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