-
Notifications
You must be signed in to change notification settings - Fork 1
📦 polars 패키지 배포/릴리스 파이프라인 정리 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c32726a
Add polars release packaging and CI workflows
mingi3314 f24f6c5
♻️ Remove redundant polars version check script
mingi3314 2b1d6da
♻️ Reduce polars CI trigger frequency
mingi3314 a64f087
🔧 Use full Windows target triple in polars release workflow
mingi3314 ade90a0
📝 Add missing newline in polars README
mingi3314 8e11063
♻️ Relax sdist source checks in artifact validation
mingi3314 292b7a4
🔥 Remove unused environments from polars release workflow
mingi3314 448ecad
♻️ Validate polars workflows with Python 3.10
mingi3314 37161d1
🐛 Fix nested sdist source path checks
mingi3314 bd021f3
⚡ Skip project install during polars CI sync
mingi3314 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: Polars CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [review_requested, ready_for_review] | ||
| paths: | ||
| - ".github/workflows/polars-*.yml" | ||
| - "Cargo.toml" | ||
| - "Makefile" | ||
| - "core/**" | ||
| - "polars/**" | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| validate: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.10" | ||
| - uses: astral-sh/setup-uv@v5 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Sync polars dependencies | ||
| working-directory: polars | ||
| run: uv sync --group dev --no-install-project | ||
|
|
||
| - name: Test techr-core | ||
| run: cargo test -p techr-core | ||
|
|
||
| - name: Build local extension for tests | ||
| working-directory: polars | ||
| run: uv run maturin develop --uv | ||
|
|
||
| - name: Test polars package | ||
| working-directory: polars | ||
| run: uv run pytest | ||
|
|
||
| - name: Build wheel and sdist | ||
| working-directory: polars | ||
| run: uv run maturin build --release --sdist --out dist | ||
|
|
||
| - name: Check artifact contents | ||
| run: python polars/scripts/check_artifacts.py polars/dist | ||
|
|
||
| - name: Smoke test built wheel | ||
| run: | | ||
| wheel="$(python - <<'PY' | ||
| from pathlib import Path | ||
|
|
||
| wheels = sorted(Path('polars/dist').glob('*.whl')) | ||
| if len(wheels) != 1: | ||
| raise SystemExit(f"expected exactly one wheel, found {len(wheels)}") | ||
| print(wheels[0].resolve().as_posix()) | ||
| PY | ||
| )" | ||
| uv run --isolated --python 3.10 --with "$wheel" python polars/scripts/smoke_import.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,219 @@ | ||
| name: Polars Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "polars-v*" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-linux: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - target: x86_64 | ||
| artifact: wheels-linux-x86_64 | ||
| - target: aarch64 | ||
| artifact: wheels-linux-aarch64 | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.10" | ||
| - uses: astral-sh/setup-uv@v5 | ||
| - name: Build wheel | ||
| uses: PyO3/maturin-action@v1 | ||
| with: | ||
| working-directory: polars | ||
| target: ${{ matrix.target }} | ||
| manylinux: "2014" | ||
| sccache: "true" | ||
| args: --release --out dist -i python3.10 | ||
|
|
||
| - name: Check artifact contents | ||
| run: python polars/scripts/check_artifacts.py polars/dist | ||
|
|
||
| - name: Smoke test x86_64 wheel | ||
| if: matrix.target == 'x86_64' | ||
| run: | | ||
| wheel="$(python - <<'PY' | ||
| from pathlib import Path | ||
|
|
||
| wheels = sorted(Path('polars/dist').glob('*.whl')) | ||
| if len(wheels) != 1: | ||
| raise SystemExit(f"expected exactly one wheel, found {len(wheels)}") | ||
| print(wheels[0].resolve().as_posix()) | ||
| PY | ||
| )" | ||
| uv run --isolated --python 3.10 --with "$wheel" python polars/scripts/smoke_import.py | ||
|
|
||
| - name: Smoke test aarch64 wheel | ||
| if: matrix.target == 'aarch64' | ||
| uses: uraimo/run-on-arch-action@v2 | ||
| with: | ||
| arch: aarch64 | ||
| distro: ubuntu22.04 | ||
| githubToken: ${{ github.token }} | ||
| install: | | ||
| apt-get update | ||
| apt-get install -y --no-install-recommends python3 python3-pip | ||
| pip3 install -U pip | ||
| run: | | ||
| set -e | ||
| pip3 install polars/dist/*.whl --force-reinstall | ||
| python3 polars/scripts/smoke_import.py | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact }} | ||
| path: polars/dist/* | ||
|
|
||
| build-macos: | ||
| runs-on: macos-14 | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.10" | ||
| - uses: astral-sh/setup-uv@v5 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| targets: x86_64-apple-darwin | ||
| - name: Build universal2 wheel | ||
| uses: PyO3/maturin-action@v1 | ||
| with: | ||
| working-directory: polars | ||
| sccache: "true" | ||
| args: --release --out dist --universal2 | ||
|
|
||
| - name: Check artifact contents | ||
| run: python polars/scripts/check_artifacts.py polars/dist | ||
|
|
||
| - name: Smoke test built wheel | ||
| run: | | ||
| wheel="$(python - <<'PY' | ||
| from pathlib import Path | ||
|
|
||
| wheels = sorted(Path('polars/dist').glob('*.whl')) | ||
| if len(wheels) != 1: | ||
| raise SystemExit(f"expected exactly one wheel, found {len(wheels)}") | ||
| print(wheels[0].resolve().as_posix()) | ||
| PY | ||
| )" | ||
| uv run --isolated --python 3.10 --with "$wheel" python polars/scripts/smoke_import.py | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: wheels-macos-universal2 | ||
| path: polars/dist/* | ||
|
|
||
| build-windows: | ||
| runs-on: windows-latest | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.10" | ||
| architecture: "x64" | ||
| - uses: astral-sh/setup-uv@v5 | ||
| - name: Build wheel | ||
| uses: PyO3/maturin-action@v1 | ||
| with: | ||
| working-directory: polars | ||
| target: x86_64-pc-windows-msvc | ||
| sccache: "true" | ||
| args: --release --out dist | ||
|
|
||
| - name: Check artifact contents | ||
| run: python polars/scripts/check_artifacts.py polars/dist | ||
|
|
||
| - name: Smoke test built wheel | ||
| run: | | ||
| wheel="$(python - <<'PY' | ||
| from pathlib import Path | ||
|
|
||
| wheels = sorted(Path('polars/dist').glob('*.whl')) | ||
| if len(wheels) != 1: | ||
| raise SystemExit(f"expected exactly one wheel, found {len(wheels)}") | ||
| print(wheels[0].resolve().as_posix()) | ||
| PY | ||
| )" | ||
| uv run --isolated --python 3.10 --with "$wheel" python polars/scripts/smoke_import.py | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: wheels-windows-x64 | ||
| path: polars/dist/* | ||
|
|
||
| build-sdist: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Build sdist | ||
| uses: PyO3/maturin-action@v1 | ||
| with: | ||
| working-directory: polars | ||
| command: sdist | ||
| args: --out dist | ||
|
|
||
| - name: Check artifact contents | ||
| run: python polars/scripts/check_artifacts.py polars/dist | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: wheels-sdist | ||
| path: polars/dist/* | ||
|
|
||
| publish-testpypi: | ||
| if: github.event_name == 'workflow_dispatch' | ||
| needs: [build-linux, build-macos, build-windows, build-sdist] | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| path: dist | ||
| merge-multiple: true | ||
| - uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| repository-url: https://test.pypi.org/legacy/ | ||
| packages-dir: dist | ||
| skip-existing: true | ||
|
|
||
| publish-pypi: | ||
| if: github.event_name == 'push' | ||
| needs: [build-linux, build-macos, build-windows, build-sdist] | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| path: dist | ||
| merge-multiple: true | ||
| - uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| packages-dir: dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.