-
Notifications
You must be signed in to change notification settings - Fork 4.2k
166 lines (158 loc) · 5.94 KB
/
test-coverage.yml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: test-coverage
on:
push:
branches: [master]
paths:
- '.github/workflows/test-coverage.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/**'
- 'tests/**'
- 'toolchains/**'
pull_request:
branches: [master]
paths:
- '.github/workflows/test-coverage.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/**'
- 'tests/**'
- 'toolchains/**'
concurrency:
group: test-coverage-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
linux-gcc-gpu-t4:
runs-on: [self-hosted, linux, t4]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: build
env:
CC: gcc
CXX: g++
LD_LIBRARY_PATH: /data/action/install/lib64
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_VULKAN=ON -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_XOP=OFF -DNCNN_AVXVNNI=OFF -DNCNN_AVXNECONVERT=OFF -DNCNN_AVX512=OFF -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j 4
- name: test
env:
LD_LIBRARY_PATH: /data/action/install/lib64
run: cd build && ctest --output-on-failure -j 4
- name: lcov-collect
run: |
cd build
lcov -d ./src -c -o lcov.info
lcov -r lcov.info '/usr/*' -o lcov.info
lcov -r lcov.info '*/install/*' -o lcov.info
lcov -r lcov.info '*/build/*' -o lcov.info
lcov --list lcov.info
- name: codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
plugins: noop
files: build/lcov.info
linux-gcc-x64-sde:
name: linux-gcc-sde-${{ matrix.cpu }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- { cpu: hsw, AVX2: ON, AVXVNNI: OFF, AVXVNNIINT8: OFF, AVXNECONVERT: OFF, AVX512: OFF, AVX512VNNI: OFF, AVX512BF16: OFF, AVX512FP16: OFF }
- { cpu: adl, AVX2: ON, AVXVNNI: ON, AVXVNNIINT8: OFF, AVXNECONVERT: OFF, AVX512: OFF, AVX512VNNI: OFF, AVX512BF16: OFF, AVX512FP16: OFF }
- { cpu: arl, AVX2: ON, AVXVNNI: ON, AVXVNNIINT8: ON, AVXNECONVERT: ON, AVX512: OFF, AVX512VNNI: OFF, AVX512BF16: OFF, AVX512FP16: OFF }
- { cpu: spr, AVX2: ON, AVXVNNI: OFF, AVXVNNIINT8: OFF, AVXNECONVERT: OFF, AVX512: ON, AVX512VNNI: ON, AVX512BF16: ON, AVX512FP16: ON }
steps:
- uses: actions/checkout@v4
- name: update
run: sudo apt-get update
- name: gcc14
run: sudo apt-get install gcc-14 g++-14
- name: lcov
run: sudo apt-get install lcov
- name: Setup SDE binaries
uses: petarpetrovt/[email protected]
- name: build
env:
CC: gcc-14
CXX: g++-14
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF \
-DNCNN_AVX=ON \
-DNCNN_F16C=ON \
-DNCNN_XOP=OFF \
-DNCNN_AVX2=${{ matrix.AVX2 }} \
-DNCNN_AVXVNNI=${{ matrix.AVXVNNI }} \
-DNCNN_AVXVNNIINT8=${{ matrix.AVXVNNIINT8 }} \
-DNCNN_AVXNECONVERT=${{ matrix.AVXNECONVERT }} \
-DNCNN_AVX512=${{ matrix.AVX512 }} \
-DNCNN_AVX512VNNI=${{ matrix.AVX512VNNI }} \
-DNCNN_AVX512BF16=${{ matrix.AVX512BF16 }} \
-DNCNN_AVX512FP16=${{ matrix.AVX512FP16 }} \
-DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test
run: |
cd build
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-${{ matrix.cpu }};--" ctest --output-on-failure -j $(nproc)
- name: lcov-collect
run: |
cd build
lcov --gcov-tool gcov-14 -d ./src -c -o lcov.info
lcov -r lcov.info '/usr/*' -o lcov.info
lcov -r lcov.info '*/build/*' -o lcov.info
lcov --list lcov.info
- name: codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
plugins: noop
files: build/lcov.info
linux-gcc-riscv64-rvv:
strategy:
matrix:
openmp: [ON, OFF]
runs-on: [self-hosted, linux, ubuntu]
steps:
- uses: actions/checkout@v4
- name: build
run: |
export RISCV_ROOT_PATH=/data/action/osd/riscv
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/riscv64-unknown-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_RVV=ON -DNCNN_ZFH=ON -DNCNN_ZVFH=ON -DNCNN_OPENMP=${{ matrix.openmp }} -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j 8
- name: test-vlen256
run: |
export PATH=/data/action/osd/qemu-install/bin:$PATH
cd build
TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-cpu;rv64,v=true,zfh=true,zvfh=true,vlen=256,elen=64,vext_spec=v1.0;-L;/data/action/osd/riscv/sysroot" ctest --output-on-failure -j 8
- name: test-vlen128
run: |
export PATH=/data/action/osd/qemu-install/bin:$PATH
cd build
TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-cpu;rv64,v=true,zfh=true,zvfh=true,vlen=128,elen=64,vext_spec=v1.0;-L;/data/action/osd/riscv/sysroot" ctest --output-on-failure -j 8
- name: lcov-collect
run: |
cd build
lcov --gcov-tool /data/action/osd/riscv/bin/riscv64-unknown-linux-gnu-gcov -d ./src -c -o lcov.info
lcov -r lcov.info '/usr/*' -o lcov.info
lcov -r lcov.info '*/install/*' -o lcov.info
lcov -r lcov.info '*/build/*' -o lcov.info
lcov --list lcov.info
- name: codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
plugins: noop
files: build/lcov.info