build.yml 5.4 KB

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