From 46a4e4fc1968a840ea1487f6d877a66988543419 Mon Sep 17 00:00:00 2001 From: Austin Liu Date: Mon, 14 Oct 2024 17:35:39 +0800 Subject: [PATCH] Fix maturin build Signed-off-by: Austin Liu Fix maturin build Signed-off-by: Austin Liu Fix maturin build Signed-off-by: Austin Liu --- .github/workflows/pythonbuild.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pythonbuild.yml b/.github/workflows/pythonbuild.yml index 06e85625e3..7e01ac4623 100644 --- a/.github/workflows/pythonbuild.yml +++ b/.github/workflows/pythonbuild.yml @@ -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 @@ -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 @@ -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