Skip to content

Commit

Permalink
Merge pull request #18 from hoaihuongbk/fix_release
Browse files Browse the repository at this point in the history
Fix release again
  • Loading branch information
hoaihuongbk authored Feb 15, 2025
2 parents 1930755 + 2f9d874 commit 9e765a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 25 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,36 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-22.04, macos-14 ]
architecture: [ x86-64, aarch64 ]
python-version: [ '3.10']
exclude:
- os: macos-latest
- os: macos-14
architecture: x86-64

steps:
- uses: actions/checkout@v4

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set Rust target for aarch64
if: matrix.architecture == 'aarch64'
id: target
run: |
TARGET=$(
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
echo "aarch64-apple-darwin";
else
echo "aarch64-unknown-linux-gnu";
fi
)
echo "target=$TARGET" >> $GITHUB_OUTPUT
python-version: ${{ matrix.platform.python-version }}
architecture: ${{ matrix.platform.architecture }}

- name: Build wheel
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ steps.target.outputs.target }}
target: ${{ matrix.platform.architecture }}
args: >
--release
--out dist
manylinux: ${{ matrix.architecture == 'aarch64' && '2_24' || 'auto' }}
--find-interpreter
-i python${{ matrix.python-version }}
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.platform.architecture }}
path: dist/*.whl

release:
Expand All @@ -61,11 +51,11 @@ jobs:
id-token: write
needs: [build-wheels]
steps:
- name: Download wheels
uses: actions/download-artifact@v4
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
path: dist
merge-multiple: true
subject-path: 'wheels-*/*'

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ __pycache__
/rust/Cargo.lock
/src/lakeops/lakeops_udf.cpython-310-darwin.so
/src/lakeops/_lakeops_udf.cpython-310-darwin.so
/dist/
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ features = ["pyo3/extension-module"]
module-name = "lakeops._lakeops_udf"
python-source = "src"
manifest-path = "rust/Cargo.toml"
compatibility = "manylinux2014"

0 comments on commit 9e765a2

Please sign in to comment.