Skip to content

Commit

Permalink
Make pip-release workflow release cli as well
Browse files Browse the repository at this point in the history
  • Loading branch information
haixuanTao committed Oct 31, 2024
1 parent af2206e commit 9ae7467
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
54 changes: 37 additions & 17 deletions .github/workflows/pip-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
# target: s390x
# - runner: ubuntu-20.04
# target: ppc64le
repository:
- path: apis/python/node
- path: binaries/cli
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -55,19 +58,19 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist --zig
manylinux: manylinux_2_28
working-directory: apis/python/node
working-directory: ${{ matrix.repository.path }}
- name: Upload wheels
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: apis/python/node/dist
path: ${{ matrix.repository.path }}/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: apis/python/node/dist/*
file: ${{ matrix.repository.path }}/dist/*
tag: ${{ github.ref }}
file_glob: true

Expand All @@ -82,6 +85,9 @@ jobs:
target: x86
- runner: ubuntu-22.04
target: aarch64
repository:
- path: apis/python/node
- path: binaries/cli
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -94,19 +100,19 @@ jobs:
args: --release --out dist
sccache: "true"
manylinux: musllinux_1_2
working-directory: apis/python/node
working-directory: ${{ matrix.repository.path }}
- name: Upload wheels
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: apis/python/node/dist
path: ${{ matrix.repository.path }}/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: apis/python/node/dist/*
file: ${{ matrix.repository.path }}/dist/*
tag: ${{ github.ref }}
file_glob: true

Expand All @@ -121,6 +127,9 @@ jobs:
image_tag: "armv7-musleabihf",
},
]
repository:
- path: apis/python/node
- path: binaries/cli
container:
image: docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }}
env:
Expand All @@ -137,19 +146,19 @@ jobs:
manylinux: auto
container: off
args: --release -o dist
working-directory: apis/python/node
working-directory: ${{ matrix.repository.path }}
- name: Upload wheels
if: github.event_name == 'release'
uses: actions/upload-artifact@v3
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: apis/python/node/dist
path: ${{ matrix.repository.path }}/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: apis/python/node/dist/*
file: ${{ matrix.repository.path }}/dist/*
tag: ${{ github.ref }}
file_glob: true

Expand All @@ -160,6 +169,9 @@ jobs:
platform:
- runner: windows-latest
target: x64
repository:
- path: apis/python/node
- path: binaries/cli
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -172,19 +184,19 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: "true"
working-directory: apis/python/node
working-directory: ${{ matrix.repository.path }}
- name: Upload wheels
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
path: apis/python/node/dist
path: ${{ matrix.repository.path }}/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: apis/python/node/dist/*
file: ${{ matrix.repository.path }}/dist/*
tag: ${{ github.ref }}
file_glob: true

Expand All @@ -197,6 +209,9 @@ jobs:
target: x86_64
- runner: macos-14
target: aarch64
repository:
- path: apis/python/node
- path: binaries/cli
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -208,38 +223,43 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: "true"
working-directory: apis/python/node
working-directory: ${{ matrix.repository.path }}
- name: Upload wheels
if: github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: apis/python/node/dist
path: ${{ matrix.repository.path }}/dist
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: apis/python/node/dist/*
file: ${{ matrix.repository.path }}/dist/*
tag: ${{ github.ref }}
file_glob: true

sdist:
runs-on: ubuntu-22.04
strategy:
matrix:
repository:
- path: apis/python/node
- path: binaries/cli
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
working-directory: apis/python/node
working-directory: ${{ matrix.repository.path }}
- name: Upload sdist
if: github.event_name == 'release'
uses: actions/upload-artifact@v3
with:
name: wheels
path: apis/python/node/dist
path: ${{ matrix.repository.path }}/dist

release:
name: Release
Expand Down
6 changes: 6 additions & 0 deletions binaries/cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = ["maturin>=0.13.2"]
build-backend = "maturin"

[project]
name = "dora-rs-cli"
2 changes: 0 additions & 2 deletions node-hub/dora-rerun/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ build-backend = "maturin"

[project]
name = "dora-rerun"
# Install pyarrow at the same time of dora-rs
dependencies = ['pyarrow']

0 comments on commit 9ae7467

Please sign in to comment.