Skip to content

Commit

Permalink
Fix maturin build
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Liu <[email protected]>

Fix maturin build

Signed-off-by: Austin Liu <[email protected]>

Fix maturin build

Signed-off-by: Austin Liu <[email protected]>
  • Loading branch information
austin362667 committed Oct 14, 2024
1 parent 50f6d8c commit 46a4e4f
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/pythonbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }}
- name: Install dependencies
run: |
pip install uv
pip install uv maturin
make setup-global-uv
uv pip uninstall --system pandas pyarrow
uv pip freeze
Expand Down Expand Up @@ -93,18 +93,6 @@ jobs:
run: |
rm -rf ./gen/pb_rust/*
cargo run --bin gen_flyteidl
# First build attempt to capture OpenSSL path
- name: Build the Rust project (first attempt)
if: runner.os == 'Windows'
id: build-attempt
working-directory: ${{ github.workspace }}/flyte/flyteidl
run: cargo build --release || true
# Set OPENSSL_DIR based on dynamic build path
- name: Set OPENSSL_DIR based on dynamic build path
if: runner.os == 'Windows'
run: |
OPENSSL_DIR=$(find target -type d -name 'openssl-sys-*' -print -quit)/out/openssl-build
echo "OPENSSL_DIR=$OPENSSL_DIR" >> $GITHUB_ENV
- name: Generate Rust Protobuf (Windows)
if: runner.os == 'Windows'
shell: bash
Expand All @@ -113,14 +101,11 @@ jobs:
rm -rf ./gen/pb_rust/*
cargo run --bin gen_flyteidl
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || matrix.os == 'macos-latest' && 'x86_64-apple-darwin' || 'x86_64' }}
command: build
args: --release --out ${{ github.workspace }}/dist --find-interpreter -m flyte/flyteidl/Cargo.toml
run: |
maturin build --release --out ${{ github.workspace }}/dist --find-interpreter -m flyte/flyteidl/Cargo.toml -- --system
- name: Install built wheel
run: |
uv pip install --system flyteidl-rust --no-index --find-links dist --force-reinstall
uv pip install ${{ github.workspace }}/dist/*.whl --force-reinstall
python -c "import flyteidl_rust"
- name: Clear Flyteidl
working-directory: ${{ github.workspace }}/flyte/flyteidl
Expand Down

0 comments on commit 46a4e4f

Please sign in to comment.