-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.97 KB
/
Copy pathriscv.yml
File metadata and controls
69 lines (57 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: risc-v
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: build-riscv-${{ 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 libprotobuf-dev protobuf-compiler
- 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