-
Notifications
You must be signed in to change notification settings - Fork 4.2k
134 lines (131 loc) · 4.76 KB
/
linux-x64-cpu-gcc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: linux-x64-cpu-gcc
on:
push:
branches: [master]
paths:
- '.github/workflows/linux-x64-cpu-gcc.yml'
- 'toolchains/host-c.gcc.toolchain.cmake'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/*'
- 'src/layer/*'
- 'src/layer/x86/**'
- 'tests/**'
- 'tools/**'
- '!tools/pnnx/**'
- 'examples/**'
pull_request:
branches: [master]
paths:
- '.github/workflows/linux-x64-cpu-gcc.yml'
- 'toolchains/host-c.gcc.toolchain.cmake'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/*'
- 'src/layer/*'
- 'src/layer/x86/**'
- 'tests/**'
- 'tools/**'
- '!tools/pnnx/**'
- 'examples/**'
concurrency:
group: linux-x64-cpu-gcc-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
linux-gcc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: update
run: sudo apt-get update
- name: protobuf
run: sudo apt-get install libprotobuf-dev protobuf-compiler libopencv-dev
- name: build-sse2
run: |
mkdir build-sse2 && cd build-sse2
cmake -DNCNN_AVX=OFF -DNCNN_AVX2=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-sse2
run: cd build-sse2 && ctest --output-on-failure -j $(nproc)
- name: build-shared
run: |
mkdir build-shared && cd build-shared
cmake -DNCNN_AVX2=ON -DNCNN_SHARED_LIB=ON ..
cmake --build . -j $(nproc)
- name: build-avx2
run: |
mkdir build-avx2 && cd build-avx2
cmake -DNCNN_AVX2=ON -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-avx2
run: cd build-avx2 && ctest --output-on-failure -j $(nproc)
- name: build-avx
run: |
mkdir build-avx && cd build-avx
cmake -DNCNN_AVX2=OFF -DNCNN_AVX=ON -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-avx
run: cd build-avx && ctest --output-on-failure -j $(nproc)
- name: build-avx1-2
run: |
mkdir build-avx1-2 && cd build-avx1-2
cmake -DNCNN_AVX2=ON -DNCNN_AVX=ON -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-avx1-2
run: cd build-avx1-2 && ctest --output-on-failure -j $(nproc)
- name: build-noint8
run: |
mkdir build-noint8 && cd build-noint8
cmake -DNCNN_INT8=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-noint8
run: cd build-noint8 && ctest --output-on-failure -j $(nproc)
linux-gcc-cpp03-nostdio-nostring-simplestl:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: build-nostdio
run: |
mkdir build-nostdio && cd build-nostdio
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/host.gcc-c++03.toolchain.cmake -DNCNN_BUILD_TESTS=ON -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF ..
cmake --build . -j $(nproc)
- name: test-nostdio
run: cd build-nostdio && ctest --output-on-failure -j $(nproc)
- name: build-nostdio-nostring
run: |
mkdir build-nostdio-nostring && cd build-nostdio-nostring
cmake -DNCNN_STDIO=OFF -DNCNN_STRING=OFF -DNCNN_BUILD_TESTS=OFF -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF ..
cmake --build . -j $(nproc)
- name: build-simplestl
run: |
mkdir build-simplestl && cd build-simplestl
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/host-c.gcc.toolchain.cmake -DNCNN_STDIO=ON -DNCNN_STRING=ON -DNCNN_SIMPLESTL=ON -DNCNN_BUILD_TESTS=ON -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF ..
cmake --build . -j $(nproc)
- name: test-simplestl
run: cd build-simplestl && ctest --output-on-failure -j $(nproc)
- name: build-simplestl-simpleomp
run: |
mkdir build-simplestl-simpleomp && cd build-simplestl-simpleomp
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/host-c.gcc.toolchain.cmake -DNCNN_STDIO=ON -DNCNN_STRING=ON -DNCNN_SIMPLESTL=ON -DNCNN_SIMPLEOMP=ON -DNCNN_BUILD_TESTS=ON -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF ..
cmake --build . -j $(nproc)
- name: test-simplestl-simpleomp
run: cd build-simplestl-simpleomp && ctest --output-on-failure -j $(nproc)
linux-gcc-avx512:
runs-on: [self-hosted, linux, t4]
steps:
- uses: actions/checkout@v4
- name: build
env:
CC: gcc
CXX: g++
LD_LIBRARY_PATH: /data/action/install/lib64
run: |
mkdir build && cd build
cmake -DNCNN_AVX2=ON -DNCNN_AVX512=ON -DNCNN_AVX512VNNI=ON -DNCNN_BUILD_TESTS=ON -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF ..
cmake --build . -j 4
- name: test
env:
LD_LIBRARY_PATH: /data/action/install/lib64
run: cd build && ctest --output-on-failure -j 4