-
Notifications
You must be signed in to change notification settings - Fork 412
[infra] add testpypi nightly build #1601
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
Changes from all commits
7f192dd
dadfe3b
f7d82cc
3cc5ca1
9f2786e
62a0072
d734943
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
|
|
||
| name: "Nightly PyPI Build" | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * *" # Runs at midnight UTC every day | ||
| workflow_dispatch: # Allows manual triggering | ||
|
|
||
| jobs: | ||
| set-version: | ||
| if: github.repository == 'apache/iceberg-python' # Only run for apache repo | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. verified that workflow is skipped on my forked repo
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| VERSION: ${{ steps.set-version.outputs.VERSION }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.12 | ||
|
|
||
| - name: Install Poetry | ||
| run: make install-poetry | ||
|
|
||
| - name: Set version | ||
| id: set-version | ||
| run: | | ||
| CURRENT_VERSION=$(poetry version --short) | ||
| TIMESTAMP=$(date +%Y%m%d%H%M%S) | ||
| echo "VERSION=${CURRENT_VERSION}.dev${TIMESTAMP}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Debug version | ||
| run: echo "Publishing version ${{ steps.set-version.outputs.VERSION }}" | ||
|
|
||
| nightly-build: | ||
| needs: set-version | ||
| uses: ./.github/workflows/pypi-build-artifacts.yml | ||
| with: | ||
| version: ${{ needs.set-version.outputs.VERSION }} | ||
| testpypi-publish: | ||
| name: Publish to TestPypi | ||
| needs: | ||
| - nightly-build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: testpypi | ||
| url: https://test.pypi.org/p/pyiceberg | ||
Fokko marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| permissions: | ||
| id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
|
||
| steps: | ||
| - name: Download all the artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| merge-multiple: true | ||
| path: dist/ | ||
| - name: List downloaded artifacts | ||
| run: ls -R dist/ | ||
|
Comment on lines
+78
to
+79
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was hoping that we could leave out this kind of debug statements. But it looks like the merge job doesn't mention the actual files: https://github.com/kevinjqliu/iceberg-python/actions/runs/13119881319/job/36603748563 |
||
| - name: Publish to TestPyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| repository-url: https://test.pypi.org/legacy/ | ||
| skip-existing: true | ||
| verbose: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,17 +25,14 @@ on: | |
| VERSION: | ||
| required: true | ||
| type: string | ||
| RC: | ||
| required: true | ||
| type: string | ||
|
|
||
| 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 ] | ||
| os: [ ubuntu-22.04, windows-2022, macos-13, macos-14 ] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's up with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. macos-14, macos-15 are the same hardware so produce the same artifacts. i was getting some error uploading to pypi due to removing macos-15 worked 🤷
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, let's see if we can restore |
||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
@@ -56,8 +53,7 @@ jobs: | |
| - 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 | ||
| run: python -m poetry version "${{ env.VERSION }}" | ||
|
|
||
| # Publish the source distribution with the version that's in | ||
| # the repository, otherwise the tests will fail | ||
|
|
@@ -97,6 +93,6 @@ jobs: | |
| - name: Merge Artifacts | ||
| uses: actions/upload-artifact/merge@v4 | ||
| with: | ||
| name: "pypi-release-candidate-${{ inputs.VERSION }}rc${{ inputs.RC }}" | ||
| name: "pypi-release-candidate-${{ inputs.VERSION }}" | ||
| pattern: pypi-release-candidate* | ||
| delete-merged: true | ||
Uh oh!
There was an error while loading. Please reload this page.