| 1 | name: linux-x64-cpu-gcc-musl |
| 2 | on: |
| 3 | push: |
| 4 | branches: [master] |
| 5 | paths: |
| 6 | - '.github/workflows/linux-x64-cpu-gcc-musl.yml' |
| 7 | - 'toolchains/host-c.gcc.toolchain.cmake' |
| 8 | - 'CMakeLists.txt' |
| 9 | - 'cmake/**' |
| 10 | - 'src/*' |
| 11 | - 'src/layer/*' |
| 12 | - 'src/layer/x86/**' |
| 13 | - 'tests/**' |
| 14 | - 'tools/**' |
| 15 | - '!tools/pnnx/**' |
| 16 | - 'examples/**' |
| 17 | pull_request: |
| 18 | branches: [master] |
| 19 | paths: |
| 20 | - '.github/workflows/linux-x64-cpu-gcc-musl.yml' |
| 21 | - 'toolchains/host-c.gcc.toolchain.cmake' |
| 22 | - 'CMakeLists.txt' |
| 23 | - 'cmake/**' |
| 24 | - 'src/*' |
| 25 | - 'src/layer/*' |
| 26 | - 'src/layer/x86/**' |
| 27 | - 'tests/**' |
| 28 | - 'tools/**' |
| 29 | - '!tools/pnnx/**' |
| 30 | - 'examples/**' |
| 31 | concurrency: |
| 32 | group: linux-x64-cpu-gcc-musl-${{ github.ref }} |
| 33 | cancel-in-progress: true |
| 34 | permissions: |
| 35 | contents: read |
| 36 | |
| 37 | jobs: |
| 38 | linux-gcc-musl: |
| 39 | runs-on: ubuntu-latest |
| 40 | steps: |
| 41 | - uses: jirutka/setup-alpine@v1 |
| 42 | with: |
| 43 | packages: > |
| 44 | cmake |
| 45 | clang |
| 46 | clang-dev |
| 47 | make |
| 48 | gcc |
| 49 | g++ |
| 50 | libc-dev |
| 51 | linux-headers |
| 52 | |
| 53 | - uses: actions/checkout@v4 |
| 54 | - name: build |
| 55 | shell: alpine.sh {0} |
| 56 | run: | |
| 57 | mkdir build && cd build |
| 58 | cmake -DNCNN_BUILD_TESTS=ON .. |
| 59 | cmake --build . -j $(nproc) |
| 60 | - name: test |
| 61 | shell: alpine.sh {0} |
| 62 | run: cd build && ctest --output-on-failure -j $(nproc) |
| 63 | - name: build-shared |
| 64 | run: | |
| 65 | mkdir build-shared && cd build-shared |
| 66 | cmake -DNCNN_SHARED_LIB=ON .. |
| 67 | cmake --build . -j $(nproc) |