diff --git a/.ci/test-coverage.yml b/.ci/test-coverage.yml index ccd1f994ea0..6cd442850b3 100644 --- a/.ci/test-coverage.yml +++ b/.ci/test-coverage.yml @@ -22,329 +22,329 @@ concurrency: group: test-coverage-${{ ci.head_ref }} jobs: - # linux-gcc-gpu: - # name: linux-gcc-gpu - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov libvulkan-dev - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: cache-swiftshader - # id: cache-swiftshader - # uses: cache@1.* - # with: - # cachePaths: swiftshader-install - # cacheKey: swiftshader-linux-install-20240622 - # - # - name: checkout-swiftshader - # if: steps.cache-swiftshader.outputs.cacheHit != 'true' - # checkout: https://github.com/google/swiftshader.git - # with: - # pullType: COMMIT_ID - # refName: de870ac7518fe2b6bb651ecc22fc36647cf7b986 - # localPath: swiftshader - # enableSubmodule: false - # enableGitLfs: false - # - # - name: swiftshader - # if: steps.cache-swiftshader.outputs.cacheHit != 'true' - # run: | - # cd swiftshader - # git -c submodule."third_party/git-hooks".update=none submodule update --init --recursive - # mkdir -p build; cd build - # 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 .. - # cmake --build . -j $(nproc) - # mkdir ${{ci.workspace}}/swiftshader-install - # cp Linux/* ${{ci.workspace}}/swiftshader-install - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # printf "[Processor]\nThreadCount=4\n" > build/tests/SwiftShader.ini - # export VK_ICD_FILENAMES="${{ci.workspace}}/swiftshader-install/vk_swiftshader_icd.json" - # 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 '*/build/*' -o lcov.info - # lcov -r lcov.info '*/glslang/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-gpu-lavapipe: - # name: linux-gcc-gpu-lavapipe - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov libvulkan-dev libxcb-shm0 - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: cache-lavapipe - # id: cache-lavapipe - # uses: cache@1.* - # with: - # cachePaths: lavapipe-install - # cacheKey: lavapipe-linux-install-20211127-4 - # - # - name: checkout-lavapipe - # if: steps.cache-lavapipe.outputs.cacheHit != 'true' - # checkout: https://github.com/mesa3d/mesa.git - # with: - # pullType: COMMIT_ID - # refName: cd39180cfab20734744b379b085cc3b5c2cecd3a - # localPath: mesa - # enableSubmodule: false - # enableGitLfs: false - # - # - name: lavapipe - # if: steps.cache-lavapipe.outputs.cacheHit != 'true' - # run: | - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list - # apt-get update - # apt-get build-dep -y mesa - # mkdir -p "${{ci.workspace}}/lavapipe-install" - # cd mesa - # mkdir build - # cd build - # 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 .. - # ninja -j$(nproc) - # ninja install - # find ${{ci.workspace}}/lavapipe-install - # cat ${{ci.workspace}}/lavapipe-install/share/vulkan/icd.d/lvp_icd.x86_64.json - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # export LP_NUM_THREADS=4 - # export VK_ICD_FILENAMES="${{ci.workspace}}/lavapipe-install/share/vulkan/icd.d/lvp_icd.x86_64.json" - # 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 '*/build/*' -o lcov.info - # lcov -r lcov.info '*/glslang/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-x64: - # name: linux-gcc-x64 - # strategy: - # matrix: - # # openmp: ['OFF', 'ON'] - # include: - # - { SSE2: 'OFF', AVX: 'OFF', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} - # - { SSE2: 'ON', AVX: 'OFF', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} - # - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} - # - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} - # - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'ON', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} - # - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'ON', AVX512VNNI: 'ON', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: build - # run: | - # mkdir build && cd build - # 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 \ - # -DNCNN_SSE2=${{matrix.SSE2}} \ - # -DNCNN_AVX=${{matrix.AVX}} \ - # -DNCNN_XOP=${{matrix.XOP}} \ - # -DNCNN_F16C=${{matrix.F16C}} \ - # -DNCNN_FMA=${{matrix.FMA}} \ - # -DNCNN_AVX2=${{matrix.AVX2}} \ - # -DNCNN_AVX512=${{matrix.AVX512}} \ - # -DNCNN_AVXVNNI=${{matrix.AVXVNNI}} \ - # -DNCNN_AVX512VNNI=${{matrix.AVX512VNNI}} \ - # -DNCNN_AVX512BF16=${{matrix.AVX512BF16}} \ - # -DNCNN_AVX512FP16=${{matrix.AVX512FP16}} \ - # .. - # cmake --build . -j 4 - # - name: test - # 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 '*/build/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-arm: - # name: linux-gcc-arm - # strategy: - # matrix: - # # openmp: ['OFF', 'ON'] - # include: - # - { GNU_INLINE_ASM: 'ON'} - # - { GNU_INLINE_ASM: 'OFF'} - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov g++-arm-linux-gnueabi g++-arm-linux-gnueabihf libcapstone4 libglib2.0-0 - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: cache-qemu - # id: cache-qemu - # uses: cache@1.* - # with: - # cachePaths: qemu-install - # cacheKey: qemu-arm-install-20220831-1 - # - # - name: checkout-qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # checkout: https://github.com/qemu/qemu.git - # with: - # pullType: COMMIT_ID - # refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 - # localPath: qemu - # enableSubmodule: false - # enableGitLfs: false - # - # - name: qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # run: | - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list - # apt-get update - # apt-get build-dep -y qemu - # cd qemu - # ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=arm-linux-user --disable-system - # make -j$(nproc) - # make install - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # export PATH=${{ci.workspace}}/qemu-install/bin:$PATH - # cd build - # TESTS_EXECUTABLE_LOADER=qemu-arm TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/arm-linux-gnueabi" 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 '*/build/*' -o lcov.info - # lcov --list lcov.info - # - # - name: build-armhf-vfpv3-d16 - # run: | - # mkdir build-armhf-vfpv3-d16 && cd build-armhf-vfpv3-d16 - # 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 .. - # cmake --build . -j 4 - # - name: test-armhf-vfpv3-d16 - # run: | - # export PATH=${{ci.workspace}}/qemu-install/bin:$PATH - # cd build-armhf-vfpv3-d16 - # TESTS_EXECUTABLE_LOADER=qemu-arm TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/arm-linux-gnueabihf" ctest --output-on-failure -j 4 - # - name: lcov-collect-armhf-vfpv3-d16 - # run: | - # cd build-armhf-vfpv3-d16 - # lcov -d ./src -c -o lcov.info - # lcov -r lcov.info '/usr/*' -o lcov.info - # lcov -r lcov.info '*/build-armhf-vfpv3-d16/*' -o lcov.info - # lcov --list lcov.info - # - # - name: codecov - # run: | - # ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build-armhf-vfpv3-d16/lcov.info + linux-gcc-gpu: + name: linux-gcc-gpu + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov libvulkan-dev + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: cache-swiftshader + id: cache-swiftshader + uses: cache@1.* + with: + cachePaths: swiftshader-install + cacheKey: swiftshader-linux-install-20240622 + + - name: checkout-swiftshader + if: steps.cache-swiftshader.outputs.cacheHit != 'true' + checkout: https://github.com/google/swiftshader.git + with: + pullType: COMMIT_ID + refName: de870ac7518fe2b6bb651ecc22fc36647cf7b986 + localPath: swiftshader + enableSubmodule: false + enableGitLfs: false + + - name: swiftshader + if: steps.cache-swiftshader.outputs.cacheHit != 'true' + run: | + cd swiftshader + git -c submodule."third_party/git-hooks".update=none submodule update --init --recursive + mkdir -p build; cd build + 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 .. + cmake --build . -j $(nproc) + mkdir ${{ci.workspace}}/swiftshader-install + cp Linux/* ${{ci.workspace}}/swiftshader-install + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + printf "[Processor]\nThreadCount=4\n" > build/tests/SwiftShader.ini + export VK_ICD_FILENAMES="${{ci.workspace}}/swiftshader-install/vk_swiftshader_icd.json" + 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 '*/build/*' -o lcov.info + lcov -r lcov.info '*/glslang/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-gpu-lavapipe: + name: linux-gcc-gpu-lavapipe + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov libvulkan-dev libxcb-shm0 + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: cache-lavapipe + id: cache-lavapipe + uses: cache@1.* + with: + cachePaths: lavapipe-install + cacheKey: lavapipe-linux-install-20211127-4 + + - name: checkout-lavapipe + if: steps.cache-lavapipe.outputs.cacheHit != 'true' + checkout: https://github.com/mesa3d/mesa.git + with: + pullType: COMMIT_ID + refName: cd39180cfab20734744b379b085cc3b5c2cecd3a + localPath: mesa + enableSubmodule: false + enableGitLfs: false + + - name: lavapipe + if: steps.cache-lavapipe.outputs.cacheHit != 'true' + run: | + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list + apt-get update + apt-get build-dep -y mesa + mkdir -p "${{ci.workspace}}/lavapipe-install" + cd mesa + mkdir build + cd build + 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 .. + ninja -j$(nproc) + ninja install + find ${{ci.workspace}}/lavapipe-install + cat ${{ci.workspace}}/lavapipe-install/share/vulkan/icd.d/lvp_icd.x86_64.json + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + export LP_NUM_THREADS=4 + export VK_ICD_FILENAMES="${{ci.workspace}}/lavapipe-install/share/vulkan/icd.d/lvp_icd.x86_64.json" + 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 '*/build/*' -o lcov.info + lcov -r lcov.info '*/glslang/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-x64: + name: linux-gcc-x64 + strategy: + matrix: + # openmp: ['OFF', 'ON'] + include: + - { SSE2: 'OFF', AVX: 'OFF', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} + - { SSE2: 'ON', AVX: 'OFF', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} + - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'OFF', FMA: 'OFF', AVX2: 'OFF', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} + - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'OFF', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} + - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'ON', AVX512VNNI: 'OFF', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} + - { SSE2: 'ON', AVX: 'ON', XOP: 'OFF', F16C: 'ON', FMA: 'ON', AVX2: 'ON', AVX512: 'ON', AVX512VNNI: 'ON', AVXVNNI: 'OFF', AVX512BF16: 'OFF', AVX512FP16: 'OFF'} + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: build + run: | + mkdir build && cd build + 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 \ + -DNCNN_SSE2=${{matrix.SSE2}} \ + -DNCNN_AVX=${{matrix.AVX}} \ + -DNCNN_XOP=${{matrix.XOP}} \ + -DNCNN_F16C=${{matrix.F16C}} \ + -DNCNN_FMA=${{matrix.FMA}} \ + -DNCNN_AVX2=${{matrix.AVX2}} \ + -DNCNN_AVX512=${{matrix.AVX512}} \ + -DNCNN_AVXVNNI=${{matrix.AVXVNNI}} \ + -DNCNN_AVX512VNNI=${{matrix.AVX512VNNI}} \ + -DNCNN_AVX512BF16=${{matrix.AVX512BF16}} \ + -DNCNN_AVX512FP16=${{matrix.AVX512FP16}} \ + .. + cmake --build . -j 4 + - name: test + 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 '*/build/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-arm: + name: linux-gcc-arm + strategy: + matrix: + # openmp: ['OFF', 'ON'] + include: + - { GNU_INLINE_ASM: 'ON'} + - { GNU_INLINE_ASM: 'OFF'} + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov g++-arm-linux-gnueabi g++-arm-linux-gnueabihf libcapstone4 libglib2.0-0 + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: cache-qemu + id: cache-qemu + uses: cache@1.* + with: + cachePaths: qemu-install + cacheKey: qemu-arm-install-20220831-1 + + - name: checkout-qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + checkout: https://github.com/qemu/qemu.git + with: + pullType: COMMIT_ID + refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 + localPath: qemu + enableSubmodule: false + enableGitLfs: false + + - name: qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + run: | + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list + apt-get update + apt-get build-dep -y qemu + cd qemu + ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=arm-linux-user --disable-system + make -j$(nproc) + make install + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + export PATH=${{ci.workspace}}/qemu-install/bin:$PATH + cd build + TESTS_EXECUTABLE_LOADER=qemu-arm TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/arm-linux-gnueabi" 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 '*/build/*' -o lcov.info + lcov --list lcov.info + + - name: build-armhf-vfpv3-d16 + run: | + mkdir build-armhf-vfpv3-d16 && cd build-armhf-vfpv3-d16 + 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 .. + cmake --build . -j 4 + - name: test-armhf-vfpv3-d16 + run: | + export PATH=${{ci.workspace}}/qemu-install/bin:$PATH + cd build-armhf-vfpv3-d16 + TESTS_EXECUTABLE_LOADER=qemu-arm TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/arm-linux-gnueabihf" ctest --output-on-failure -j 4 + - name: lcov-collect-armhf-vfpv3-d16 + run: | + cd build-armhf-vfpv3-d16 + lcov -d ./src -c -o lcov.info + lcov -r lcov.info '/usr/*' -o lcov.info + lcov -r lcov.info '*/build-armhf-vfpv3-d16/*' -o lcov.info + lcov --list lcov.info + + - name: codecov + run: | + ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build-armhf-vfpv3-d16/lcov.info linux-gcc-aarch64: name: linux-gcc-aarch64 @@ -423,7 +423,7 @@ jobs: -DNCNN_ARM84BF16=${{matrix.ARM84BF16}} \ -DNCNN_ARM84I8MM=${{matrix.ARM84I8MM}} \ .. - cmake --build . -j 1 --verbose + cmake --build . -j 4 - name: test run: | export PATH=${{ci.workspace}}/qemu-install/bin:$PATH @@ -439,532 +439,532 @@ jobs: - name: codecov run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # linux-gcc-mipsisa32r6el: - # name: linux-gcc-mipsisa32r6el - # strategy: - # matrix: - # OPENMP: ['OFF', 'ON'] - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov g++-mipsisa32r6el-linux-gnu libcapstone4 libglib2.0-0 - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: cache-qemu - # id: cache-qemu - # uses: cache@1.* - # with: - # cachePaths: qemu-install - # cacheKey: qemu-mipsel-install-20220831-1 - # - # - name: checkout-qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # checkout: https://github.com/qemu/qemu.git - # with: - # pullType: COMMIT_ID - # refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 - # localPath: qemu - # enableSubmodule: false - # enableGitLfs: false - # - # - name: qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # run: | - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list - # apt-get update - # apt-get build-dep -y qemu - # cd qemu - # ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=mipsel-linux-user --disable-system - # make -j$(nproc) - # make install - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # export PATH=${{ci.workspace}}/qemu-install/bin:$PATH - # cd build - # TESTS_EXECUTABLE_LOADER=qemu-mipsel TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/mipsisa32r6el-linux-gnu" 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 '*/build/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-mipsisa64r6el: - # name: linux-gcc-mipsisa64r6el - # strategy: - # matrix: - # OPENMP: ['OFF', 'ON'] - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov g++-mipsisa64r6el-linux-gnuabi64 libcapstone4 libglib2.0-0 - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: cache-qemu - # id: cache-qemu - # uses: cache@1.* - # with: - # cachePaths: qemu-install - # cacheKey: qemu-mips64el-install-20220831-1 - # - # - name: checkout-qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # checkout: https://github.com/qemu/qemu.git - # with: - # pullType: COMMIT_ID - # refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 - # localPath: qemu - # enableSubmodule: false - # enableGitLfs: false - # - # - name: qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # run: | - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list - # apt-get update - # apt-get build-dep -y qemu - # cd qemu - # ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=mips64el-linux-user --disable-system - # make -j$(nproc) - # make install - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # export PATH=${{ci.workspace}}/qemu-install/bin:$PATH - # cd build - # TESTS_EXECUTABLE_LOADER=qemu-mips64el TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/mipsisa64r6el-linux-gnuabi64" 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 '*/build/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-powerpc: - # name: linux-gcc-powerpc - # strategy: - # matrix: - # OPENMP: ['OFF', 'ON'] - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov g++-powerpc-linux-gnu libcapstone4 libglib2.0-0 - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: cache-qemu - # id: cache-qemu - # uses: cache@1.* - # with: - # cachePaths: qemu-install - # cacheKey: qemu-ppc-install-20220831-1 - # - # - name: checkout-qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # checkout: https://github.com/qemu/qemu.git - # with: - # pullType: COMMIT_ID - # refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 - # localPath: qemu - # enableSubmodule: false - # enableGitLfs: false - # - # - name: qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # run: | - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list - # apt-get update - # apt-get build-dep -y qemu - # cd qemu - # ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=ppc-linux-user --disable-system - # make -j$(nproc) - # make install - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # export PATH=${{ci.workspace}}/qemu-install/bin:$PATH - # cd build - # TESTS_EXECUTABLE_LOADER=qemu-ppc TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/powerpc-linux-gnu" 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 '*/build/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-powerpc64le: - # name: linux-gcc-powerpc64le - # strategy: - # matrix: - # OPENMP: ['OFF', 'ON'] - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov g++-powerpc64le-linux-gnu libcapstone4 libglib2.0-0 - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: cache-qemu - # id: cache-qemu - # uses: cache@1.* - # with: - # cachePaths: qemu-install - # cacheKey: qemu-ppc64le-install-20220831-1 - # - # - name: checkout-qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # checkout: https://github.com/qemu/qemu.git - # with: - # pullType: COMMIT_ID - # refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 - # localPath: qemu - # enableSubmodule: false - # enableGitLfs: false - # - # - name: qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # run: | - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list - # apt-get update - # apt-get build-dep -y qemu - # cd qemu - # ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=ppc64le-linux-user --disable-system - # make -j$(nproc) - # make install - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # export PATH=${{ci.workspace}}/qemu-install/bin:$PATH - # cd build - # TESTS_EXECUTABLE_LOADER=qemu-ppc64le TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/powerpc64le-linux-gnu" 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 '*/build/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-riscv64: - # name: linux-gcc-riscv64 - # strategy: - # matrix: - # OPENMP: ['OFF', 'ON'] - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov g++-riscv64-linux-gnu libcapstone4 libglib2.0-0 - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: cache-qemu - # id: cache-qemu - # uses: cache@1.* - # with: - # cachePaths: qemu-install - # cacheKey: qemu-riscv64-install-20230624-1 - # - # - name: checkout-qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # checkout: https://github.com/qemu/qemu.git - # with: - # pullType: COMMIT_ID - # refName: b455ce4c2f300c8ba47cba7232dd03261368a4cb - # localPath: qemu - # enableSubmodule: false - # enableGitLfs: false - # - # - name: qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # run: | - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list - # apt-get update - # apt-get build-dep -y qemu - # apt-get install -y python3-pip - # python3 -m pip install --upgrade pip - # apt-get remove -y python3-setuptools - # pip3 install -U setuptools - # cd qemu - # 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 - # patch -p1 -i 0007-linux-user-Expose-risc-v-V-isa-bit-in-get_elf_hwcap.patch - # ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=riscv64-linux-user --disable-system - # make -j$(nproc) - # make install - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # export PATH=${{ci.workspace}}/qemu-install/bin:$PATH - # cd build - # TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/riscv64-linux-gnu" 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 '*/build/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-loongarch64: - # name: linux-gcc-loongarch64 - # strategy: - # matrix: - # OPENMP: ['OFF', 'ON'] - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov libcapstone4 libglib2.0-0 python3-venv - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # wget https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/download/8.0/loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz - # tar -xf loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz - # - # - name: cache-qemu - # id: cache-qemu - # uses: cache@1.* - # with: - # cachePaths: qemu-install - # cacheKey: qemu-loongarch64-install-20230524-1 - # - # - name: checkout-qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # checkout: https://github.com/qemu/qemu.git - # with: - # pullType: COMMIT_ID - # refName: 1c12355b31046a6b35a4f50c85c4f01afb1bd728 - # localPath: qemu - # enableSubmodule: false - # enableGitLfs: false - # - # - name: qemu - # if: steps.cache-qemu.outputs.cacheHit != 'true' - # run: | - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list - # echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list - # apt-get update - # apt-get build-dep -y qemu - # cd qemu - # wget https://github.com/nihui/ncnn-assets/raw/master/qemu-patches/0001-linux-user-Expose-loongarch-lsx-isa-bit-in-get_elf_hwcap.patch - # patch -p1 -i 0001-linux-user-Expose-loongarch-lsx-isa-bit-in-get_elf_hwcap.patch - # ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=loongarch64-linux-user --disable-system - # make -j$(nproc) - # make install - # - # - name: build - # run: | - # export LOONGARCH64_ROOT_PATH=${{ci.workspace}}/cross-tools - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # run: | - # export PATH=${{ci.workspace}}/qemu-install/bin:$PATH - # cd build - # TESTS_EXECUTABLE_LOADER=qemu-loongarch64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;${{ci.workspace}}/cross-tools/target" ctest --output-on-failure -j 4 - # - name: lcov-collect - # run: | - # cd build - # lcov --gcov-tool ${{ci.workspace}}/cross-tools/bin/loongarch64-unknown-linux-gnu-gcov -d ./src -c -o lcov.info - # lcov -r lcov.info '/usr/*' -o lcov.info - # lcov -r lcov.info '*/build/*' -o lcov.info - # lcov -r lcov.info '*/cross-tools/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info - # - # linux-gcc-x64-simplemath: - # name: linux-gcc-x64-simplemath - # - # runs-on: - # pool-name: docker - # container: - # image: bkci/ci:ubuntu - # steps: - # - name: checkout - # checkout: self - # with: - # strategy: FRESH_CHECKOUT - # enableSubmodule: false - # enableGitLfs: false - # - # - name: install-deps - # run: | - # apt-get update - # apt-get install -y lcov - # curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - # curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - # gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - # shasum -a 256 -c codecov.SHA256SUM - # chmod +x codecov - # - # - name: build - # run: | - # mkdir build && cd build - # 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 .. - # cmake --build . -j 4 - # - name: test - # 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 '*/build/*' -o lcov.info - # lcov --list lcov.info - # - name: codecov - # run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + linux-gcc-mipsisa32r6el: + name: linux-gcc-mipsisa32r6el + strategy: + matrix: + OPENMP: ['OFF', 'ON'] + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov g++-mipsisa32r6el-linux-gnu libcapstone4 libglib2.0-0 + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: cache-qemu + id: cache-qemu + uses: cache@1.* + with: + cachePaths: qemu-install + cacheKey: qemu-mipsel-install-20220831-1 + + - name: checkout-qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + checkout: https://github.com/qemu/qemu.git + with: + pullType: COMMIT_ID + refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 + localPath: qemu + enableSubmodule: false + enableGitLfs: false + + - name: qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + run: | + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list + apt-get update + apt-get build-dep -y qemu + cd qemu + ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=mipsel-linux-user --disable-system + make -j$(nproc) + make install + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + export PATH=${{ci.workspace}}/qemu-install/bin:$PATH + cd build + TESTS_EXECUTABLE_LOADER=qemu-mipsel TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/mipsisa32r6el-linux-gnu" 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 '*/build/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-mipsisa64r6el: + name: linux-gcc-mipsisa64r6el + strategy: + matrix: + OPENMP: ['OFF', 'ON'] + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov g++-mipsisa64r6el-linux-gnuabi64 libcapstone4 libglib2.0-0 + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: cache-qemu + id: cache-qemu + uses: cache@1.* + with: + cachePaths: qemu-install + cacheKey: qemu-mips64el-install-20220831-1 + + - name: checkout-qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + checkout: https://github.com/qemu/qemu.git + with: + pullType: COMMIT_ID + refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 + localPath: qemu + enableSubmodule: false + enableGitLfs: false + + - name: qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + run: | + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list + apt-get update + apt-get build-dep -y qemu + cd qemu + ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=mips64el-linux-user --disable-system + make -j$(nproc) + make install + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + export PATH=${{ci.workspace}}/qemu-install/bin:$PATH + cd build + TESTS_EXECUTABLE_LOADER=qemu-mips64el TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/mipsisa64r6el-linux-gnuabi64" 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 '*/build/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-powerpc: + name: linux-gcc-powerpc + strategy: + matrix: + OPENMP: ['OFF', 'ON'] + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov g++-powerpc-linux-gnu libcapstone4 libglib2.0-0 + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: cache-qemu + id: cache-qemu + uses: cache@1.* + with: + cachePaths: qemu-install + cacheKey: qemu-ppc-install-20220831-1 + + - name: checkout-qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + checkout: https://github.com/qemu/qemu.git + with: + pullType: COMMIT_ID + refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 + localPath: qemu + enableSubmodule: false + enableGitLfs: false + + - name: qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + run: | + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list + apt-get update + apt-get build-dep -y qemu + cd qemu + ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=ppc-linux-user --disable-system + make -j$(nproc) + make install + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + export PATH=${{ci.workspace}}/qemu-install/bin:$PATH + cd build + TESTS_EXECUTABLE_LOADER=qemu-ppc TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/powerpc-linux-gnu" 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 '*/build/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-powerpc64le: + name: linux-gcc-powerpc64le + strategy: + matrix: + OPENMP: ['OFF', 'ON'] + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov g++-powerpc64le-linux-gnu libcapstone4 libglib2.0-0 + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: cache-qemu + id: cache-qemu + uses: cache@1.* + with: + cachePaths: qemu-install + cacheKey: qemu-ppc64le-install-20220831-1 + + - name: checkout-qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + checkout: https://github.com/qemu/qemu.git + with: + pullType: COMMIT_ID + refName: 621da7789083b80d6f1ff1c0fb499334007b4f51 + localPath: qemu + enableSubmodule: false + enableGitLfs: false + + - name: qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + run: | + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list + apt-get update + apt-get build-dep -y qemu + cd qemu + ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=ppc64le-linux-user --disable-system + make -j$(nproc) + make install + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + export PATH=${{ci.workspace}}/qemu-install/bin:$PATH + cd build + TESTS_EXECUTABLE_LOADER=qemu-ppc64le TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/powerpc64le-linux-gnu" 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 '*/build/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-riscv64: + name: linux-gcc-riscv64 + strategy: + matrix: + OPENMP: ['OFF', 'ON'] + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov g++-riscv64-linux-gnu libcapstone4 libglib2.0-0 + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: cache-qemu + id: cache-qemu + uses: cache@1.* + with: + cachePaths: qemu-install + cacheKey: qemu-riscv64-install-20230624-1 + + - name: checkout-qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + checkout: https://github.com/qemu/qemu.git + with: + pullType: COMMIT_ID + refName: b455ce4c2f300c8ba47cba7232dd03261368a4cb + localPath: qemu + enableSubmodule: false + enableGitLfs: false + + - name: qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + run: | + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list + apt-get update + apt-get build-dep -y qemu + apt-get install -y python3-pip + python3 -m pip install --upgrade pip + apt-get remove -y python3-setuptools + pip3 install -U setuptools + cd qemu + 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 + patch -p1 -i 0007-linux-user-Expose-risc-v-V-isa-bit-in-get_elf_hwcap.patch + ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=riscv64-linux-user --disable-system + make -j$(nproc) + make install + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + export PATH=${{ci.workspace}}/qemu-install/bin:$PATH + cd build + TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;/usr/riscv64-linux-gnu" 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 '*/build/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-loongarch64: + name: linux-gcc-loongarch64 + strategy: + matrix: + OPENMP: ['OFF', 'ON'] + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov libcapstone4 libglib2.0-0 python3-venv + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + wget https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/download/8.0/loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz + tar -xf loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz + + - name: cache-qemu + id: cache-qemu + uses: cache@1.* + with: + cachePaths: qemu-install + cacheKey: qemu-loongarch64-install-20230524-1 + + - name: checkout-qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + checkout: https://github.com/qemu/qemu.git + with: + pullType: COMMIT_ID + refName: 1c12355b31046a6b35a4f50c85c4f01afb1bd728 + localPath: qemu + enableSubmodule: false + enableGitLfs: false + + - name: qemu + if: steps.cache-qemu.outputs.cacheHit != 'true' + run: | + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye main' | tee -a /etc/apt/sources.list + echo 'deb-src http://mirrors.cloud.tencent.com/debian bullseye-updates main' | tee -a /etc/apt/sources.list + apt-get update + apt-get build-dep -y qemu + cd qemu + wget https://github.com/nihui/ncnn-assets/raw/master/qemu-patches/0001-linux-user-Expose-loongarch-lsx-isa-bit-in-get_elf_hwcap.patch + patch -p1 -i 0001-linux-user-Expose-loongarch-lsx-isa-bit-in-get_elf_hwcap.patch + ./configure --prefix=${{ci.workspace}}/qemu-install --target-list=loongarch64-linux-user --disable-system + make -j$(nproc) + make install + + - name: build + run: | + export LOONGARCH64_ROOT_PATH=${{ci.workspace}}/cross-tools + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + run: | + export PATH=${{ci.workspace}}/qemu-install/bin:$PATH + cd build + TESTS_EXECUTABLE_LOADER=qemu-loongarch64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-L;${{ci.workspace}}/cross-tools/target" ctest --output-on-failure -j 4 + - name: lcov-collect + run: | + cd build + lcov --gcov-tool ${{ci.workspace}}/cross-tools/bin/loongarch64-unknown-linux-gnu-gcov -d ./src -c -o lcov.info + lcov -r lcov.info '/usr/*' -o lcov.info + lcov -r lcov.info '*/build/*' -o lcov.info + lcov -r lcov.info '*/cross-tools/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info + + linux-gcc-x64-simplemath: + name: linux-gcc-x64-simplemath + + runs-on: + pool-name: docker + container: + image: bkci/ci:ubuntu + steps: + - name: checkout + checkout: self + with: + strategy: FRESH_CHECKOUT + enableSubmodule: false + enableGitLfs: false + + - name: install-deps + run: | + apt-get update + apt-get install -y lcov + curl https://uploader.codecov.io/verification.gpg | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + + - name: build + run: | + mkdir build && cd build + 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 .. + cmake --build . -j 4 + - name: test + 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 '*/build/*' -o lcov.info + lcov --list lcov.info + - name: codecov + run: ./codecov -t ${{settings.CODECOV_TOKEN.access_token}} -C ${{ ci.sha }} -B ${{ ci.head_ref }} -f build/lcov.info