build.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. name: CI
  2. on: [push, pull_request]
  3. jobs:
  4. ubuntu-latest-make:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - name: Clone
  8. uses: actions/checkout@v1
  9. - name: Dependencies
  10. run: |
  11. sudo apt-get update
  12. sudo apt-get install build-essential
  13. - name: Build
  14. run: |
  15. make
  16. ubuntu-latest-cmake:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - name: Clone
  20. uses: actions/checkout@v1
  21. - name: Dependencies
  22. run: |
  23. sudo apt-get update
  24. sudo apt-get install build-essential
  25. - name: Build
  26. run: |
  27. mkdir build
  28. cd build
  29. cmake ..
  30. cmake --build . --config Release
  31. macOS-latest-make:
  32. runs-on: macos-latest
  33. steps:
  34. - name: Clone
  35. uses: actions/checkout@v1
  36. - name: Dependencies
  37. run: |
  38. brew update
  39. - name: Build
  40. run: |
  41. make
  42. macOS-latest-cmake:
  43. runs-on: macOS-latest
  44. steps:
  45. - name: Clone
  46. uses: actions/checkout@v1
  47. - name: Dependencies
  48. run: |
  49. brew update
  50. - name: Build
  51. run: |
  52. mkdir build
  53. cd build
  54. cmake ..
  55. cmake --build . --config Release
  56. windows-latest-cmake:
  57. runs-on: windows-latest
  58. steps:
  59. - name: Clone
  60. uses: actions/checkout@v1
  61. - name: Build
  62. run: |
  63. mkdir build
  64. cd build
  65. cmake ..
  66. cmake --build . --config Release
  67. # ubuntu-latest-gcc:
  68. # runs-on: ubuntu-latest
  69. #
  70. # strategy:
  71. # matrix:
  72. # build: [Debug, Release]
  73. #
  74. # steps:
  75. # - name: Clone
  76. # uses: actions/checkout@v1
  77. #
  78. # - name: Dependencies
  79. # run: |
  80. # sudo apt-get update
  81. # sudo apt-get install build-essential
  82. # sudo apt-get install cmake
  83. #
  84. # - name: Configure
  85. # run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  86. #
  87. # - name: Build
  88. # run: |
  89. # make
  90. #
  91. # ubuntu-latest-clang:
  92. # runs-on: ubuntu-latest
  93. #
  94. # strategy:
  95. # matrix:
  96. # build: [Debug, Release]
  97. #
  98. # steps:
  99. # - name: Clone
  100. # uses: actions/checkout@v1
  101. #
  102. # - name: Dependencies
  103. # run: |
  104. # sudo apt-get update
  105. # sudo apt-get install build-essential
  106. # sudo apt-get install cmake
  107. #
  108. # - name: Configure
  109. # run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
  110. #
  111. # - name: Build
  112. # run: |
  113. # make
  114. #
  115. # ubuntu-latest-gcc-sanitized:
  116. # runs-on: ubuntu-latest
  117. #
  118. # strategy:
  119. # matrix:
  120. # sanitizer: [ADDRESS, THREAD, UNDEFINED]
  121. #
  122. # steps:
  123. # - name: Clone
  124. # uses: actions/checkout@v1
  125. #
  126. # - name: Dependencies
  127. # run: |
  128. # sudo apt-get update
  129. # sudo apt-get install build-essential
  130. # sudo apt-get install cmake
  131. #
  132. # - name: Configure
  133. # run: cmake . -DCMAKE_BUILD_TYPE=Debug -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON
  134. #
  135. # - name: Build
  136. # run: |
  137. # make
  138. #
  139. # windows:
  140. # runs-on: windows-latest
  141. #
  142. # strategy:
  143. # matrix:
  144. # build: [Release]
  145. # arch: [Win32, x64]
  146. # include:
  147. # - arch: Win32
  148. # s2arc: x86
  149. # - arch: x64
  150. # s2arc: x64
  151. #
  152. # steps:
  153. # - name: Clone
  154. # uses: actions/checkout@v1
  155. #
  156. # - name: Add msbuild to PATH
  157. # uses: microsoft/setup-msbuild@v1
  158. #
  159. # - name: Configure
  160. # run: >
  161. # cmake -S . -B ./build -A ${{ matrix.arch }}
  162. # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  163. #
  164. # - name: Build
  165. # run: |
  166. # cd ./build
  167. # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
  168. #
  169. # - name: Upload binaries
  170. # uses: actions/upload-artifact@v1
  171. # with:
  172. # name: llama-bin-${{ matrix.arch }}
  173. # path: build/bin/${{ matrix.build }}
  174. #
  175. # windows-blas:
  176. # runs-on: windows-latest
  177. #
  178. # strategy:
  179. # matrix:
  180. # build: [Release]
  181. # arch: [Win32, x64]
  182. # blas: [ON]
  183. # include:
  184. # - arch: Win32
  185. # obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x86.zip
  186. # s2arc: x86
  187. # - arch: x64
  188. # obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip
  189. # s2arc: x64
  190. #
  191. # steps:
  192. # - name: Clone
  193. # uses: actions/checkout@v1
  194. #
  195. # - name: Add msbuild to PATH
  196. # uses: microsoft/setup-msbuild@v1
  197. #
  198. # - name: Fetch OpenBLAS
  199. # if: matrix.blas == 'ON'
  200. # run: |
  201. # C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
  202. # 7z x blas.zip -oblas -y
  203. # copy blas/include/cblas.h .
  204. # copy blas/include/openblas_config.h .
  205. # echo "blasdir=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
  206. #
  207. # - name: Configure
  208. # run: >
  209. # cmake -S . -B ./build -A ${{ matrix.arch }}
  210. # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  211. # -DLLAMA_SUPPORT_OPENBLAS=${{ matrix.blas }}
  212. # -DCMAKE_LIBRARY_PATH="$env:blasdir/lib"
  213. #
  214. # - name: Build
  215. # run: |
  216. # cd ./build
  217. # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
  218. #
  219. # - name: Copy libopenblas.dll
  220. # if: matrix.blas == 'ON'
  221. # run: copy "$env:blasdir/bin/libopenblas.dll" build/bin/${{ matrix.build }}
  222. #
  223. # - name: Upload binaries
  224. # if: matrix.blas == 'ON'
  225. # uses: actions/upload-artifact@v1
  226. # with:
  227. # name: llama-blas-bin-${{ matrix.arch }}
  228. # path: build/bin/${{ matrix.build }}
  229. #
  230. # emscripten:
  231. # runs-on: ubuntu-latest
  232. #
  233. # strategy:
  234. # matrix:
  235. # build: [Release]
  236. #
  237. # steps:
  238. # - name: Clone
  239. # uses: actions/checkout@v1
  240. #
  241. # - name: Dependencies
  242. # run: |
  243. # wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
  244. # tar -xvf master.tar.gz
  245. # emsdk-master/emsdk update
  246. # emsdk-master/emsdk install latest
  247. # emsdk-master/emsdk activate latest
  248. #
  249. # - name: Configure
  250. # run: echo "tmp"
  251. #
  252. # - name: Build
  253. # run: |
  254. # pushd emsdk-master
  255. # source ./emsdk_env.sh
  256. # popd
  257. # emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  258. # make