-
Notifications
You must be signed in to change notification settings - Fork 4.2k
128 lines (126 loc) · 3.94 KB
/
linux-x64-cpu-clang.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
name: linux-x64-cpu-clang
on:
push:
branches: [master]
paths:
- '.github/workflows/linux-x64-cpu-clang.yml'
- 'toolchains/host-c.clang.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-clang.yml'
- 'toolchains/host-c.clang.toolchain.cmake'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/*'
- 'src/layer/*'
- 'src/layer/x86/**'
- 'tests/**'
- 'tools/**'
- '!tools/pnnx/**'
- 'examples/**'
concurrency:
group: linux-x64-cpu-clang-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
linux-clang:
runs-on: ubuntu-latest
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
env:
CC: clang
CXX: clang++
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
env:
CC: clang
CXX: clang++
run: |
mkdir build-shared && cd build-shared
cmake -DNCNN_AVX2=ON -DNCNN_SHARED_LIB=ON ..
cmake --build . -j $(nproc)
- name: build-avx2
env:
CC: clang
CXX: clang++
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
env:
CC: clang
CXX: clang++
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
env:
CC: clang
CXX: clang++
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
env:
CC: clang
CXX: clang++
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-clang-simplestl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build-simplestl
env:
CC: clang
CXX: clang++
run: |
mkdir build-simplestl && cd build-simplestl
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/host-c.clang.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
env:
CC: clang
CXX: clang++
run: |
mkdir build-simplestl-simpleomp && cd build-simplestl-simpleomp
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/host-c.clang.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)