Skip to content

ci test riscv64

ci test riscv64 #211

Workflow file for this run

name: build
on:
push:
branches:
- "tmp-riskv64"
env:
PY_COLORS: 1
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: python -m pip install -U build
- name: Build sdist
run: python -m build --sdist
- name: List distributions
run: ls -lR dist
- name: Save build artifacts
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist
- name: Install sdist
run: python -m pip install dist/*.tar.gz
- name: Test
run: python -m unittest discover tests -v
define_build_wheels_matrix:
name: Define build wheels matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.define.outputs.matrix }}
full: ${{ steps.define.outputs.full }}
env:
PYTHON_VERSIONS: cp39 cp310 cp311 cp312 cp313 cp313t pp310 pp311
FULL:
${{ ( startsWith(github.ref, 'refs/tags') || startsWith(github.head_ref,
'release-') || github.event_name == 'workflow_dispatch' ) && '1' || '0' }}
steps:
- name: Define include matrix
id: define
shell: python
run: |
import json
import os
PYTHON_VERSIONS = os.environ["PYTHON_VERSIONS"].split()
FULL = os.environ["FULL"] == "1"
CASES = []
def add(name, platform, archs, build, qemu=False):
CASES.append(locals())
for identifier in ("manylinux", "musllinux"):
for arch in ("riscv64",):
add(f"Linux {arch} {identifier}", "ubuntu-latest", arch, build, True)
build_wheels:
name: Build wheels | ${{ matrix.name }}
runs-on: ${{ matrix.platform }}
needs:
- build_sdist
- define_build_wheels_matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.define_build_wheels_matrix.outputs.matrix) }}
env:
CIBW_ARCHS: ${{ matrix.archs }}
CIBW_BUILD: ${{ matrix.build }}
CIBW_ENABLE: cpython-freethreading pypy pypy-eol
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests -v
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: python -m pip install -U cibuildwheel
- name: Download sdist
uses: actions/download-artifact@v4
with:
name: sdist
path: sdist
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.qemu }}
- name: Build wheels
run: python -m cibuildwheel --output-dir dist sdist/*.tar.gz
shell: bash
- name: List distributions
run: ls -lR dist
shell: bash
- name: Save build artifacts
uses: actions/upload-artifact@v4
with:
name: wheels ${{ matrix.name }}
path: dist/*.whl