From 79bdce5cae0096f5996c269d277614b688b794e9 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 6 Jul 2026 12:15:39 +0200 Subject: [PATCH] Add support for ubuntu-26.04 --- .github/workflows/build-python.yml | 39 +++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index 4e00e59..0a623cc 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -18,10 +18,21 @@ defaults: jobs: build: - name: Build Python ${{ inputs.cpython_tag }} - runs-on: ubuntu-24.04-riscv + name: Build Python ${{ inputs.cpython_tag }} for linux-${{ matrix.os-version }} + runs-on: ${{ matrix.runs-on }} + container: + image: riscv64/ubuntu:${{ matrix.os-version }} + strategy: + matrix: + include: + - os-version: 24.04 + runs-on: ubuntu-24.04-riscv + - os-version: 26.04 + runs-on: ubuntu-latest # Runs in QEMU as we don't have a native runner for 26.04 yet env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + outputs: + normalised: ${{ steps.vars.outputs.normalised }} steps: - name: Checkout this repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -74,7 +85,7 @@ jobs: echo "normalised=${normalised}" >> "$GITHUB_OUTPUT" echo "minor=${minor}" >> "$GITHUB_OUTPUT" echo "minor_num=${minor_num}" >> "$GITHUB_OUTPUT" - echo "archive_base=python-${normalised}-linux-24.04-riscv64" >> "$GITHUB_OUTPUT" + echo "archive_base=python-${normalised}-linux-${{ matrix.os-version }}-riscv64" >> "$GITHUB_OUTPUT" echo "Normalised version: ${normalised}" echo "Python X.Y: ${minor}" if [ "${minor_num}" -ge 13 ]; then @@ -152,12 +163,28 @@ jobs: - name: Print tarball hashes run: sha256sum output/*.tar.gz + - name: Upload artifacts + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: python-${{ steps.vars.outputs.normalised }}-linux-${{ matrix.os-version }}-riscv64 + path: output/*.tar.gz + + publish: + name: Publish Python ${{ inputs.cpython_tag }} + needs: [build] + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Download Artifacts + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + - name: Publish release run: | - TAG="${{ steps.vars.outputs.normalised }}-${GITHUB_RUN_ID}" + TAG="${{ needs.build.outputs.normalised }}-${GITHUB_RUN_ID}" gh release create "$TAG" --repo "$GITHUB_REPOSITORY" \ - --title "${{ steps.vars.outputs.normalised }}" \ - --notes "Python ${{ steps.vars.outputs.normalised }}" \ + --title "${{ needs.build.outputs.normalised }}" \ + --notes "Python ${{ needs.build.outputs.normalised }}" \ ./output/*.tar.gz - name: Trigger manifest refresh