forked from apache/iceberg-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa78256
commit b013176
Showing
3 changed files
with
174 additions
and
140 deletions.
There are no files selected for viewing
This file contains 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,86 @@ | ||
name: "Build PyPI Artifacts" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
VERSION: | ||
required: true | ||
type: string | ||
RC: | ||
required: true | ||
type: number | ||
|
||
jobs: | ||
pypi-build-artifacts: | ||
name: Build artifacts for PyPi on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-22.04, windows-2022, macos-13, macos-14, macos-15 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: | | ||
3.9 | ||
3.10 | ||
3.11 | ||
3.12 | ||
- name: Install poetry | ||
run: make install-poetry | ||
|
||
- name: Set version with RC | ||
env: | ||
VERSION: ${{ inputs.VERSION }} | ||
RC: ${{ inputs.RC }} | ||
run: python -m poetry version "${{ env.VERSION }}rc${{ env.RC }}" # e.g., 0.8.0rc1 | ||
|
||
# Publish the source distribution with the version that's in | ||
# the repository, otherwise the tests will fail | ||
- name: Compile source distribution | ||
run: python3 -m poetry build --format=sdist | ||
if: startsWith(matrix.os, 'ubuntu') | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
with: | ||
output-dir: wheelhouse | ||
config-file: "pyproject.toml" | ||
env: | ||
# Ignore 32 bit architectures | ||
CIBW_ARCHS: "auto64" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9,<3.13" | ||
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1" | ||
CIBW_TEST_EXTRAS: "s3fs,glue" | ||
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py" | ||
# There is an upstream issue with installing on MacOSX | ||
# https://github.com/pypa/cibuildwheel/issues/1603 | ||
# Ignore tests for pypy since not all dependencies are compiled for it | ||
# and would require a local rust build chain | ||
CIBW_TEST_SKIP: "pp* *macosx*" | ||
|
||
- name: Add source distribution | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: ls -lah dist/* && cp dist/* wheelhouse/ | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: "pypi-release-candidate-${{ matrix.os }}" | ||
path: ./wheelhouse/* | ||
|
||
pypi-merge-artifacts: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- pypi-build-artifacts | ||
steps: | ||
- name: Merge Artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: "pypi-release-candidate-${{ inputs.VERSION }}rc${{ inputs.RC }}" | ||
pattern: pypi-release-candidate* | ||
delete-merged: true |
This file contains 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 |
---|---|---|
|
@@ -116,152 +116,20 @@ jobs: | |
# SVN | ||
svn-build-artifacts: | ||
name: Build artifacts for SVN on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- validate-inputs | ||
- validate-library-version | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-22.04, windows-2022, macos-13, macos-14, macos-15 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: | | ||
3.9 | ||
3.10 | ||
3.11 | ||
3.12 | ||
- name: Install poetry | ||
run: make install-poetry | ||
|
||
# Publish the source distribution with the version that's in | ||
# the repository, otherwise the tests will fail | ||
- name: Compile source distribution | ||
run: python3 -m poetry build --format=sdist | ||
if: startsWith(matrix.os, 'ubuntu') | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
with: | ||
output-dir: wheelhouse | ||
config-file: "pyproject.toml" | ||
env: | ||
# Ignore 32 bit architectures | ||
CIBW_ARCHS: "auto64" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9,<3.13" | ||
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1" | ||
CIBW_TEST_EXTRAS: "s3fs,glue" | ||
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py" | ||
# There is an upstream issue with installing on MacOSX | ||
# https://github.com/pypa/cibuildwheel/issues/1603 | ||
# Ignore tests for pypy since not all dependencies are compiled for it | ||
# and would require a local rust build chain | ||
CIBW_TEST_SKIP: "pp* *macosx*" | ||
|
||
- name: Add source distribution | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: ls -lah dist/* && cp dist/* wheelhouse/ | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: "svn-release-candidate-${{ matrix.os }}" | ||
path: ./wheelhouse/* | ||
|
||
svn-merge-artifacts: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- validate-inputs | ||
- svn-build-artifacts | ||
steps: | ||
- name: Merge Artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: "svn-release-candidate-${{ needs.validate-inputs.outputs.VERSION }}rc${{ needs.validate-inputs.outputs.RC }}" | ||
pattern: svn-release-candidate* | ||
delete-merged: true | ||
uses: ./.github/workflows/svn-build-artifacts.yml | ||
with: | ||
version: ${{ needs.validate-inputs.outputs.VERSION }} | ||
rc: ${{ needs.validate-inputs.outputs.RC }} | ||
|
||
# PyPi | ||
pypi-build-artifacts: | ||
name: Build artifacts for PyPi on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- validate-inputs | ||
- validate-library-version | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-22.04, windows-2022, macos-13, macos-14, macos-15 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: | | ||
3.9 | ||
3.10 | ||
3.11 | ||
3.12 | ||
- name: Install poetry | ||
run: make install-poetry | ||
|
||
- name: Set version with RC | ||
env: | ||
VERSION: ${{ needs.validate-inputs.outputs.VERSION }} | ||
RC: ${{ needs.validate-inputs.outputs.RC }} | ||
run: python -m poetry version "${{ env.VERSION }}rc${{ env.RC }}" # e.g., 0.8.0rc1 | ||
|
||
# Publish the source distribution with the version that's in | ||
# the repository, otherwise the tests will fail | ||
- name: Compile source distribution | ||
run: python3 -m poetry build --format=sdist | ||
if: startsWith(matrix.os, 'ubuntu') | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
with: | ||
output-dir: wheelhouse | ||
config-file: "pyproject.toml" | ||
env: | ||
# Ignore 32 bit architectures | ||
CIBW_ARCHS: "auto64" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9,<3.13" | ||
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1" | ||
CIBW_TEST_EXTRAS: "s3fs,glue" | ||
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py" | ||
# There is an upstream issue with installing on MacOSX | ||
# https://github.com/pypa/cibuildwheel/issues/1603 | ||
# Ignore tests for pypy since not all dependencies are compiled for it | ||
# and would require a local rust build chain | ||
CIBW_TEST_SKIP: "pp* *macosx*" | ||
|
||
- name: Add source distribution | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: ls -lah dist/* && cp dist/* wheelhouse/ | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: "pypi-release-candidate-${{ matrix.os }}" | ||
path: ./wheelhouse/* | ||
|
||
pypi-merge-artifacts: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- validate-inputs | ||
- pypi-build-artifacts | ||
steps: | ||
- name: Merge Artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: "pypi-release-candidate-${{ needs.validate-inputs.outputs.VERSION }}rc${{ needs.validate-inputs.outputs.RC }}" | ||
pattern: pypi-release-candidate* | ||
delete-merged: true | ||
uses: ./.github/workflows/pypi-build-artifacts.yml | ||
with: | ||
version: ${{ needs.validate-inputs.outputs.VERSION }} | ||
rc: ${{ needs.validate-inputs.outputs.RC }} |
This file contains 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,80 @@ | ||
name: "Build SVN Artifacts" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
VERSION: | ||
required: true | ||
type: string | ||
RC: | ||
required: true | ||
type: number | ||
|
||
jobs: | ||
svn-build-artifacts: | ||
name: Build artifacts for SVN on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-22.04, windows-2022, macos-13, macos-14, macos-15 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: | | ||
3.9 | ||
3.10 | ||
3.11 | ||
3.12 | ||
- name: Install poetry | ||
run: make install-poetry | ||
|
||
# Publish the source distribution with the version that's in | ||
# the repository, otherwise the tests will fail | ||
- name: Compile source distribution | ||
run: python3 -m poetry build --format=sdist | ||
if: startsWith(matrix.os, 'ubuntu') | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
with: | ||
output-dir: wheelhouse | ||
config-file: "pyproject.toml" | ||
env: | ||
# Ignore 32 bit architectures | ||
CIBW_ARCHS: "auto64" | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9,<3.13" | ||
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1" | ||
CIBW_TEST_EXTRAS: "s3fs,glue" | ||
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py" | ||
# There is an upstream issue with installing on MacOSX | ||
# https://github.com/pypa/cibuildwheel/issues/1603 | ||
# Ignore tests for pypy since not all dependencies are compiled for it | ||
# and would require a local rust build chain | ||
CIBW_TEST_SKIP: "pp* *macosx*" | ||
|
||
- name: Add source distribution | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: ls -lah dist/* && cp dist/* wheelhouse/ | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: "svn-release-candidate-${{ matrix.os }}" | ||
path: ./wheelhouse/* | ||
|
||
svn-merge-artifacts: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- svn-build-artifacts | ||
steps: | ||
- name: Merge Artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: "svn-release-candidate-${{ inputs.VERSION }}rc${{ inputs.RC }}" | ||
pattern: svn-release-candidate* | ||
delete-merged: true |