-
Notifications
You must be signed in to change notification settings - Fork 282
79 lines (66 loc) · 2.5 KB
/
Copy pathbuild_test_rv.yaml
File metadata and controls
79 lines (66 loc) · 2.5 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
70
71
72
73
74
75
76
77
78
79
name: Build and test RISC-V
run-name: Build and test RISC-V PR${{ github.event.number }}
# Separate GitHub Actions workflow to run the RISC-V tests only when the RISC-V
# SIMD backend changes, because tests rely on QEMU which is much slower than
# the other ISAs where we can test natively.
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'Source/astcenc_vecmathlib_rvv_n.h'
- 'Source/UnitTest/test_simd.cpp'
jobs:
build-ubuntu-rvv256-clang:
name: Ubuntu rvv256 Clang
runs-on: ubuntu-24.04
steps:
- name: Git checkout
uses: actions/checkout@v6
with:
submodules: 'true'
- name: Update apt packages
run: sudo apt-get update
- name: Install ImageMagick
run: sudo apt-get install imagemagick
- name: Install clang-20 and RISC-V binutils
run: sudo apt-get install clang-20 g++-riscv64-linux-gnu
- name: Install RISC-V qemu
run: sudo apt-get install qemu-user-static
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Get Python modules
run: |
python -m pip install --upgrade pip
pip install numpy Pillow
- name: Build release
run: |
export CXX=clang++-20
export CXXFLAGS="--target=riscv64-linux-gnu -march=rv64gcv_zvl256b -mrvv-vector-bits=zvl"
mkdir build_rel
cd build_rel
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNITTEST=ON -DASTCENC_ISA_NONE=ON ..
make install -j4
- name: Build debug
run: |
export CXX=clang++-20
export CXXFLAGS="--target=riscv64-linux-gnu -march=rv64gcv_zvl256b -mrvv-vector-bits=zvl"
mkdir build_dbg
cd build_dbg
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DASTCENC_ISA_NONE=ON ..
make -j4
- name: Run system tests
run: |
export QEMU_CPU="max,vlen=256,rvv_ta_all_1s=on,rvv_ma_all_1s=on"
export QEMU_LD_PREFIX="/usr/riscv64-linux-gnu"
python ./Test/astc_test_functional.py --encoder none
python ./Test/astc_test_image.py --encoder none --test-set Small
- name: Run unit tests
run: |
export QEMU_CPU="max,vlen=256,rvv_ta_all_1s=on,rvv_ma_all_1s=on"
export QEMU_LD_PREFIX="/usr/riscv64-linux-gnu"
ctest --rerun-failed --output-on-failure
working-directory: build_rel