Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 39 additions & 27 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ on:
description: 'Commit reference from CPython repository'
required: true
default: '3.14'
dist_version:
description: 'Dist version (compatible with patchlevel.py output)'
required: true
default: '3.14'
repository:
description: 'Repository to checkout'
required: false
Expand All @@ -28,10 +24,6 @@ on:
description: 'Commit reference from CPython repository'
default: '3.14'
type: string
dist_version:
description: 'Dist version (compatible with patchlevel.py output)'
default: '3.14'
type: string
repository:
description: 'Repository to checkout'
default: 'python/cpython'
Expand All @@ -49,7 +41,23 @@ permissions:
pages: write
id-token: write
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
dist_version: ${{ steps.get-version.outputs.dist_version }}
steps:
- uses: actions/setup-python@master
with:
python-version: ${{ inputs.python_version }}
- uses: actions/checkout@master
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.reference }}
- id: get-version
run: echo "dist_version=$(python tools/extensions/patchlevel.py --short)" >> $GITHUB_OUTPUT
working-directory: ./Doc
build-html:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@master
Expand All @@ -66,16 +74,17 @@ jobs:
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs-html.zip
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs-html.zip
name: python-${{ needs.prepare.outputs.dist_version }}-docs-html.zip
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs-html.zip
if-no-files-found: ignore
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs-html.tar.bz2
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs-html.tar.bz2
name: python-${{ needs.prepare.outputs.dist_version }}-docs-html.tar.bz2
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs-html.tar.bz2
if-no-files-found: ignore
build-text:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@master
Expand All @@ -92,16 +101,17 @@ jobs:
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs-text.zip
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs-text.zip
name: python-${{ needs.prepare.outputs.dist_version }}-docs-text.zip
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs-text.zip
if-no-files-found: ignore
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs-text.tar.bz2
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs-text.tar.bz2
name: python-${{ needs.prepare.outputs.dist_version }}-docs-text.tar.bz2
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs-text.tar.bz2
if-no-files-found: ignore
build-texinfo:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@master
Expand All @@ -119,16 +129,17 @@ jobs:
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs-texinfo.zip
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs-texinfo.zip
name: python-${{ needs.prepare.outputs.dist_version }}-docs-texinfo.zip
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs-texinfo.zip
if-no-files-found: ignore
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs-texinfo.tar.bz2
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs-texinfo.tar.bz2
name: python-${{ needs.prepare.outputs.dist_version }}-docs-texinfo.tar.bz2
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs-texinfo.tar.bz2
if-no-files-found: ignore
build-epub:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@master
Expand All @@ -145,10 +156,11 @@ jobs:
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs.epub
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs.epub
name: python-${{ needs.prepare.outputs.dist_version }}-docs.epub
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs.epub
if-no-files-found: ignore
build-pdf:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@master
Expand All @@ -166,21 +178,21 @@ jobs:
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-pdf-logs.zip
name: python-${{ needs.prepare.outputs.dist_version }}-pdf-logs.zip
path: |
./Doc/build/latex/*.log
./Doc/build/latex/*.tex
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs-pdf-a4.zip
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs-pdf-a4.zip
name: python-${{ needs.prepare.outputs.dist_version }}-docs-pdf-a4.zip
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs-pdf-a4.zip
if-no-files-found: ignore
- uses: actions/upload-artifact@master
if: always()
with:
name: python-${{ inputs.dist_version }}-docs-pdf-a4.tar.bz2
path: ./Doc/dist/python-${{ inputs.dist_version }}*-docs-pdf-a4.tar.bz2
name: python-${{ needs.prepare.outputs.dist_version }}-docs-pdf-a4.tar.bz2
path: ./Doc/dist/python-${{ needs.prepare.outputs.dist_version }}*-docs-pdf-a4.tar.bz2
if-no-files-found: ignore
publish:
needs: [build-html, build-text, build-texinfo, build-epub, build-pdf]
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id: get-versions
run: |
versions=$(curl -sf https://peps.python.org/api/release-cycle.json | \
jq -c '[to_entries[] | select(.value.status != "end-of-life" and .value.status != "planned") | {version: .key, branch: (.value.branch // .key), python_version: (if .key == "3.10" then "3.12" else "3" end)}]')
jq -c '[to_entries[] | select(.value.status != "end-of-life" and .value.status != "planned") | {branch: (.value.branch // .key), python_version: (if .key == "3.10" then "3.12" else "3" end)}]')
echo "versions=$versions" >> "$GITHUB_OUTPUT"
build:
needs: get-versions
Expand All @@ -41,7 +41,6 @@ jobs:
uses: ./.github/workflows/build.yaml
with:
reference: ${{ matrix.branch }}
dist_version: ${{ matrix.version }}
python_version: ${{ matrix.python_version }}
publish: ${{ 'false' }}

Expand Down