Elffuss BraidHub

kikocis/ncnn public

master · 4.9 KiBRawPermalink
1name: test-coverage
2on:
3 push:
4 branches: [master]
5 paths:
6 - '.github/workflows/test-coverage.yml'
7 - 'CMakeLists.txt'
8 - 'cmake/**'
9 - 'src/**'
10 - 'tests/**'
11 - 'toolchains/**'
12 pull_request:
13 branches: [master]
14 paths:
15 - '.github/workflows/test-coverage.yml'
16 - 'CMakeLists.txt'
17 - 'cmake/**'
18 - 'src/**'
19 - 'tests/**'
20 - 'toolchains/**'
21concurrency:
22 group: test-coverage-${{ github.ref }}
23 cancel-in-progress: true
24permissions:
25 contents: read
26
27jobs:
28 linux-gcc-gpu-t4:
29 runs-on: [self-hosted, linux, t4]
30 steps:
31 - uses: actions/checkout@v4
32 with:
33 submodules: true
34 - name: build
35 env:
36 CC: gcc
37 CXX: g++
38 LD_LIBRARY_PATH: /data/action/install/lib64
39 run: |
40 mkdir build && cd build
41 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_AVX512=ON -DNCNN_AVX512VNNI=ON -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON ..
42 cmake --build . -j 4
43 - name: test
44 env:
45 LD_LIBRARY_PATH: /data/action/install/lib64
46 run: cd build && ctest --output-on-failure -j 4
47 - name: lcov-collect
48 run: |
49 cd build
50 lcov -d ./src -c -o lcov.info
51 lcov -r lcov.info '/usr/*' -o lcov.info
52 lcov -r lcov.info '*/install/*' -o lcov.info
53 lcov -r lcov.info '*/build/*' -o lcov.info
54 lcov --list lcov.info
55
56 - name: codecov
57 id: codecov
58 continue-on-error: true
59 uses: codecov/codecov-action@v3
60 with:
61 token: ${{ secrets.CODECOV_TOKEN }}
62 file: build/lcov.info
63 - name: codecov-vlen256-retry-1
64 continue-on-error: true
65 id: codecov-vlen256-retry-1
66 if: steps.codecov.outcome=='failure'
67 uses: codecov/codecov-action@v3
68 with:
69 token: ${{ secrets.CODECOV_TOKEN }}
70 file: build/lcov.info
71 - name: codecov-vlen256-retry-2
72 continue-on-error: true
73 id: codecov-vlen256-retry-2
74 if: steps.codecov-vlen256-retry-1.outcome=='failure'
75 uses: codecov/codecov-action@v3
76 with:
77 token: ${{ secrets.CODECOV_TOKEN }}
78 file: build/lcov.info
79 - name: codecov-vlen256-retry-3
80 continue-on-error: true
81 id: codecov-vlen256-retry-3
82 if: steps.codecov-vlen256-retry-2.outcome=='failure'
83 uses: codecov/codecov-action@v3
84 with:
85 token: ${{ secrets.CODECOV_TOKEN }}
86 file: build/lcov.info
87 - name: codecov-vlen256-retry-4
88 continue-on-error: true
89 id: codecov-vlen256-retry-4
90 if: steps.codecov-vlen256-retry-3.outcome=='failure'
91 uses: codecov/codecov-action@v3
92 with:
93 token: ${{ secrets.CODECOV_TOKEN }}
94 file: build/lcov.info
95 - name: codecov-vlen256-retry-5
96 continue-on-error: true
97 id: codecov-vlen256-retry-5
98 if: steps.codecov-vlen256-retry-4.outcome=='failure'
99 uses: codecov/codecov-action@v3
100 with:
101 token: ${{ secrets.CODECOV_TOKEN }}
102 file: build/lcov.info
103 - name: set the status
104 if: always()
105 run: |
106 if ${{ steps.codecov.outcome=='success' || steps.codecov-vlen256-retry-1.outcome=='success' || steps.codecov-vlen256-retry-2.outcome=='success' || steps.codecov-vlen256-retry-3.outcome=='success' || steps.codecov-vlen256-retry-4.outcome=='success' || steps.codecov-vlen256-retry-5.outcome=='success' }}; then
107 echo fine
108 else
109 exit 1
110 fi
111
112 linux-gcc-x64-avx512-spr:
113 runs-on: ubuntu-22.04
114 steps:
115 - uses: actions/checkout@v4
116 - name: update
117 run: sudo apt-get update
118 - name: gcc12
119 run: sudo apt-get install gcc-12 g++-12
120 - name: lcov
121 run: sudo apt-get install lcov
122 - name: Setup SDE binaries
123 uses: petarpetrovt/setup-sde@v2.4
124 - name: build-avx512-spr
125 env:
126 CC: gcc-12
127 CXX: g++-12
128 run: |
129 mkdir build-avx512-spr && cd build-avx512-spr
130 cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_AVX512=ON -DNCNN_AVX512VNNI=ON -DNCNN_AVX512BF16=ON -DNCNN_AVX512FP16=ON -DNCNN_XOP=OFF -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON ..
131 cmake --build . -j 2
132 - name: test-avx512-spr
133 run: |
134 cd build-avx512-spr
135 TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-spr;--" ctest --output-on-failure -j 2
136 - name: lcov-collect
137 run: |
138 cd build-avx512-spr
139 lcov --gcov-tool gcov-12 -d ./src -c -o lcov.info
140 lcov -r lcov.info '/usr/*' -o lcov.info
141 lcov -r lcov.info '*/build-avx512-spr/*' -o lcov.info
142 lcov --list lcov.info
143 - name: codecov-avx512-spr
144 uses: codecov/codecov-action@v4
145 with:
146 token: ${{ secrets.CODECOV_TOKEN }}
147 file: build-avx512-spr/lcov.info