diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7110562d8..8753ca8ae 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -37,10 +37,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Update pip - run: | - python -m pip install --upgrade pip - - name: Set up rust uses: dtolnay/rust-toolchain@stable @@ -52,7 +48,7 @@ jobs: - name: Install dependencies run: | - python -m pip install maturin + python -m pip install --upgrade pip rustup target add x86_64-unknown-linux-musl python -m pip install pytest pytest-xdist python -m pip install mypy @@ -61,7 +57,7 @@ jobs: - name: Build run: | python -m pip install clvm_tools colorama blspy chia-blockchain==2.1.2 clvm==0.9.8 - maturin develop --release -m wheel/Cargo.toml + python -m pip install wheel/ - name: python mypy run: | @@ -126,12 +122,12 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install maturin colorama clvm_tools + python -m pip install colorama clvm_tools rustup target add x86_64-unknown-linux-musl - name: Build run: | - maturin develop --release -m wheel/Cargo.toml + python -m pip install wheel/ - name: test generators run: | diff --git a/.github/workflows/build-riscv64.yml b/.github/workflows/build-riscv64.yml index 57708ccf3..0fee3bb89 100644 --- a/.github/workflows/build-riscv64.yml +++ b/.github/workflows/build-riscv64.yml @@ -23,6 +23,7 @@ jobs: name: Build riscv64 crate and run tests runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest] @@ -51,6 +52,7 @@ jobs: name: ${{ matrix.os }} 📦 Build Wheel ${{ matrix.python.major-dot-minor }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest] python: @@ -79,21 +81,22 @@ jobs: run: | docker run --rm --platform linux/riscv64 \ -v ${{ github.workspace }}:/ws --workdir=/ws \ + -e PIP_EXTRA_INDEX_URL='https://pypi.chia.net/simple/' \ chianetwork/ubuntu-22.04-risc-builder:latest \ bash -exc '\ pyenv global ${{ matrix.python.matrix }} python -m venv venv && \ source ./venv/bin/activate && \ - pip install --upgrade pip && \ - pip install --extra-index-url https://pypi.chia.net/simple/ maturin==1.2.3 && \ - maturin build -i python --release -m wheel/Cargo.toml \ + source ./llp.sh && \ + pip install --upgrade pip build && \ + python -m build --wheel ./wheel \ ' - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: packages-${{ matrix.os }}-${{ matrix.python.major-dot-minor }} - path: ./target/wheels + path: wheel/dist/ if-no-files-found: error upload: name: Upload to Chia PyPI @@ -117,7 +120,7 @@ jobs: with: merge-multiple: true pattern: packages-* - path: ./target/wheels + path: wheel/dist/ - name: Configure AWS credentials if: env.RELEASE == 'true' @@ -138,8 +141,8 @@ jobs: if: env.RELEASE == 'true' shell: sh run: | - (cd target/wheels/; ls chia_rs-*.whl) > new_wheel_list - cat new_wheel_list | xargs -I % sh -c 'ls -l target/wheels/%' + (cd dist/; ls chia_rs-*.whl) > new_wheel_list + cat new_wheel_list | xargs -I % sh -c 'ls -l dist/%' - name: Choose wheels to upload if: env.RELEASE == 'true' @@ -152,4 +155,4 @@ jobs: if: env.RELEASE == 'true' shell: sh run: | - cat upload_wheel_list | xargs -I % sh -c 'aws s3 cp target/wheels/% s3://download.chia.net/simple/chia-rs/' + cat upload_wheel_list | xargs -I % sh -c 'aws s3 cp dist/% s3://download.chia.net/simple/chia-rs/' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dcaf8c314..2a233ff81 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,8 +43,8 @@ repos: pass_filenames: false - id: wheel name: build wheel - description: run maturin develop on the wheel + description: build python wheel stages: [pre-push] - entry: sh -c "cd wheel && maturin develop" + entry: python -m build --wheel wheel/ language: system pass_filenames: false diff --git a/llp.sh b/llp.sh new file mode 100644 index 000000000..fbc37ed99 --- /dev/null +++ b/llp.sh @@ -0,0 +1,3 @@ +# TODO: avoid needing this + +#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))')