Skip to content

Commit d64fe5d

Browse files
committed
Run test and perf on native hardware on CI
1 parent ee8e97b commit d64fe5d

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-24.04-riscv
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
target:
15+
- test-quantize
16+
- test-float
17+
- test-repack
18+
- test-backend-ops-mul-mat
19+
- test-backend-ops-flash-attn
20+
- perf-float
21+
- perf-repack
22+
- test-quantize-perf
23+
- perf-backend-ops-mul-mat
24+
- perf-backend-ops-flash-attn
25+
name: ${{ matrix.target }}
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
submodules: recursive
31+
32+
- name: Install build dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y --no-install-recommends \
36+
gcc-14 g++-14 ninja-build ccache cmake zlib1g-dev libgomp1
37+
38+
- name: Restore ccache
39+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
40+
with:
41+
path: ~/.cache/ccache
42+
key: ccache-riscv-release-${{ matrix.target }}-${{ github.sha }}
43+
restore-keys: |
44+
ccache-riscv-release-${{ matrix.target }}-
45+
ccache-riscv-release-
46+
47+
- name: Configure
48+
run: cmake --preset riscv-release
49+
50+
- name: Build
51+
run: cmake --build --preset riscv-release
52+
53+
- name: Run ${{ matrix.target }}
54+
run: ctest --preset riscv-native-tests -R '^${{ matrix.target }}$' -V --output-on-failure

0 commit comments

Comments
 (0)