Skip to content

Commit b92313c

Browse files
committed
Add support for ubuntu-26.04
1 parent a53c1dd commit b92313c

1 file changed

Lines changed: 35 additions & 6 deletions

File tree

.github/workflows/build-python.yml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,23 @@ defaults:
1818

1919
jobs:
2020
build:
21-
name: Build Python ${{ inputs.cpython_tag }}
22-
runs-on: ubuntu-24.04-riscv
21+
name: Build Python ${{ inputs.cpython_tag }} for linux-${{ matrix.os-version }}
22+
runs-on: ${{ matrix.runs-on }}
23+
container:
24+
image: ubuntu:${{ matrix.os-version }}
25+
options: >-
26+
--platform linux/riscv64
27+
strategy:
28+
matrix:
29+
include:
30+
- os-version: 24.04
31+
runs-on: ubuntu-24.04-riscv
32+
- os-version: 26.04
33+
runs-on: ubuntu-latest # Runs in QEMU as we don't have a native runner for 26.04 yet
2334
env:
2435
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
outputs:
37+
normalised: ${{ steps.vars.outputs.normalised }}
2538
steps:
2639
- name: Checkout this repo
2740
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -74,7 +87,7 @@ jobs:
7487
echo "normalised=${normalised}" >> "$GITHUB_OUTPUT"
7588
echo "minor=${minor}" >> "$GITHUB_OUTPUT"
7689
echo "minor_num=${minor_num}" >> "$GITHUB_OUTPUT"
77-
echo "archive_base=python-${normalised}-linux-24.04-riscv64" >> "$GITHUB_OUTPUT"
90+
echo "archive_base=python-${normalised}-linux-${{ matrix.os-version }}-riscv64" >> "$GITHUB_OUTPUT"
7891
echo "Normalised version: ${normalised}"
7992
echo "Python X.Y: ${minor}"
8093
if [ "${minor_num}" -ge 13 ]; then
@@ -152,12 +165,28 @@ jobs:
152165
- name: Print tarball hashes
153166
run: sha256sum output/*.tar.gz
154167

168+
- name: Upload artifacts
169+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
170+
with:
171+
name: python-${{ steps.vars.outputs.normalised }}-linux-${{ matrix.os-version }}-riscv64
172+
path: output/*.tar.gz
173+
174+
publish:
175+
name: Publish Python ${{ inputs.cpython_tag }}
176+
needs: [build]
177+
runs-on: ubuntu-latest
178+
env:
179+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180+
steps:
181+
- name: Download Artifacts
182+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
183+
155184
- name: Publish release
156185
run: |
157-
TAG="${{ steps.vars.outputs.normalised }}-${GITHUB_RUN_ID}"
186+
TAG="${{ needs.build.outputs.normalised }}-${GITHUB_RUN_ID}"
158187
gh release create "$TAG" --repo "$GITHUB_REPOSITORY" \
159-
--title "${{ steps.vars.outputs.normalised }}" \
160-
--notes "Python ${{ steps.vars.outputs.normalised }}" \
188+
--title "${{ needs.build.outputs.normalised }}" \
189+
--notes "Python ${{ needs.build.outputs.normalised }}" \
161190
./output/*.tar.gz
162191
163192
- name: Trigger manifest refresh

0 commit comments

Comments
 (0)