Skip to content

Restored riscV runners #2

Restored riscV runners

Restored riscV runners #2

Workflow file for this run

name: risc-v
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: build-python-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
riscv-tests:
name: "Build & Test on RISC-V (native)"
runs-on: ubuntu-24.04-riscv
env:
INSTALL_PREFIX: "/usr/local"
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Install system dependencies"
run: |
set -eux
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 python3-dev python3-pip python3-venv python3-wheel python3-setuptools \
g++ cmake ninja-build git
- name: "Upgrade pip"
run: python3 -m pip install --upgrade pip --break-system-packages
- name: "Install build requirements"
run: python3 -m pip install -r build-requirements.txt --break-system-packages
- name: "Prepare test fixtures"
run: |
set -eux
mkdir -p /tmp/capio_cl_jsons /tmp/capio_cl_tomls
cp -r tests/jsons/* /tmp/capio_cl_jsons
cp -r tests/tomls/* /tmp/capio_cl_tomls
- name: "Build wheel"
run: |
set -eux
echo "Building for RISC-V on $(uname -m) / Ubuntu 24.04"
python3 -m build \
-Ccmake.define.ENABLE_COVERAGE=OFF \
-Ccmake.build-type=Release \
-Ccmake.define.CAPIO_CL_BUILD_TESTS=OFF
- name: "Install wheel and test requirements"
run: |
set -eux
pip install dist/*.whl --break-system-packages
python3 -m pip install -r test-requirements.txt --break-system-packages
- name: "Run tests"
env:
PYTHONUNBUFFERED: "1"
run: |
set -eux
pytest -vvv -s --timeout=120 --timeout-method=thread \
tests/python/test_bindings.py tests/python/test_parser_serializer.py