Skip to content

Update sandbox.yml

Update sandbox.yml #18

Workflow file for this run

name: Python test bitness
on:
push:
branches:
- python-maxsize-sizeof
workflow_dispatch:
# allow manual runs on branches without a PR
jobs:
bitness_64b_python_docker:
name: python:alpine ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: ["amd64", "arm64/v8", "ppc64le", "s390x"]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Check 64b python
run: |
docker run --platform linux/${{ matrix.platform }} -i --rm python:alpine /bin/sh << EOF
set -euxo pipefail
/usr/local/bin/python3 -c "import sys; assert sys.maxsize == 9223372036854775807"
/usr/local/bin/python3 -c "import struct; assert struct.calcsize('P') == 8"
exit 0
EOF
bitness_32b_python_docker:
name: python:alpine ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: ["386", "arm/v6", "arm/v7"]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Check 32b python
run: |
docker run --platform linux/${{ matrix.platform }} -i --rm python:alpine /bin/sh << EOF
set -euxo pipefail
/usr/local/bin/python3 -c "import sys; assert sys.maxsize == 2147483647"
/usr/local/bin/python3 -c "import struct; assert struct.calcsize('P') == 4"
exit 0
EOF
bitness_64b_manylinux_pypy:
name: ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: ["manylinux2014_x86_64", "manylinux2014_aarch64", "manylinux_2_28_x86_64", "manylinux_2_28_aarch64"]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Check 64b python
run: |
docker run -i --rm quay.io/pypa/${{ matrix.platform }}:latest << EOF
set -euxo pipefail
for PYTHON in python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 pypy3.7 pypy3.8 pypy3.9 pypy3.10; do
\${PYTHON} -c "import sys; assert sys.maxsize == 9223372036854775807"
\${PYTHON} -c "import struct; assert struct.calcsize('P') == 8"
done
exit 0
EOF
bitness_32b_manylinux_pypy:
name: ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: ["manylinux2014_i686"]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Check 32b python
run: |
docker run -i --rm quay.io/pypa/${{ matrix.platform }}:latest << EOF
set -euxo pipefail
for PYTHON in python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 pypy3.7 pypy3.8 pypy3.9 pypy3.10; do
\${PYTHON} -c "import sys; assert sys.maxsize == 2147483647"
\${PYTHON} -c "import struct; assert struct.calcsize('P') == 4"
done
exit 0
EOF
bitness_64b_manylinux_nopypy:
name: Manylinux ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: ["manylinux2014_ppc64le", "manylinux2014_s390x", "manylinux_2_28_ppc64le", "manylinux_2_28_s390x", "musllinux_1_1_x86_64", "musllinux_1_1_aarch64", "musllinux_1_1_ppc64le", "musllinux_1_1_s390x", "musllinux_1_2_x86_64", "musllinux_1_2_aarch64", "musllinux_1_2_ppc64le", "musllinux_1_2_s390x"]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Check 64b python
run: |
docker run -i --rm quay.io/pypa/${{ matrix.platform }}:latest << EOF
set -euxo pipefail
for PYTHON in python3.7 python3.8 python3.9 python3.10 python3.11 python3.12; do
\${PYTHON} -c "import sys; assert sys.maxsize == 9223372036854775807"
\${PYTHON} -c "import struct; assert struct.calcsize('P') == 8"
done
exit 0
EOF
bitness_32b_manylinux_nopypy:
name: Manylinux ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: ["musllinux_1_1_i686", "musllinux_1_2_i686"]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Check 32b python
run: |
docker run -i --rm quay.io/pypa/${{ matrix.platform }}:latest << EOF
set -euxo pipefail
for PYTHON in python3.7 python3.8 python3.9 python3.10 python3.11 python3.12; do
\${PYTHON} -c "import sys; assert sys.maxsize == 2147483647"
\${PYTHON} -c "import struct; assert struct.calcsize('P') == 4"
done
exit 0
EOF
setup_python_64b:
name: setup-python 64b ${{ matrix.python }} on ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: ["ubuntu-latest", "macos-latest", "windows-latest"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.7", "pypy3.8", "pypy3.9", "pypy3.10"]
steps:
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python }}"
allow-prereleases: true
- name: Check 64b python
run: |
python -c "import sys; assert sys.maxsize == 9223372036854775807"
python -c "import struct; assert struct.calcsize('P') == 8"
setup_python_32b:
name: setup-python 32b ${{ matrix.python }} on ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: ["windows-latest"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python }}"
allow-prereleases: true
architecture: x86
- name: Check 32b python
run: |
python -c "import sys; assert sys.maxsize == 2147483647"
python -c "import struct; assert struct.calcsize('P') == 4"
pyodide:
name: pyodide 32b ${{ matrix.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Check 32b python
run: |
pip install pyodide-build==0.23.4
pyodide venv .venv-pyodide
source .venv-pyodide/bin/activate
python -c "import sys; assert sys.maxsize == 2147483647"
python -c "import struct; assert struct.calcsize('P') == 4"
graalpy:
name: GraalPY
runs-on: ubuntu-latest
container:
image: ghcr.io/graalvm/graalpy-community:slim
env:
HOME: "/root"
steps:
- name: Check 64b python
run: |
graalpy -c "import sys; assert sys.maxsize == 2147483647"
graalpy -c "import struct; assert struct.calcsize('P') == 8"