Skip to content

update python versions #62

update python versions

update python versions #62

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
build-amd64:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: [ 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8 ]
steps:
- uses: actions/checkout@v6
- name: Download docker image
run: docker pull dmoj/runtimes-tier1:amd64-latest
- name: Build python
run: |
PYTHON_DIR="python$(echo "${{ matrix.python-version }}" | cut -d. -f 1-2)"
PYTHON_URL="https://www.python.org/ftp/python/$(perl -e 'shift=~/([\d.]+)/;print$1' "${{ matrix.python-version }}")/Python-${{ matrix.python-version }}.tar.xz"
docker run -e ARCH="amd64" -e PYTHON_DIR="$PYTHON_DIR" -e PYTHON_URL="$PYTHON_URL" -v "$(pwd):/code" dmoj/runtimes-tier1:amd64-latest
- name: Archive build artifacts
uses: actions/upload-artifact@v6
with:
name: Python ${{ matrix.python-version }} (amd64)
path: python*.tar.gz
build-arm64:
runs-on: ubuntu-24.04-arm
strategy:
matrix:
python-version: [ 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8 ]
steps:
- uses: actions/checkout@v6
- name: Download docker image
run: docker pull dmoj/runtimes-tier1:aarch64-latest
- name: Build python
run: |
PYTHON_DIR="python$(echo "${{ matrix.python-version }}" | cut -d. -f 1-2)"
PYTHON_URL="https://www.python.org/ftp/python/$(perl -e 'shift=~/([\d.]+)/;print$1' "${{ matrix.python-version }}")/Python-${{ matrix.python-version }}.tar.xz"
docker run -e ARCH="aarch64" -e PYTHON_DIR="$PYTHON_DIR" -e PYTHON_URL="$PYTHON_URL" -v "$(pwd):/code" dmoj/runtimes-tier1:aarch64-latest
- name: Archive build artifacts
uses: actions/upload-artifact@v6
with:
name: Python ${{ matrix.python-version }} (aarch64)
path: python*.tar.gz
release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: [build-amd64, build-arm64]
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*/python*.tar.gz'
tag: release-${{ github.sha }}
overwrite: true
file_glob: true