1
0

build.yml 5.6 KB

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