diff --git a/.github/workflows/python-wheel.yml b/.github/workflows/python-wheel.yml index 1c59521e8..f4f4334ad 100644 --- a/.github/workflows/python-wheel.yml +++ b/.github/workflows/python-wheel.yml @@ -128,25 +128,18 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - with: - fetch-depth: 0 - 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 + - name: Set up Rust uses: dtolnay/rust-toolchain@stable - name: Install dependencies - run: | - python -m pip install maturin + run: python -m pip install maturin - - name: Build MacOs with maturin on Python ${{ matrix.python }} + - name: Build MacOS wheel (Python ${{ matrix.python }}) if: matrix.os.matrix == 'macos' env: MACOSX_DEPLOYMENT_TARGET: "11.0" @@ -155,7 +148,7 @@ jobs: . venv/bin/activate maturin build -i python --release -m wheel/Cargo.toml - - name: Build Linux with maturin on Python ${{ matrix.python }} + - name: Build Linux wheel (Python ${{ matrix.python }}) if: matrix.os.matrix == 'ubuntu' run: | docker run --rm --pull always \ @@ -172,7 +165,7 @@ jobs: CC=gcc maturin build --release --manylinux ${{ matrix.python.by-arch[matrix.arch.matrix].manylinux-version }} -m wheel/Cargo.toml \ ' - - name: Build Windows with maturin on Python ${{ matrix.python }} + - name: Build Windows wheel (Python ${{ matrix.python }}) if: matrix.os.matrix == 'windows' env: CC: "clang" @@ -189,7 +182,7 @@ jobs: with: directories: ${{ steps.create-venv.outputs.activate-venv-directories }} - - name: Install chia_rs wheel + - name: Install wheel run: | pip install --no-index --find-links target/wheels/ chia_rs @@ -217,7 +210,7 @@ jobs: git diff --exit-code build-sdist: - name: sdist - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }} + name: Build sdist (${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }}) runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} strategy: fail-fast: false @@ -259,12 +252,12 @@ jobs: name: packages-sdist-${{ matrix.os.name }}-${{ matrix.python.major-dot-minor }}-${{ matrix.arch.name }} path: ./target/wheels/ - unit_tests: + unit-tests: runs-on: ${{ matrix.os }} strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] - name: Unit tests + name: Python tests steps: # the test files are read verbatim, making it problematic if git is # allowed to insert \r when checking out files @@ -276,7 +269,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable - - name: Continue with coverage + - name: Pytest if: matrix.os == 'ubuntu-latest' run: | python -m venv venv @@ -286,7 +279,6 @@ jobs: pip install colorama maturin pytest pytest-xdist chia-blockchain==2.1.2 clvm==0.9.8 maturin develop --release -m wheel/Cargo.toml pytest tests - python -c 'with open("rust_cov.info") as f: lines = [l for l in f if not (l.startswith("DA:") and int(l.split(",")[1].strip()) >= 2**63)]; open("lcov.info", "w").writelines(lines)' upload: name: Upload to PyPI - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }} @@ -294,7 +286,7 @@ jobs: needs: - build-wheels - build-sdist - - unit_tests + - unit-tests strategy: fail-fast: false matrix: