Skip to content

Commit

Permalink
Merge pull request #853 from Chia-Network/enable-openssl
Browse files Browse the repository at this point in the history
add the openssl feature to the chia_rs wheel
  • Loading branch information
arvidn authored Jan 8, 2025
2 parents ed05836 + e6052b0 commit b422719
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,18 @@ jobs:
python -m pip install pytest pytest-xdist
python -m pip install mypy
python -m pip install black
python -m pip install clvm_tools colorama blspy chia-blockchain==2.1.2 clvm==0.9.8
- name: Build
- name: Build (windows)
if: matrix.os.matrix == 'windows'
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
- name: Build (non-windows)
if: matrix.os.matrix != 'windows'
run: |
maturin develop --release -m wheel/Cargo.toml --features=openssl
- name: python mypy
run: |
mypy tests
Expand Down Expand Up @@ -131,7 +137,7 @@ jobs:
- name: Build
run: |
maturin develop --release -m wheel/Cargo.toml
maturin develop --release -m wheel/Cargo.toml --features=openssl
- name: test generators
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
run: |
python${{ matrix.python.major-dot-minor }} -m venv venv
. venv/bin/activate
maturin build -i python --release -m wheel/Cargo.toml
maturin build -i python --release -m wheel/Cargo.toml --features=openssl,pyo3/extension-module
- name: Build Linux with maturin on Python ${{ matrix.python }}
if: matrix.os.matrix == 'ubuntu'
Expand All @@ -150,13 +150,14 @@ jobs:
${{ matrix.python.by-arch[matrix.arch.matrix].docker-url }} \
bash -exc '\
yum -y install openssl-devel && \
yum -y install perl-IPC-Cmd && \
source $HOME/.cargo/env && \
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 \
CC=gcc maturin build --release --manylinux ${{ matrix.python.by-arch[matrix.arch.matrix].manylinux-version }} -m wheel/Cargo.toml --features=openssl,pyo3/extension-module \
'
- name: Build Windows with maturin on Python ${{ matrix.python }}
Expand Down
3 changes: 3 additions & 0 deletions wheel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ python-source = "python"
[package.metadata.cargo-machete]
ignored = ["chia-client", "chia-ssl"]

[features]
openssl = ["clvmr/openssl"]

[dependencies]
clvmr = { workspace = true }
hex = { workspace = true }
Expand Down

0 comments on commit b422719

Please sign in to comment.