| 1 | name: test-coverage |
| 2 | on: |
| 3 | push: |
| 4 | branches: [master] |
| 5 | paths: |
| 6 | - '.ci/test-coverage.yml' |
| 7 | - 'CMakeLists.txt' |
| 8 | - 'cmake/**' |
| 9 | - 'src/**' |
| 10 | - 'tests/**' |
| 11 | - 'toolchains/**' |
| 12 | mr: |
| 13 | target-branches: [master] |
| 14 | paths: |
| 15 | - '.ci/test-coverage.yml' |
| 16 | - 'CMakeLists.txt' |
| 17 | - 'cmake/**' |
| 18 | - 'src/**' |
| 19 | - 'tests/**' |
| 20 | - 'toolchains/**' |
| 21 | concurrency: |
| 22 | group: test-coverage-${{ ci.head_ref }} |
| 23 | |
| 24 | jobs: |
| 25 | linux-gcc-gpu: |
| 26 | name: linux-gcc-gpu |
| 27 | runs-on: |
| 28 | pool-name: docker |
| 29 | container: |
| 30 | image: bkci/ci:ubuntu |
| 31 | steps: |
| 32 | - name: checkout |
| 33 | checkout: self |
| 34 | with: |
| 35 | strategy: FRESH_CHECKOUT |
| 36 | enableGitLfs: false |
| 37 | |
| 38 | - name: install-deps |
| 39 | run: | |
| 40 | apt-get update |
| 41 | apt-get install -y lcov libvulkan-dev |
| 42 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 43 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 44 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 45 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 46 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 47 | shasum -a 256 -c codecov.SHA256SUM |
| 48 | chmod +x codecov |
| 49 | |
| 50 | - name: cache-swiftshader |
| 51 | id: cache-swiftshader |
| 52 | uses: cache@1.* |
| 53 | with: |
| 54 | cachePaths: swiftshader-install |
| 55 | cacheKey: swiftshader-linux-install-20240622 |
| 56 | |
| 57 | - name: checkout-swiftshader |
| 58 | if: steps.cache-swiftshader.outputs.cacheHit != 'true' |
| 59 | checkout: https://github.com/google/swiftshader.git |
| 60 | with: |
| 61 | pullType: COMMIT_ID |
| 62 | refName: de870ac7518fe2b6bb651ecc22fc36647cf7b986 |
| 63 | localPath: swiftshader |
| 64 | enableSubmodule: false |
| 65 | enableGitLfs: false |
| 66 | |
| 67 | - name: swiftshader |
| 68 | if: steps.cache-swiftshader.outputs.cacheHit != 'true' |
| 69 | run: | |
| 70 | cd swiftshader |
| 71 | git -c submodule."third_party/git-hooks".update=none submodule update --init --recursive |
| 72 | mkdir -p build; cd build |
| 73 | cmake -DCMAKE_INSTALL_PREFIX=install -DSWIFTSHADER_BUILD_PVR=FALSE -DSWIFTSHADER_BUILD_TESTS=FALSE -DSWIFTSHADER_ENABLE_ASTC=FALSE -DSWIFTSHADER_WARNINGS_AS_ERRORS=FALSE -DREACTOR_BACKEND=Subzero -DREACTOR_DEFAULT_OPT_LEVEL=Default -DCMAKE_BUILD_TYPE=Release .. |
| 74 | cmake --build . -j $(nproc) |
| 75 | mkdir ${{ci.workspace}}/swiftshader-install |
| 76 | cp Linux/* ${{ci.workspace}}/swiftshader-install |
| 77 | |
| 78 | - name: build |
| 79 | run: | |
| 80 | mkdir build && cd build |
| 81 | cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_AVX512=OFF -DNCNN_XOP=OFF -DNCNN_OPENMP=OFF -DNCNN_VULKAN=ON -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 82 | cmake --build . -j 4 |
| 83 | - name: test |
| 84 | run: | |
| 85 | printf "[Processor]\nThreadCount=4\n" > build/tests/SwiftShader.ini |
| 86 | export VK_ICD_FILENAMES="${{ci.workspace}}/swiftshader-install/vk_swiftshader_icd.json" |
| 87 | cd build && ctest --output-on-failure -j 4 |
| 88 | - name: lcov-collect |
| 89 | run: | |
| 90 | cd build |
| 91 | lcov -d ./src -c -o lcov.info |
| 92 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 93 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 94 | lcov -r lcov.info '*/glslang/*' -o lcov.info |
| 95 | lcov --list lcov.info |
| 96 | - name: codecov |
| 97 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 98 | |
| 99 | linux-gcc-gpu-lavapipe: |
| 100 | name: linux-gcc-gpu-lavapipe |
| 101 | runs-on: |
| 102 | pool-name: docker |
| 103 | container: |
| 104 | image: bkci/ci:ubuntu |
| 105 | steps: |
| 106 | - name: checkout |
| 107 | checkout: self |
| 108 | with: |
| 109 | strategy: FRESH_CHECKOUT |
| 110 | enableGitLfs: false |
| 111 | |
| 112 | - name: install-deps |
| 113 | run: | |
| 114 | apt-get update |
| 115 | apt-get install -y lcov libvulkan-dev libxcb-shm0 |
| 116 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 117 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 118 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 119 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 120 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 121 | shasum -a 256 -c codecov.SHA256SUM |
| 122 | chmod +x codecov |
| 123 | |
| 124 | - name: cache-lavapipe |
| 125 | id: cache-lavapipe |
| 126 | uses: cache@1.* |
| 127 | with: |
| 128 | cachePaths: lavapipe-install |
| 129 | cacheKey: lavapipe-linux-install-20211127-4 |
| 130 | |
| 131 | - name: checkout-lavapipe |
| 132 | if: steps.cache-lavapipe.outputs.cacheHit != 'true' |
| 133 | checkout: https://github.com/mesa3d/mesa.git |
| 134 | with: |
| 135 | pullType: COMMIT_ID |
| 136 | refName: cd39180cfab20734744b379b085cc3b5c2cecd3a |
| 137 | localPath: mesa |
| 138 | enableSubmodule: false |
| 139 | enableGitLfs: false |
| 140 | |
| 141 | - name: lavapipe |
| 142 | if: steps.cache-lavapipe.outputs.cacheHit != 'true' |
| 143 | run: | |
| 144 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 145 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 146 | apt-get update |
| 147 | apt-get build-dep -y mesa |
| 148 | mkdir -p "${{ci.workspace}}/lavapipe-install" |
| 149 | cd mesa |
| 150 | mkdir build |
| 151 | cd build |
| 152 | meson -Dprefix="${{ci.workspace}}/lavapipe-install" -Dbuildtype=release -Db_lto=true -Db_ndebug=true -Dplatforms="x11" -Ddri3=enabled -Ddri-drivers="" -Dgallium-drivers=swrast -Dgallium-vdpau=disabled -Dgallium-xvmc=disabled -Dgallium-omx=disabled -Dgallium-va=disabled -Dgallium-xa=disabled -Dgallium-opencl=disabled -Dopencl-native=false -Dvulkan-drivers=swrast -Dshader-cache=disabled -Dgles1=disabled -Dgles2=disabled -Dopengl=false -Dgbm=disabled -Dglx=disabled -Degl=disabled -Dllvm=enabled -Dvalgrind=disabled -Dlibunwind=disabled -Dlmsensors=disabled .. |
| 153 | ninja -j$(nproc) |
| 154 | ninja install |
| 155 | find ${{ci.workspace}}/lavapipe-install |
| 156 | cat ${{ci.workspace}}/lavapipe-install/share/vulkan/icd.d/lvp_icd.x86_64.json |
| 157 | |
| 158 | - name: build |
| 159 | run: | |
| 160 | mkdir build && cd build |
| 161 | cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_AVX512=OFF -DNCNN_XOP=OFF -DNCNN_OPENMP=OFF -DNCNN_VULKAN=ON -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 162 | cmake --build . -j 4 |
| 163 | - name: test |
| 164 | run: | |
| 165 | export LP_NUM_THREADS=4 |
| 166 | export VK_ICD_FILENAMES="${{ci.workspace}}/lavapipe-install/share/vulkan/icd.d/lvp_icd.x86_64.json" |
| 167 | cd build |
| 168 | ctest --output-on-failure -j 4 |
| 169 | - name: lcov-collect |
| 170 | run: | |
| 171 | cd build |
| 172 | lcov -d ./src -c -o lcov.info |
| 173 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 174 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 175 | lcov -r lcov.info '*/glslang/*' -o lcov.info |
| 176 | lcov --list lcov.info |
| 177 | - name: codecov |
| 178 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 179 | |
| 180 | linux-gcc-x64: |
| 181 | name: linux-gcc-x64 |
| 182 | strategy: |
| 183 | matrix: |
| 184 | # openmp: ['OFF', 'ON'] |
| 185 | include: |
| 186 | - { SSE2: 'OFF', AVX: 'OFF', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} |
| 187 | - { SSE2: 'ON', AVX: 'OFF', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} |
| 188 | - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} |
| 189 | - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} |
| 190 | - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'ON', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} |
| 191 | - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'ON', AVX512VNNI: 'ON', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} |
| 192 | |
| 193 | runs-on: |
| 194 | pool-name: docker |
| 195 | container: |
| 196 | image: bkci/ci:ubuntu |
| 197 | steps: |
| 198 | - name: checkout |
| 199 | checkout: self |
| 200 | with: |
| 201 | strategy: FRESH_CHECKOUT |
| 202 | enableSubmodule: false |
| 203 | enableGitLfs: false |
| 204 | |
| 205 | - name: install-deps |
| 206 | run: | |
| 207 | apt-get update |
| 208 | apt-get install -y lcov |
| 209 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 210 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 211 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 212 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 213 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 214 | shasum -a 256 -c codecov.SHA256SUM |
| 215 | chmod +x codecov |
| 216 | |
| 217 | - name: build |
| 218 | run: | |
| 219 | mkdir build && cd build |
| 220 | cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON \ |
| 221 | -DNCNN_SSE2=${{matrix.SSE2}} \ |
| 222 | -DNCNN_AVX=${{matrix.AVX}} \ |
| 223 | -DNCNN_XOP=${{matrix.XOP}} \ |
| 224 | -DNCNN_F16C=${{matrix.F16C}} \ |
| 225 | -DNCNN_FMA=${{matrix.FMA}} \ |
| 226 | -DNCNN_AVX2=${{matrix.AVX2}} \ |
| 227 | -DNCNN_AVX512=${{matrix.AVX512}} \ |
| 228 | -DNCNN_AVXVNNI=${{matrix.AVXVNNI}} \ |
| 229 | -DNCNN_AVX512VNNI=${{matrix.AVX512VNNI}} \ |
| 230 | -DNCNN_AVX512BF16=${{matrix.AVX512BF16}} \ |
| 231 | -DNCNN_AVX512FP16=${{matrix.AVX512FP16}} \ |
| 232 | .. |
| 233 | cmake --build . -j 4 |
| 234 | - name: test |
| 235 | run: cd build && ctest --output-on-failure -j 4 |
| 236 | - name: lcov-collect |
| 237 | run: | |
| 238 | cd build |
| 239 | lcov -d ./src -c -o lcov.info |
| 240 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 241 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 242 | lcov --list lcov.info |
| 243 | - name: codecov |
| 244 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 245 | |
| 246 | linux-gcc-arm: |
| 247 | name: linux-gcc-arm |
| 248 | strategy: |
| 249 | matrix: |
| 250 | # openmp: ['OFF', 'ON'] |
| 251 | include: |
| 252 | - { GNU_INLINE_ASM: 'ON'} |
| 253 | - { GNU_INLINE_ASM: 'OFF'} |
| 254 | |
| 255 | runs-on: |
| 256 | pool-name: docker |
| 257 | container: |
| 258 | image: bkci/ci:ubuntu |
| 259 | steps: |
| 260 | - name: checkout |
| 261 | checkout: self |
| 262 | with: |
| 263 | strategy: FRESH_CHECKOUT |
| 264 | enableSubmodule: false |
| 265 | enableGitLfs: false |
| 266 | |
| 267 | - name: install-deps |
| 268 | run: | |
| 269 | apt-get update |
| 270 | apt-get install -y lcov g++-arm-linux-gnueabi g++-arm-linux-gnueabihf libcapstone4 libglib2.0-0 |
| 271 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 272 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 273 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 274 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 275 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 276 | shasum -a 256 -c codecov.SHA256SUM |
| 277 | chmod +x codecov |
| 278 | |
| 279 | - name: cache-qemu |
| 280 | id: cache-qemu |
| 281 | uses: cache@1.* |
| 282 | with: |
| 283 | cachePaths: qemu-install |
| 284 | cacheKey: qemu-arm-install-20220831-1 |
| 285 | |
| 286 | - name: checkout-qemu |
| 287 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 288 | checkout: https://github.com/qemu/qemu.git |
| 289 | with: |
| 290 | pullType: COMMIT_ID |
| 291 | refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 |
| 292 | localPath: qemu |
| 293 | enableSubmodule: false |
| 294 | enableGitLfs: false |
| 295 | |
| 296 | - name: qemu |
| 297 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 298 | run: | |
| 299 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 300 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 301 | apt-get update |
| 302 | apt-get build-dep -y qemu |
| 303 | cd qemu |
| 304 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=arm-linux-user --disable-system |
| 305 | make -j$(nproc) |
| 306 | make install |
| 307 | |
| 308 | - name: build |
| 309 | run: | |
| 310 | mkdir build && cd build |
| 311 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabi.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_GNU_INLINE_ASM=${{matrix.GNU_INLINE_ASM}} -DNCNN_VFPV4=ON -DNCNN_ARM82=OFF -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 312 | cmake --build . -j 4 |
| 313 | - name: test |
| 314 | run: | |
| 315 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 316 | cd build |
| 317 | TESTS_EXECUTABLE_LOADER=qemu-arm TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/arm-linux-gnueabi" ctest --output-on-failure -j 4 |
| 318 | - name: lcov-collect |
| 319 | run: | |
| 320 | cd build |
| 321 | lcov -d ./src -c -o lcov.info |
| 322 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 323 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 324 | lcov --list lcov.info |
| 325 | |
| 326 | - name: build-armhf-vfpv3-d16 |
| 327 | run: | |
| 328 | mkdir build-armhf-vfpv3-d16 && cd build-armhf-vfpv3-d16 |
| 329 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabihf-vfpv3-d16.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_GNU_INLINE_ASM=${{matrix.GNU_INLINE_ASM}} -DNCNN_VFPV4=OFF -DNCNN_ARM82=OFF -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 330 | cmake --build . -j 4 |
| 331 | - name: test-armhf-vfpv3-d16 |
| 332 | run: | |
| 333 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 334 | cd build-armhf-vfpv3-d16 |
| 335 | TESTS_EXECUTABLE_LOADER=qemu-arm TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/arm-linux-gnueabihf" ctest --output-on-failure -j 4 |
| 336 | - name: lcov-collect-armhf-vfpv3-d16 |
| 337 | run: | |
| 338 | cd build-armhf-vfpv3-d16 |
| 339 | lcov -d ./src -c -o lcov.info |
| 340 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 341 | lcov -r lcov.info '*/build-armhf-vfpv3-d16/*' -o lcov.info |
| 342 | lcov --list lcov.info |
| 343 | |
| 344 | - name: codecov |
| 345 | run: | |
| 346 | ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 347 | ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build-armhf-vfpv3-d16/lcov.info |
| 348 | |
| 349 | linux-gcc-aarch64: |
| 350 | name: linux-gcc-aarch64 |
| 351 | strategy: |
| 352 | matrix: |
| 353 | # openmp: ['OFF', 'ON'] |
| 354 | include: |
| 355 | - { GNU_INLINE_ASM: 'ON', ARM82: 'OFF', ARM82DOT: 'OFF', ARM82FP16FML: 'OFF', ARM84BF16: 'OFF', ARM84I8MM: 'OFF', ARM86SVE: 'OFF'} |
| 356 | - { GNU_INLINE_ASM: 'ON', ARM82: 'ON', ARM82DOT: 'OFF', ARM82FP16FML: 'OFF', ARM84BF16: 'OFF', ARM84I8MM: 'OFF', ARM86SVE: 'OFF'} |
| 357 | - { GNU_INLINE_ASM: 'ON', ARM82: 'ON', ARM82DOT: 'ON', ARM82FP16FML: 'ON', ARM84BF16: 'OFF', ARM84I8MM: 'OFF', ARM86SVE: 'OFF'} |
| 358 | - { GNU_INLINE_ASM: 'ON', ARM82: 'ON', ARM82DOT: 'ON', ARM82FP16FML: 'ON', ARM84BF16: 'ON', ARM84I8MM: 'ON', ARM86SVE: 'OFF'} |
| 359 | - { GNU_INLINE_ASM: 'OFF', ARM82: 'ON', ARM82DOT: 'ON', ARM82FP16FML: 'ON', ARM84BF16: 'ON', ARM84I8MM: 'ON', ARM86SVE: 'OFF'} |
| 360 | |
| 361 | runs-on: |
| 362 | pool-name: docker |
| 363 | container: |
| 364 | image: bkci/ci:ubuntu |
| 365 | steps: |
| 366 | - name: checkout |
| 367 | checkout: self |
| 368 | with: |
| 369 | strategy: FRESH_CHECKOUT |
| 370 | enableSubmodule: false |
| 371 | enableGitLfs: false |
| 372 | |
| 373 | - name: install-deps |
| 374 | run: | |
| 375 | apt-get update |
| 376 | apt-get install -y lcov g++-aarch64-linux-gnu libcapstone4 libglib2.0-0 |
| 377 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 378 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 379 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 380 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 381 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 382 | shasum -a 256 -c codecov.SHA256SUM |
| 383 | chmod +x codecov |
| 384 | |
| 385 | - name: cache-qemu |
| 386 | id: cache-qemu |
| 387 | uses: cache@1.* |
| 388 | with: |
| 389 | cachePaths: qemu-install |
| 390 | cacheKey: qemu-aarch64-install-20220831-1 |
| 391 | |
| 392 | - name: checkout-qemu |
| 393 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 394 | checkout: https://github.com/qemu/qemu.git |
| 395 | with: |
| 396 | pullType: COMMIT_ID |
| 397 | refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 |
| 398 | localPath: qemu |
| 399 | enableSubmodule: false |
| 400 | enableGitLfs: false |
| 401 | |
| 402 | - name: qemu |
| 403 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 404 | run: | |
| 405 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 406 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 407 | apt-get update |
| 408 | apt-get build-dep -y qemu |
| 409 | cd qemu |
| 410 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=aarch64-linux-user --disable-system |
| 411 | make -j$(nproc) |
| 412 | make install |
| 413 | |
| 414 | - name: build |
| 415 | run: | |
| 416 | mkdir build && cd build |
| 417 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-linux-gnu.toolchain.cmake \ |
| 418 | -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON \ |
| 419 | -DNCNN_GNU_INLINE_ASM=${{matrix.GNU_INLINE_ASM}} \ |
| 420 | -DNCNN_ARM82=${{matrix.ARM82}} \ |
| 421 | -DNCNN_ARM82DOT=${{matrix.ARM82DOT}} \ |
| 422 | -DNCNN_ARM82FP16FML=${{matrix.ARM82FP16FML}} \ |
| 423 | -DNCNN_ARM84BF16=${{matrix.ARM84BF16}} \ |
| 424 | -DNCNN_ARM84I8MM=${{matrix.ARM84I8MM}} \ |
| 425 | .. |
| 426 | cmake --build . -j 4 |
| 427 | - name: test |
| 428 | run: | |
| 429 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 430 | cd build |
| 431 | TESTS_EXECUTABLE_LOADER=qemu-aarch64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/aarch64-linux-gnu" ctest --output-on-failure -j 4 |
| 432 | - name: lcov-collect |
| 433 | run: | |
| 434 | cd build |
| 435 | lcov -d ./src -c -o lcov.info |
| 436 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 437 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 438 | lcov --list lcov.info |
| 439 | - name: codecov |
| 440 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 441 | |
| 442 | linux-gcc-mipsisa32r6el: |
| 443 | name: linux-gcc-mipsisa32r6el |
| 444 | strategy: |
| 445 | matrix: |
| 446 | OPENMP: ['OFF', 'ON'] |
| 447 | |
| 448 | runs-on: |
| 449 | pool-name: docker |
| 450 | container: |
| 451 | image: bkci/ci:ubuntu |
| 452 | steps: |
| 453 | - name: checkout |
| 454 | checkout: self |
| 455 | with: |
| 456 | strategy: FRESH_CHECKOUT |
| 457 | enableSubmodule: false |
| 458 | enableGitLfs: false |
| 459 | |
| 460 | - name: install-deps |
| 461 | run: | |
| 462 | apt-get update |
| 463 | apt-get install -y lcov g++-mipsisa32r6el-linux-gnu libcapstone4 libglib2.0-0 |
| 464 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 465 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 466 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 467 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 468 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 469 | shasum -a 256 -c codecov.SHA256SUM |
| 470 | chmod +x codecov |
| 471 | |
| 472 | - name: cache-qemu |
| 473 | id: cache-qemu |
| 474 | uses: cache@1.* |
| 475 | with: |
| 476 | cachePaths: qemu-install |
| 477 | cacheKey: qemu-mipsel-install-20220831-1 |
| 478 | |
| 479 | - name: checkout-qemu |
| 480 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 481 | checkout: https://github.com/qemu/qemu.git |
| 482 | with: |
| 483 | pullType: COMMIT_ID |
| 484 | refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 |
| 485 | localPath: qemu |
| 486 | enableSubmodule: false |
| 487 | enableGitLfs: false |
| 488 | |
| 489 | - name: qemu |
| 490 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 491 | run: | |
| 492 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 493 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 494 | apt-get update |
| 495 | apt-get build-dep -y qemu |
| 496 | cd qemu |
| 497 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=mipsel-linux-user --disable-system |
| 498 | make -j$(nproc) |
| 499 | make install |
| 500 | |
| 501 | - name: build |
| 502 | run: | |
| 503 | mkdir build && cd build |
| 504 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/mipsisa32r6el-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_MSA=OFF -DNCNN_MMI=OFF -DNCNN_OPENMP=${{matrix.OPENMP}} -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 505 | cmake --build . -j 4 |
| 506 | - name: test |
| 507 | run: | |
| 508 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 509 | cd build |
| 510 | TESTS_EXECUTABLE_LOADER=qemu-mipsel TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/mipsisa32r6el-linux-gnu" ctest --output-on-failure -j 4 |
| 511 | - name: lcov-collect |
| 512 | run: | |
| 513 | cd build |
| 514 | lcov -d ./src -c -o lcov.info |
| 515 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 516 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 517 | lcov --list lcov.info |
| 518 | - name: codecov |
| 519 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 520 | |
| 521 | linux-gcc-mipsisa64r6el: |
| 522 | name: linux-gcc-mipsisa64r6el |
| 523 | strategy: |
| 524 | matrix: |
| 525 | OPENMP: ['OFF', 'ON'] |
| 526 | |
| 527 | runs-on: |
| 528 | pool-name: docker |
| 529 | container: |
| 530 | image: bkci/ci:ubuntu |
| 531 | steps: |
| 532 | - name: checkout |
| 533 | checkout: self |
| 534 | with: |
| 535 | strategy: FRESH_CHECKOUT |
| 536 | enableSubmodule: false |
| 537 | enableGitLfs: false |
| 538 | |
| 539 | - name: install-deps |
| 540 | run: | |
| 541 | apt-get update |
| 542 | apt-get install -y lcov g++-mipsisa64r6el-linux-gnuabi64 libcapstone4 libglib2.0-0 |
| 543 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 544 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 545 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 546 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 547 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 548 | shasum -a 256 -c codecov.SHA256SUM |
| 549 | chmod +x codecov |
| 550 | |
| 551 | - name: cache-qemu |
| 552 | id: cache-qemu |
| 553 | uses: cache@1.* |
| 554 | with: |
| 555 | cachePaths: qemu-install |
| 556 | cacheKey: qemu-mips64el-install-20220831-1 |
| 557 | |
| 558 | - name: checkout-qemu |
| 559 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 560 | checkout: https://github.com/qemu/qemu.git |
| 561 | with: |
| 562 | pullType: COMMIT_ID |
| 563 | refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 |
| 564 | localPath: qemu |
| 565 | enableSubmodule: false |
| 566 | enableGitLfs: false |
| 567 | |
| 568 | - name: qemu |
| 569 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 570 | run: | |
| 571 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 572 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 573 | apt-get update |
| 574 | apt-get build-dep -y qemu |
| 575 | cd qemu |
| 576 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=mips64el-linux-user --disable-system |
| 577 | make -j$(nproc) |
| 578 | make install |
| 579 | |
| 580 | - name: build |
| 581 | run: | |
| 582 | mkdir build && cd build |
| 583 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/mipsisa64r6el-linux-gnuabi64.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_MSA=ON -DNCNN_MMI=OFF -DNCNN_OPENMP=${{matrix.OPENMP}} -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 584 | cmake --build . -j 4 |
| 585 | - name: test |
| 586 | run: | |
| 587 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 588 | cd build |
| 589 | TESTS_EXECUTABLE_LOADER=qemu-mips64el TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/mipsisa64r6el-linux-gnuabi64" ctest --output-on-failure -j 4 |
| 590 | - name: lcov-collect |
| 591 | run: | |
| 592 | cd build |
| 593 | lcov -d ./src -c -o lcov.info |
| 594 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 595 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 596 | lcov --list lcov.info |
| 597 | - name: codecov |
| 598 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 599 | |
| 600 | linux-gcc-powerpc: |
| 601 | name: linux-gcc-powerpc |
| 602 | strategy: |
| 603 | matrix: |
| 604 | OPENMP: ['OFF', 'ON'] |
| 605 | |
| 606 | runs-on: |
| 607 | pool-name: docker |
| 608 | container: |
| 609 | image: bkci/ci:ubuntu |
| 610 | steps: |
| 611 | - name: checkout |
| 612 | checkout: self |
| 613 | with: |
| 614 | strategy: FRESH_CHECKOUT |
| 615 | enableSubmodule: false |
| 616 | enableGitLfs: false |
| 617 | |
| 618 | - name: install-deps |
| 619 | run: | |
| 620 | apt-get update |
| 621 | apt-get install -y lcov g++-powerpc-linux-gnu libcapstone4 libglib2.0-0 |
| 622 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 623 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 624 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 625 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 626 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 627 | shasum -a 256 -c codecov.SHA256SUM |
| 628 | chmod +x codecov |
| 629 | |
| 630 | - name: cache-qemu |
| 631 | id: cache-qemu |
| 632 | uses: cache@1.* |
| 633 | with: |
| 634 | cachePaths: qemu-install |
| 635 | cacheKey: qemu-ppc-install-20220831-1 |
| 636 | |
| 637 | - name: checkout-qemu |
| 638 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 639 | checkout: https://github.com/qemu/qemu.git |
| 640 | with: |
| 641 | pullType: COMMIT_ID |
| 642 | refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 |
| 643 | localPath: qemu |
| 644 | enableSubmodule: false |
| 645 | enableGitLfs: false |
| 646 | |
| 647 | - name: qemu |
| 648 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 649 | run: | |
| 650 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 651 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 652 | apt-get update |
| 653 | apt-get build-dep -y qemu |
| 654 | cd qemu |
| 655 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=ppc-linux-user --disable-system |
| 656 | make -j$(nproc) |
| 657 | make install |
| 658 | |
| 659 | - name: build |
| 660 | run: | |
| 661 | mkdir build && cd build |
| 662 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/powerpc-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_OPENMP=${{matrix.OPENMP}} -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 663 | cmake --build . -j 4 |
| 664 | - name: test |
| 665 | run: | |
| 666 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 667 | cd build |
| 668 | TESTS_EXECUTABLE_LOADER=qemu-ppc TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/powerpc-linux-gnu" ctest --output-on-failure -j 4 |
| 669 | - name: lcov-collect |
| 670 | run: | |
| 671 | cd build |
| 672 | lcov -d ./src -c -o lcov.info |
| 673 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 674 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 675 | lcov --list lcov.info |
| 676 | - name: codecov |
| 677 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 678 | |
| 679 | linux-gcc-powerpc64le: |
| 680 | name: linux-gcc-powerpc64le |
| 681 | strategy: |
| 682 | matrix: |
| 683 | OPENMP: ['OFF', 'ON'] |
| 684 | |
| 685 | runs-on: |
| 686 | pool-name: docker |
| 687 | container: |
| 688 | image: bkci/ci:ubuntu |
| 689 | steps: |
| 690 | - name: checkout |
| 691 | checkout: self |
| 692 | with: |
| 693 | strategy: FRESH_CHECKOUT |
| 694 | enableSubmodule: false |
| 695 | enableGitLfs: false |
| 696 | |
| 697 | - name: install-deps |
| 698 | run: | |
| 699 | apt-get update |
| 700 | apt-get install -y lcov g++-powerpc64le-linux-gnu libcapstone4 libglib2.0-0 |
| 701 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 702 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 703 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 704 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 705 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 706 | shasum -a 256 -c codecov.SHA256SUM |
| 707 | chmod +x codecov |
| 708 | |
| 709 | - name: cache-qemu |
| 710 | id: cache-qemu |
| 711 | uses: cache@1.* |
| 712 | with: |
| 713 | cachePaths: qemu-install |
| 714 | cacheKey: qemu-ppc64le-install-20220831-1 |
| 715 | |
| 716 | - name: checkout-qemu |
| 717 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 718 | checkout: https://github.com/qemu/qemu.git |
| 719 | with: |
| 720 | pullType: COMMIT_ID |
| 721 | refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 |
| 722 | localPath: qemu |
| 723 | enableSubmodule: false |
| 724 | enableGitLfs: false |
| 725 | |
| 726 | - name: qemu |
| 727 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 728 | run: | |
| 729 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 730 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 731 | apt-get update |
| 732 | apt-get build-dep -y qemu |
| 733 | cd qemu |
| 734 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=ppc64le-linux-user --disable-system |
| 735 | make -j$(nproc) |
| 736 | make install |
| 737 | |
| 738 | - name: build |
| 739 | run: | |
| 740 | mkdir build && cd build |
| 741 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/powerpc64le-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_OPENMP=${{matrix.OPENMP}} -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 742 | cmake --build . -j 4 |
| 743 | - name: test |
| 744 | run: | |
| 745 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 746 | cd build |
| 747 | TESTS_EXECUTABLE_LOADER=qemu-ppc64le TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/powerpc64le-linux-gnu" ctest --output-on-failure -j 4 |
| 748 | - name: lcov-collect |
| 749 | run: | |
| 750 | cd build |
| 751 | lcov -d ./src -c -o lcov.info |
| 752 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 753 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 754 | lcov --list lcov.info |
| 755 | - name: codecov |
| 756 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 757 | |
| 758 | linux-gcc-riscv64: |
| 759 | name: linux-gcc-riscv64 |
| 760 | strategy: |
| 761 | matrix: |
| 762 | OPENMP: ['OFF', 'ON'] |
| 763 | |
| 764 | runs-on: |
| 765 | pool-name: docker |
| 766 | container: |
| 767 | image: bkci/ci:ubuntu |
| 768 | steps: |
| 769 | - name: checkout |
| 770 | checkout: self |
| 771 | with: |
| 772 | strategy: FRESH_CHECKOUT |
| 773 | enableSubmodule: false |
| 774 | enableGitLfs: false |
| 775 | |
| 776 | - name: install-deps |
| 777 | run: | |
| 778 | apt-get update |
| 779 | apt-get install -y lcov g++-riscv64-linux-gnu libcapstone4 libglib2.0-0 |
| 780 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 781 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 782 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 783 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 784 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 785 | shasum -a 256 -c codecov.SHA256SUM |
| 786 | chmod +x codecov |
| 787 | |
| 788 | - name: cache-qemu |
| 789 | id: cache-qemu |
| 790 | uses: cache@1.* |
| 791 | with: |
| 792 | cachePaths: qemu-install |
| 793 | cacheKey: qemu-riscv64-install-20230624-1 |
| 794 | |
| 795 | - name: checkout-qemu |
| 796 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 797 | checkout: https://github.com/qemu/qemu.git |
| 798 | with: |
| 799 | pullType: COMMIT_ID |
| 800 | refName: b455ce4c2f300c8ba47cba7232dd03261368a4cb |
| 801 | localPath: qemu |
| 802 | enableSubmodule: false |
| 803 | enableGitLfs: false |
| 804 | |
| 805 | - name: qemu |
| 806 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 807 | run: | |
| 808 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 809 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 810 | apt-get update |
| 811 | apt-get build-dep -y qemu |
| 812 | apt-get install -y python3-pip |
| 813 | python3 -m pip install --upgrade pip |
| 814 | apt-get remove -y python3-setuptools |
| 815 | pip3 install -U setuptools |
| 816 | cd qemu |
| 817 | wget https://raw.githubusercontent.com/nihui/ncnn-assets/master/qemu-patches/0007-linux-user-Expose-risc-v-V-isa-bit-in-get_elf_hwcap.patch |
| 818 | patch -p1 -i 0007-linux-user-Expose-risc-v-V-isa-bit-in-get_elf_hwcap.patch |
| 819 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=riscv64-linux-user --disable-system |
| 820 | make -j$(nproc) |
| 821 | make install |
| 822 | |
| 823 | - name: build |
| 824 | run: | |
| 825 | mkdir build && cd build |
| 826 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/riscv64-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_OPENMP=${{matrix.OPENMP}} -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 827 | cmake --build . -j 4 |
| 828 | - name: test |
| 829 | run: | |
| 830 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 831 | cd build |
| 832 | TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/riscv64-linux-gnu" ctest --output-on-failure -j 4 |
| 833 | - name: lcov-collect |
| 834 | run: | |
| 835 | cd build |
| 836 | lcov -d ./src -c -o lcov.info |
| 837 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 838 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 839 | lcov --list lcov.info |
| 840 | - name: codecov |
| 841 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 842 | |
| 843 | linux-gcc-riscv64-rvv: |
| 844 | name: linux-gcc-riscv64-rvv |
| 845 | strategy: |
| 846 | matrix: |
| 847 | OPENMP: ['OFF', 'ON'] |
| 848 | |
| 849 | runs-on: |
| 850 | pool-name: docker |
| 851 | container: |
| 852 | image: bkci/ci:ubuntu |
| 853 | steps: |
| 854 | - name: checkout |
| 855 | checkout: self |
| 856 | with: |
| 857 | strategy: FRESH_CHECKOUT |
| 858 | enableSubmodule: false |
| 859 | enableGitLfs: false |
| 860 | |
| 861 | - name: install-deps |
| 862 | run: | |
| 863 | apt-get update |
| 864 | apt-get install -y lcov libcapstone4 libglib2.0-0 |
| 865 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 866 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 867 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 868 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 869 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 870 | shasum -a 256 -c codecov.SHA256SUM |
| 871 | chmod +x codecov |
| 872 | |
| 873 | - name: cache-qemu |
| 874 | id: cache-qemu |
| 875 | uses: cache@1.* |
| 876 | with: |
| 877 | cachePaths: qemu-install |
| 878 | cacheKey: qemu-riscv64-install-20230624-1 |
| 879 | |
| 880 | - name: checkout-qemu |
| 881 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 882 | checkout: https://github.com/qemu/qemu.git |
| 883 | with: |
| 884 | pullType: COMMIT_ID |
| 885 | refName: b455ce4c2f300c8ba47cba7232dd03261368a4cb |
| 886 | localPath: qemu |
| 887 | enableSubmodule: false |
| 888 | enableGitLfs: false |
| 889 | |
| 890 | - name: qemu |
| 891 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 892 | run: | |
| 893 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 894 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 895 | apt-get update |
| 896 | apt-get build-dep -y qemu |
| 897 | apt-get install -y python3-pip |
| 898 | python3 -m pip install --upgrade pip |
| 899 | apt-get remove -y python3-setuptools |
| 900 | pip3 install -U setuptools |
| 901 | cd qemu |
| 902 | wget https://raw.githubusercontent.com/nihui/ncnn-assets/master/qemu-patches/0007-linux-user-Expose-risc-v-V-isa-bit-in-get_elf_hwcap.patch |
| 903 | patch -p1 -i 0007-linux-user-Expose-risc-v-V-isa-bit-in-get_elf_hwcap.patch |
| 904 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=riscv64-linux-user --disable-system |
| 905 | make -j$(nproc) |
| 906 | make install |
| 907 | |
| 908 | - name: cache-rv64gcv |
| 909 | id: cache-rv64gcv |
| 910 | uses: cache@1.* |
| 911 | with: |
| 912 | cachePaths: rv64gcv-install |
| 913 | cacheKey: rv64gcv-linux-install-20221029-1 |
| 914 | |
| 915 | - name: checkout-riscv-gnu-toolchain |
| 916 | if: steps.cache-rv64gcv.outputs.cacheHit != 'true' |
| 917 | checkout: https://github.com/riscv/riscv-gnu-toolchain.git |
| 918 | with: |
| 919 | pullType: COMMIT_ID |
| 920 | refName: da01ba455ce3802ffa84fdca3a089079996dbfc3 |
| 921 | localPath: riscv-gnu-toolchain |
| 922 | enableSubmodule: false |
| 923 | enableGitLfs: false |
| 924 | |
| 925 | - name: riscv-gnu-toolchain |
| 926 | if: steps.cache-rv64gcv.outputs.cacheHit != 'true' |
| 927 | run: | |
| 928 | apt-get update |
| 929 | apt-get install -y autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev device-tree-compiler |
| 930 | cd riscv-gnu-toolchain |
| 931 | git submodule update --init --recursive --depth 1 glibc |
| 932 | git submodule update --init --recursive --depth 1 newlib |
| 933 | #git submodule update --init --recursive --depth 1 riscv-binutils |
| 934 | #git submodule update --init --recursive --depth 1 riscv-gcc |
| 935 | git submodule update --init --recursive --depth 1 riscv-dejagnu |
| 936 | git submodule update --init --recursive --depth 1 riscv-gdb |
| 937 | rm -rf riscv-binutils |
| 938 | git clone -b binutils-2_39-branch https://sourceware.org/git/binutils-gdb.git riscv-binutils |
| 939 | rm -rf riscv-gcc |
| 940 | git clone -b riscv-gcc-rvv-next https://github.com/riscv-collab/riscv-gcc.git riscv-gcc |
| 941 | cd riscv-gcc |
| 942 | git checkout 8a0c1b106f01c455a8fb478cfe52d859a69020fd |
| 943 | cd .. |
| 944 | sed -i '/__OBSOLETE_MATH/d' newlib/newlib/libm/common/math_errf.c |
| 945 | ./configure --prefix=${{ci.workspace}}/rv64gcv-install --with-arch=rv64gcv_zfh |
| 946 | make linux -j$(nproc) |
| 947 | find ${{ci.workspace}}/rv64gcv-install -type f | xargs -i strip -g {} || true |
| 948 | |
| 949 | - name: build |
| 950 | run: | |
| 951 | export RISCV_ROOT_PATH=${{ci.workspace}}/rv64gcv-install |
| 952 | mkdir build && cd build |
| 953 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/riscv64-unknown-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_C_FLAGS="-O1" -DCMAKE_CXX_FLAGS="-O1" -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_RVV=ON -DNCNN_OPENMP=${{matrix.OPENMP}} -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 954 | cmake --build . -j 4 |
| 955 | - name: test-vlen128 |
| 956 | run: | |
| 957 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 958 | cd build |
| 959 | TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-cpu;rv64,v=true,Zfh=true,x-zvfh=true,vlen=128,elen=64,vext_spec=v1.0;-L;${{ci.workspace}}/rv64gcv-install/sysroot" ctest --output-on-failure -j 4 |
| 960 | - name: lcov-collect-vlen128 |
| 961 | run: | |
| 962 | cd build |
| 963 | lcov --gcov-tool ${{ci.workspace}}/rv64gcv-install/bin/riscv64-unknown-linux-gnu-gcov -d ./src -c -o lcov.info |
| 964 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 965 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 966 | lcov -r lcov.info '*/rv64gcv-install/*' -o lcov.info |
| 967 | lcov --list lcov.info |
| 968 | - name: codecov-vlen128 |
| 969 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 970 | - name: test-vlen256 |
| 971 | run: | |
| 972 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 973 | cd build |
| 974 | TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-cpu;rv64,v=true,Zfh=true,x-zvfh=true,vlen=256,elen=64,vext_spec=v1.0;-L;${{ci.workspace}}/rv64gcv-install/sysroot" ctest --output-on-failure -j 4 |
| 975 | - name: lcov-collect-vlen256 |
| 976 | run: | |
| 977 | cd build |
| 978 | lcov --gcov-tool ${{ci.workspace}}/rv64gcv-install/bin/riscv64-unknown-linux-gnu-gcov -d ./src -c -o lcov.info |
| 979 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 980 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 981 | lcov -r lcov.info '*/rv64gcv-install/*' -o lcov.info |
| 982 | lcov --list lcov.info |
| 983 | - name: codecov-vlen256 |
| 984 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 985 | |
| 986 | linux-gcc-loongarch64: |
| 987 | name: linux-gcc-loongarch64 |
| 988 | strategy: |
| 989 | matrix: |
| 990 | OPENMP: ['OFF', 'ON'] |
| 991 | |
| 992 | runs-on: |
| 993 | pool-name: docker |
| 994 | container: |
| 995 | image: bkci/ci:ubuntu |
| 996 | steps: |
| 997 | - name: checkout |
| 998 | checkout: self |
| 999 | with: |
| 1000 | strategy: FRESH_CHECKOUT |
| 1001 | enableSubmodule: false |
| 1002 | enableGitLfs: false |
| 1003 | |
| 1004 | - name: install-deps |
| 1005 | run: | |
| 1006 | apt-get update |
| 1007 | apt-get install -y lcov libcapstone4 libglib2.0-0 python3-venv |
| 1008 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 1009 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 1010 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 1011 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 1012 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 1013 | shasum -a 256 -c codecov.SHA256SUM |
| 1014 | chmod +x codecov |
| 1015 | wget https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/download/8.0/loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz |
| 1016 | tar -xf loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz |
| 1017 | |
| 1018 | - name: cache-qemu |
| 1019 | id: cache-qemu |
| 1020 | uses: cache@1.* |
| 1021 | with: |
| 1022 | cachePaths: qemu-install |
| 1023 | cacheKey: qemu-loongarch64-install-20230524-1 |
| 1024 | |
| 1025 | - name: checkout-qemu |
| 1026 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 1027 | checkout: https://github.com/qemu/qemu.git |
| 1028 | with: |
| 1029 | pullType: COMMIT_ID |
| 1030 | refName: 1c12355b31046a6b35a4f50c85c4f01afb1bd728 |
| 1031 | localPath: qemu |
| 1032 | enableSubmodule: false |
| 1033 | enableGitLfs: false |
| 1034 | |
| 1035 | - name: qemu |
| 1036 | if: steps.cache-qemu.outputs.cacheHit != 'true' |
| 1037 | run: | |
| 1038 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list |
| 1039 | echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list |
| 1040 | apt-get update |
| 1041 | apt-get build-dep -y qemu |
| 1042 | cd qemu |
| 1043 | wget https://github.com/nihui/ncnn-assets/raw/master/qemu-patches/0001-linux-user-Expose-loongarch-lsx-isa-bit-in-get_elf_hwcap.patch |
| 1044 | patch -p1 -i 0001-linux-user-Expose-loongarch-lsx-isa-bit-in-get_elf_hwcap.patch |
| 1045 | ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=loongarch64-linux-user --disable-system |
| 1046 | make -j$(nproc) |
| 1047 | make install |
| 1048 | |
| 1049 | - name: build |
| 1050 | run: | |
| 1051 | export LOONGARCH64_ROOT_PATH=${{ci.workspace}}/cross-tools |
| 1052 | mkdir build && cd build |
| 1053 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/loongarch64-unknown-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_LSX=ON -DNCNN_LASX=OFF -DNCNN_OPENMP=${{matrix.OPENMP}} -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. |
| 1054 | cmake --build . -j 4 |
| 1055 | - name: test |
| 1056 | run: | |
| 1057 | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH |
| 1058 | cd build |
| 1059 | TESTS_EXECUTABLE_LOADER=qemu-loongarch64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;${{ci.workspace}}/cross-tools/target" ctest --output-on-failure -j 4 |
| 1060 | - name: lcov-collect |
| 1061 | run: | |
| 1062 | cd build |
| 1063 | lcov --gcov-tool ${{ci.workspace}}/cross-tools/bin/loongarch64-unknown-linux-gnu-gcov -d ./src -c -o lcov.info |
| 1064 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 1065 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 1066 | lcov -r lcov.info '*/cross-tools/*' -o lcov.info |
| 1067 | lcov --list lcov.info |
| 1068 | - name: codecov |
| 1069 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |
| 1070 | |
| 1071 | linux-gcc-x64-simplemath: |
| 1072 | name: linux-gcc-x64-simplemath |
| 1073 | |
| 1074 | runs-on: |
| 1075 | pool-name: docker |
| 1076 | container: |
| 1077 | image: bkci/ci:ubuntu |
| 1078 | steps: |
| 1079 | - name: checkout |
| 1080 | checkout: self |
| 1081 | with: |
| 1082 | strategy: FRESH_CHECKOUT |
| 1083 | enableSubmodule: false |
| 1084 | enableGitLfs: false |
| 1085 | |
| 1086 | - name: install-deps |
| 1087 | run: | |
| 1088 | apt-get update |
| 1089 | apt-get install -y lcov |
| 1090 | curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 1091 | curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 1092 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 1093 | curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 1094 | gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 1095 | shasum -a 256 -c codecov.SHA256SUM |
| 1096 | chmod +x codecov |
| 1097 | |
| 1098 | - name: build |
| 1099 | run: | |
| 1100 | mkdir build && cd build |
| 1101 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/host-c.gcc.toolchain.cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_STDIO=ON -DNCNN_STRING=ON -DNCNN_SIMPLESTL=ON -DNCNN_SIMPLEMATH=ON -DNCNN_BUILD_TESTS=ON -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF .. |
| 1102 | cmake --build . -j 4 |
| 1103 | - name: test |
| 1104 | run: cd build && ctest --output-on-failure -j 4 |
| 1105 | - name: lcov-collect |
| 1106 | run: | |
| 1107 | cd build |
| 1108 | lcov -d ./src -c -o lcov.info |
| 1109 | lcov -r lcov.info '/usr/*' -o lcov.info |
| 1110 | lcov -r lcov.info '*/build/*' -o lcov.info |
| 1111 | lcov --list lcov.info |
| 1112 | - name: codecov |
| 1113 | run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info |