build.yml 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163
  1. name: CI
  2. on:
  3. workflow_dispatch: # allows manual triggering
  4. inputs:
  5. create_release:
  6. description: 'Create new release'
  7. required: true
  8. type: boolean
  9. push:
  10. branches:
  11. - master
  12. paths: ['.github/workflows/**', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m']
  13. pull_request:
  14. types: [opened, synchronize, reopened]
  15. paths: ['**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m']
  16. concurrency:
  17. group: ${{ github.workflow }}-${{ github.ref }}
  18. cancel-in-progress: true
  19. env:
  20. BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
  21. GGML_NLOOP: 3
  22. GGML_N_THREADS: 1
  23. jobs:
  24. macOS-latest-cmake-arm64:
  25. runs-on: macos-14
  26. steps:
  27. - name: Clone
  28. id: checkout
  29. uses: actions/checkout@v3
  30. - name: Dependencies
  31. id: depends
  32. continue-on-error: true
  33. run: |
  34. brew update
  35. - name: Build
  36. id: cmake_build
  37. run: |
  38. sysctl -a
  39. mkdir build
  40. cd build
  41. cmake -DLLAMA_FATAL_WARNINGS=ON -DLLAMA_METAL_EMBED_LIBRARY=ON -DLLAMA_CURL=ON ..
  42. cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
  43. - name: Test
  44. id: cmake_test
  45. run: |
  46. cd build
  47. ctest -L main --verbose --timeout 900
  48. - name: Determine tag name
  49. id: tag
  50. shell: bash
  51. run: |
  52. BUILD_NUMBER="$(git rev-list --count HEAD)"
  53. SHORT_HASH="$(git rev-parse --short=7 HEAD)"
  54. if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
  55. echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
  56. else
  57. SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
  58. echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
  59. fi
  60. - name: Pack artifacts
  61. id: pack_artifacts
  62. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  63. run: |
  64. cp LICENSE ./build/bin/
  65. zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip ./build/bin/*
  66. - name: Upload artifacts
  67. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  68. uses: actions/upload-artifact@v3
  69. with:
  70. path: |
  71. llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip
  72. macOS-latest-cmake-x64:
  73. runs-on: macos-latest
  74. steps:
  75. - name: Clone
  76. id: checkout
  77. uses: actions/checkout@v3
  78. - name: Dependencies
  79. id: depends
  80. continue-on-error: true
  81. run: |
  82. brew update
  83. - name: Build
  84. id: cmake_build
  85. run: |
  86. sysctl -a
  87. mkdir build
  88. cd build
  89. cmake -DLLAMA_FATAL_WARNINGS=ON -DLLAMA_METAL_EMBED_LIBRARY=ON -DLLAMA_CURL=ON ..
  90. cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
  91. - name: Test
  92. id: cmake_test
  93. run: |
  94. cd build
  95. ctest -L main --verbose --timeout 900
  96. - name: Determine tag name
  97. id: tag
  98. shell: bash
  99. run: |
  100. BUILD_NUMBER="$(git rev-list --count HEAD)"
  101. SHORT_HASH="$(git rev-parse --short=7 HEAD)"
  102. if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
  103. echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
  104. else
  105. SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
  106. echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
  107. fi
  108. - name: Pack artifacts
  109. id: pack_artifacts
  110. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  111. run: |
  112. cp LICENSE ./build/bin/
  113. zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip ./build/bin/*
  114. - name: Upload artifacts
  115. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  116. uses: actions/upload-artifact@v3
  117. with:
  118. path: |
  119. llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip
  120. ubuntu-focal-make:
  121. runs-on: ubuntu-20.04
  122. env:
  123. LLAMA_NODE_AVAILABLE: true
  124. LLAMA_PYTHON_AVAILABLE: true
  125. steps:
  126. - name: Clone
  127. id: checkout
  128. uses: actions/checkout@v3
  129. - name: Dependencies
  130. id: depends
  131. run: |
  132. sudo apt-get update
  133. sudo apt-get install build-essential gcc-8
  134. - uses: actions/setup-node@v4
  135. with:
  136. node-version: "20"
  137. - uses: actions/setup-python@v4
  138. with:
  139. python-version: "3.11"
  140. - name: Build
  141. id: make_build
  142. env:
  143. LLAMA_FATAL_WARNINGS: 1
  144. run: |
  145. CC=gcc-8 make -j $(nproc)
  146. - name: Test
  147. id: make_test
  148. run: |
  149. CC=gcc-8 make tests -j $(nproc)
  150. make test -j $(nproc)
  151. ubuntu-focal-make-curl:
  152. runs-on: ubuntu-20.04
  153. steps:
  154. - name: Clone
  155. id: checkout
  156. uses: actions/checkout@v3
  157. - name: Dependencies
  158. id: depends
  159. run: |
  160. sudo apt-get update
  161. sudo apt-get install build-essential gcc-8 libcurl4-openssl-dev
  162. - name: Build
  163. id: make_build
  164. env:
  165. LLAMA_FATAL_WARNINGS: 1
  166. LLAMA_CURL: 1
  167. run: |
  168. CC=gcc-8 make -j $(nproc)
  169. ubuntu-latest-cmake:
  170. runs-on: ubuntu-latest
  171. steps:
  172. - name: Clone
  173. id: checkout
  174. uses: actions/checkout@v3
  175. - name: Dependencies
  176. id: depends
  177. run: |
  178. sudo apt-get update
  179. sudo apt-get install build-essential
  180. - name: Build
  181. id: cmake_build
  182. run: |
  183. mkdir build
  184. cd build
  185. cmake .. -DLLAMA_FATAL_WARNINGS=ON
  186. cmake --build . --config Release -j $(nproc)
  187. - name: Test
  188. id: cmake_test
  189. run: |
  190. cd build
  191. ctest -L main --verbose --timeout 900
  192. - name: Test llama2c conversion
  193. id: llama2c_test
  194. run: |
  195. cd build
  196. echo "Fetch tokenizer"
  197. wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/tok512.bin
  198. echo "Fetch llama2c model"
  199. wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin
  200. ./bin/convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
  201. ./bin/main -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
  202. # ubuntu-latest-cmake-sanitizer:
  203. # runs-on: ubuntu-latest
  204. #
  205. # continue-on-error: true
  206. #
  207. # strategy:
  208. # matrix:
  209. # sanitizer: [ADDRESS, THREAD, UNDEFINED]
  210. # build_type: [Debug, Release]
  211. #
  212. # steps:
  213. # - name: Clone
  214. # id: checkout
  215. # uses: actions/checkout@v3
  216. #
  217. # - name: Dependencies
  218. # id: depends
  219. # run: |
  220. # sudo apt-get update
  221. # sudo apt-get install build-essential
  222. #
  223. # - name: Build
  224. # id: cmake_build
  225. # run: |
  226. # mkdir build
  227. # cd build
  228. # cmake .. -DLLAMA_FATAL_WARNINGS=ON -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
  229. # cmake --build . --config ${{ matrix.build_type }} -j $(nproc)
  230. #
  231. # - name: Test
  232. # id: cmake_test
  233. # run: |
  234. # cd build
  235. # ctest -L main --verbose --timeout 900
  236. ubuntu-latest-cmake-mpi:
  237. runs-on: ubuntu-latest
  238. continue-on-error: true
  239. strategy:
  240. matrix:
  241. mpi_library: [mpich, libopenmpi-dev]
  242. steps:
  243. - name: Clone
  244. id: checkout
  245. uses: actions/checkout@v3
  246. - name: Dependencies
  247. id: depends
  248. run: |
  249. sudo apt-get update
  250. sudo apt-get install build-essential ${{ matrix.mpi_library }}
  251. - name: Build
  252. id: cmake_build
  253. run: |
  254. mkdir build
  255. cd build
  256. cmake -DLLAMA_MPI=ON ..
  257. cmake --build . --config Release -j $(nproc)
  258. - name: Test
  259. id: cmake_test
  260. run: |
  261. cd build
  262. ctest -L main --verbose
  263. ubuntu-22-cmake-vulkan:
  264. runs-on: ubuntu-22.04
  265. steps:
  266. - name: Clone
  267. id: checkout
  268. uses: actions/checkout@v3
  269. - name: Dependencies
  270. id: depends
  271. run: |
  272. sudo apt-get update
  273. sudo apt-get install build-essential libvulkan-dev
  274. - name: Build
  275. id: cmake_build
  276. run: |
  277. mkdir build
  278. cd build
  279. cmake -DLLAMA_VULKAN=ON ..
  280. cmake --build . --config Release -j $(nproc)
  281. ubuntu-22-cmake-sycl:
  282. runs-on: ubuntu-22.04
  283. continue-on-error: true
  284. steps:
  285. - uses: actions/checkout@v2
  286. - name: add oneAPI to apt
  287. shell: bash
  288. run: |
  289. cd /tmp
  290. wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  291. sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  292. rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  293. sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
  294. - name: install oneAPI dpcpp compiler
  295. shell: bash
  296. run: |
  297. sudo apt update
  298. sudo apt install intel-oneapi-compiler-dpcpp-cpp
  299. - name: install oneAPI MKL library
  300. shell: bash
  301. run: |
  302. sudo apt install intel-oneapi-mkl-devel
  303. - name: Clone
  304. id: checkout
  305. uses: actions/checkout@v3
  306. - name: Build
  307. id: cmake_build
  308. run: |
  309. source /opt/intel/oneapi/setvars.sh
  310. mkdir build
  311. cd build
  312. cmake -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
  313. cmake --build . --config Release -j $(nproc)
  314. ubuntu-22-cmake-sycl-fp16:
  315. runs-on: ubuntu-22.04
  316. continue-on-error: true
  317. steps:
  318. - uses: actions/checkout@v2
  319. - name: add oneAPI to apt
  320. shell: bash
  321. run: |
  322. cd /tmp
  323. wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  324. sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  325. rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  326. sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
  327. - name: install oneAPI dpcpp compiler
  328. shell: bash
  329. run: |
  330. sudo apt update
  331. sudo apt install intel-oneapi-compiler-dpcpp-cpp
  332. - name: install oneAPI MKL library
  333. shell: bash
  334. run: |
  335. sudo apt install intel-oneapi-mkl-devel
  336. - name: Clone
  337. id: checkout
  338. uses: actions/checkout@v3
  339. - name: Build
  340. id: cmake_build
  341. run: |
  342. source /opt/intel/oneapi/setvars.sh
  343. mkdir build
  344. cd build
  345. cmake -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DLLAMA_SYCL_F16=ON ..
  346. cmake --build . --config Release -j $(nproc)
  347. # TODO: build with LLAMA_NO_METAL because test-backend-ops fail on "Apple Paravirtual device" and I don't know
  348. # how to debug it.
  349. # ref: https://github.com/ggerganov/llama.cpp/actions/runs/7131777249/job/19420981052#step:5:1124
  350. macOS-latest-make:
  351. runs-on: macos-latest
  352. steps:
  353. - name: Clone
  354. id: checkout
  355. uses: actions/checkout@v3
  356. - name: Dependencies
  357. id: depends
  358. continue-on-error: true
  359. run: |
  360. brew update
  361. - name: Build
  362. id: make_build
  363. env:
  364. LLAMA_FATAL_WARNINGS: 1
  365. run: |
  366. LLAMA_NO_METAL=1 make -j $(sysctl -n hw.logicalcpu)
  367. - name: Test
  368. id: make_test
  369. run: |
  370. LLAMA_NO_METAL=1 make tests -j $(sysctl -n hw.logicalcpu)
  371. LLAMA_NO_METAL=1 make test -j $(sysctl -n hw.logicalcpu)
  372. # TODO: build with LLAMA_METAL=OFF because test-backend-ops fail on "Apple Paravirtual device" and I don't know
  373. # how to debug it.
  374. # ref: https://github.com/ggerganov/llama.cpp/actions/runs/7132125951/job/19422043567?pr=4359#step:5:6584
  375. # would be great if we fix these
  376. macOS-latest-cmake:
  377. runs-on: macos-latest
  378. steps:
  379. - name: Clone
  380. id: checkout
  381. uses: actions/checkout@v3
  382. - name: Dependencies
  383. id: depends
  384. continue-on-error: true
  385. run: |
  386. brew update
  387. - name: Build
  388. id: cmake_build
  389. run: |
  390. sysctl -a
  391. mkdir build
  392. cd build
  393. cmake -DLLAMA_FATAL_WARNINGS=ON -DLLAMA_METAL=OFF ..
  394. cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
  395. - name: Test
  396. id: cmake_test
  397. run: |
  398. cd build
  399. ctest -L main --verbose --timeout 900
  400. macOS-latest-cmake-ios:
  401. runs-on: macos-latest
  402. steps:
  403. - name: Clone
  404. id: checkout
  405. uses: actions/checkout@v1
  406. - name: Dependencies
  407. id: depends
  408. continue-on-error: true
  409. run: |
  410. brew update
  411. - name: Build
  412. id: cmake_build
  413. run: |
  414. sysctl -a
  415. mkdir build
  416. cd build
  417. cmake -G Xcode .. \
  418. -DLLAMA_METAL_EMBED_LIBRARY=ON \
  419. -DLLAMA_BUILD_EXAMPLES=OFF \
  420. -DLLAMA_BUILD_TESTS=OFF \
  421. -DLLAMA_BUILD_SERVER=OFF \
  422. -DCMAKE_SYSTEM_NAME=iOS \
  423. -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
  424. cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
  425. macOS-latest-cmake-tvos:
  426. runs-on: macos-latest
  427. steps:
  428. - name: Clone
  429. id: checkout
  430. uses: actions/checkout@v1
  431. - name: Dependencies
  432. id: depends
  433. continue-on-error: true
  434. run: |
  435. brew update
  436. - name: Build
  437. id: cmake_build
  438. run: |
  439. sysctl -a
  440. mkdir build
  441. cd build
  442. cmake -G Xcode .. \
  443. -DLLAMA_METAL_EMBED_LIBRARY=ON \
  444. -DLLAMA_BUILD_EXAMPLES=OFF \
  445. -DLLAMA_BUILD_TESTS=OFF \
  446. -DLLAMA_BUILD_SERVER=OFF \
  447. -DCMAKE_SYSTEM_NAME=tvOS \
  448. -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
  449. cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
  450. macOS-latest-swift:
  451. runs-on: macos-latest
  452. strategy:
  453. matrix:
  454. destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']
  455. steps:
  456. - name: Clone
  457. id: checkout
  458. uses: actions/checkout@v1
  459. - name: Dependencies
  460. id: depends
  461. continue-on-error: true
  462. run: |
  463. brew update
  464. - name: xcodebuild for swift package
  465. id: xcodebuild
  466. run: |
  467. xcodebuild -scheme llama -destination "${{ matrix.destination }}"
  468. - name: Build Swift Example
  469. id: make_build_swift_example
  470. run: |
  471. make swift
  472. windows-latest-cmake:
  473. runs-on: windows-latest
  474. env:
  475. OPENBLAS_VERSION: 0.3.23
  476. OPENCL_VERSION: 2023.04.17
  477. CLBLAST_VERSION: 1.6.0
  478. SDE_VERSION: 9.33.0-2024-01-07
  479. VULKAN_VERSION: 1.3.261.1
  480. strategy:
  481. matrix:
  482. include:
  483. - build: 'noavx'
  484. defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF -DBUILD_SHARED_LIBS=ON'
  485. - build: 'avx2'
  486. defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON'
  487. - build: 'avx'
  488. defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX2=OFF -DBUILD_SHARED_LIBS=ON'
  489. - build: 'avx512'
  490. defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON'
  491. - build: 'clblast'
  492. defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CLBLAST=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"'
  493. - build: 'openblas'
  494. defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
  495. - build: 'kompute'
  496. defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_KOMPUTE=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON -DBUILD_SHARED_LIBS=ON'
  497. - build: 'vulkan'
  498. defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_VULKAN=ON -DBUILD_SHARED_LIBS=ON'
  499. - build: 'arm64'
  500. defines: '-A ARM64 -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON'
  501. steps:
  502. - name: Clone
  503. id: checkout
  504. uses: actions/checkout@v3
  505. with:
  506. fetch-depth: 0
  507. - name: Clone Kompute submodule
  508. id: clone_kompute
  509. if: ${{ matrix.build == 'kompute' }}
  510. run: |
  511. git submodule update --init kompute
  512. - name: Download OpenCL SDK
  513. id: get_opencl
  514. if: ${{ matrix.build == 'clblast' }}
  515. run: |
  516. curl.exe -o $env:RUNNER_TEMP/opencl.zip -L "https://github.com/KhronosGroup/OpenCL-SDK/releases/download/v${env:OPENCL_VERSION}/OpenCL-SDK-v${env:OPENCL_VERSION}-Win-x64.zip"
  517. mkdir $env:RUNNER_TEMP/opencl
  518. tar.exe -xvf $env:RUNNER_TEMP/opencl.zip --strip-components=1 -C $env:RUNNER_TEMP/opencl
  519. - name: Download CLBlast
  520. id: get_clblast
  521. if: ${{ matrix.build == 'clblast' }}
  522. run: |
  523. curl.exe -o $env:RUNNER_TEMP/clblast.7z -L "https://github.com/CNugteren/CLBlast/releases/download/${env:CLBLAST_VERSION}/CLBlast-${env:CLBLAST_VERSION}-windows-x64.7z"
  524. curl.exe -o $env:RUNNER_TEMP/CLBlast.LICENSE.txt -L "https://github.com/CNugteren/CLBlast/raw/${env:CLBLAST_VERSION}/LICENSE"
  525. 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/clblast.7z
  526. rename-item $env:RUNNER_TEMP/CLBlast-${env:CLBLAST_VERSION}-windows-x64 clblast
  527. foreach ($f in (gci -Recurse -Path "$env:RUNNER_TEMP/clblast" -Filter '*.cmake')) {
  528. $txt = Get-Content -Path $f -Raw
  529. $txt.Replace('C:/vcpkg/packages/opencl_x64-windows/', "$($env:RUNNER_TEMP.Replace('\','/'))/opencl/") | Set-Content -Path $f -Encoding UTF8
  530. }
  531. - name: Download OpenBLAS
  532. id: get_openblas
  533. if: ${{ matrix.build == 'openblas' }}
  534. run: |
  535. curl.exe -o $env:RUNNER_TEMP/openblas.zip -L "https://github.com/xianyi/OpenBLAS/releases/download/v${env:OPENBLAS_VERSION}/OpenBLAS-${env:OPENBLAS_VERSION}-x64.zip"
  536. curl.exe -o $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt -L "https://github.com/xianyi/OpenBLAS/raw/v${env:OPENBLAS_VERSION}/LICENSE"
  537. mkdir $env:RUNNER_TEMP/openblas
  538. tar.exe -xvf $env:RUNNER_TEMP/openblas.zip -C $env:RUNNER_TEMP/openblas
  539. $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)
  540. $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim()))
  541. $lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe')
  542. & $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll
  543. - name: Install Vulkan SDK
  544. id: get_vulkan
  545. if: ${{ matrix.build == 'kompute' || matrix.build == 'vulkan' }}
  546. run: |
  547. curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/VulkanSDK-${env:VULKAN_VERSION}-Installer.exe"
  548. & "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
  549. Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
  550. Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
  551. - name: Build
  552. id: cmake_build
  553. run: |
  554. mkdir build
  555. cd build
  556. cmake .. ${{ matrix.defines }}
  557. cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
  558. - name: Add clblast.dll
  559. id: add_clblast_dll
  560. if: ${{ matrix.build == 'clblast' }}
  561. run: |
  562. cp $env:RUNNER_TEMP/clblast/lib/clblast.dll ./build/bin/Release
  563. cp $env:RUNNER_TEMP/CLBlast.LICENSE.txt ./build/bin/Release/CLBlast-${env:CLBLAST_VERSION}.txt
  564. - name: Add libopenblas.dll
  565. id: add_libopenblas_dll
  566. if: ${{ matrix.build == 'openblas' }}
  567. run: |
  568. cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll
  569. cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt
  570. - name: Check AVX512F support
  571. id: check_avx512f
  572. if: ${{ matrix.build == 'avx512' }}
  573. continue-on-error: true
  574. run: |
  575. cd build
  576. $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)
  577. $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim()))
  578. $cl = $(join-path $msvc 'bin\Hostx64\x64\cl.exe')
  579. echo 'int main(void){unsigned int a[4];__cpuid(a,7);return !(a[1]&65536);}' >> avx512f.c
  580. & $cl /O2 /GS- /kernel avx512f.c /link /nodefaultlib /entry:main
  581. .\avx512f.exe && echo "AVX512F: YES" && ( echo HAS_AVX512F=1 >> $env:GITHUB_ENV ) || echo "AVX512F: NO"
  582. - name: Test
  583. id: cmake_test
  584. # not all machines have native AVX-512
  585. if: ${{ matrix.build != 'arm64' && matrix.build != 'clblast' && matrix.build != 'kompute' && matrix.build != 'vulkan' && (matrix.build != 'avx512' || env.HAS_AVX512F == '1') }}
  586. run: |
  587. cd build
  588. ctest -L main -C Release --verbose --timeout 900
  589. - name: Test (Intel SDE)
  590. id: cmake_test_sde
  591. if: ${{ matrix.build == 'avx512' && env.HAS_AVX512F == '0' }} # use Intel SDE for AVX-512 emulation
  592. run: |
  593. curl.exe -o $env:RUNNER_TEMP/sde.tar.xz -L "https://downloadmirror.intel.com/813591/sde-external-${env:SDE_VERSION}-win.tar.xz"
  594. # for some weird reason windows tar doesn't like sde tar.xz
  595. 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar.xz
  596. 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar
  597. $sde = $(join-path $env:RUNNER_TEMP sde-external-${env:SDE_VERSION}-win/sde.exe)
  598. cd build
  599. & $sde -future -- ctest -L main -C Release --verbose --timeout 900
  600. - name: Determine tag name
  601. id: tag
  602. shell: bash
  603. run: |
  604. BUILD_NUMBER="$(git rev-list --count HEAD)"
  605. SHORT_HASH="$(git rev-parse --short=7 HEAD)"
  606. if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
  607. echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
  608. else
  609. SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
  610. echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
  611. fi
  612. - name: Pack artifacts
  613. id: pack_artifacts
  614. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  615. run: |
  616. Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt
  617. 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-x64.zip .\build\bin\Release\*
  618. - name: Upload artifacts
  619. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  620. uses: actions/upload-artifact@v3
  621. with:
  622. path: |
  623. llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-x64.zip
  624. windows-latest-cmake-cuda:
  625. runs-on: windows-latest
  626. strategy:
  627. matrix:
  628. cuda: ['12.2.0', '11.7.1']
  629. build: ['cuda']
  630. steps:
  631. - name: Clone
  632. id: checkout
  633. uses: actions/checkout@v3
  634. with:
  635. fetch-depth: 0
  636. - uses: Jimver/cuda-toolkit@v0.2.11
  637. id: cuda-toolkit
  638. with:
  639. cuda: ${{ matrix.cuda }}
  640. method: 'network'
  641. sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
  642. - name: Build
  643. id: cmake_build
  644. run: |
  645. mkdir build
  646. cd build
  647. cmake .. -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=ON
  648. cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
  649. - name: Determine tag name
  650. id: tag
  651. shell: bash
  652. run: |
  653. BUILD_NUMBER="$(git rev-list --count HEAD)"
  654. SHORT_HASH="$(git rev-parse --short=7 HEAD)"
  655. if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
  656. echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
  657. else
  658. SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
  659. echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
  660. fi
  661. - name: Pack artifacts
  662. id: pack_artifacts
  663. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  664. run: |
  665. 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip .\build\bin\Release\*
  666. - name: Upload artifacts
  667. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  668. uses: actions/upload-artifact@v3
  669. with:
  670. path: |
  671. llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip
  672. - name: Copy and pack Cuda runtime
  673. run: |
  674. echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
  675. $dst='.\build\bin\cudart\'
  676. robocopy "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
  677. 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip $dst\*
  678. - name: Upload Cuda runtime
  679. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  680. uses: actions/upload-artifact@v3
  681. with:
  682. path: |
  683. cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
  684. windows-latest-cmake-sycl:
  685. runs-on: windows-latest
  686. defaults:
  687. run:
  688. shell: bash
  689. env:
  690. WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/62641e01-1e8d-4ace-91d6-ae03f7f8a71f/w_BaseKit_p_2024.0.0.49563_offline.exe
  691. WINDOWS_DPCPP_MKL: intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel
  692. steps:
  693. - name: Clone
  694. id: checkout
  695. uses: actions/checkout@v3
  696. with:
  697. fetch-depth: 0
  698. - name: Install
  699. run: scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
  700. - name: Build
  701. id: cmake_build
  702. run: examples/sycl/win-build-sycl.bat
  703. - name: Determine tag name
  704. id: tag
  705. shell: bash
  706. run: |
  707. BUILD_NUMBER="$(git rev-list --count HEAD)"
  708. SHORT_HASH="$(git rev-parse --short=7 HEAD)"
  709. if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
  710. echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
  711. else
  712. SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
  713. echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
  714. fi
  715. - name: Pack artifacts
  716. id: pack_artifacts
  717. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  718. run: |
  719. 7z a llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip .\build\bin\*
  720. - name: Upload artifacts
  721. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  722. uses: actions/upload-artifact@v3
  723. with:
  724. path: |
  725. llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip
  726. ios-xcode-build:
  727. runs-on: macos-latest
  728. steps:
  729. - name: Checkout code
  730. uses: actions/checkout@v3
  731. - name: Build Xcode project
  732. run: xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' build
  733. android-build:
  734. runs-on: ubuntu-latest
  735. steps:
  736. - name: Clone
  737. uses: actions/checkout@v3
  738. - name: Set up JDK
  739. uses: actions/setup-java@v3
  740. with:
  741. java-version: 17
  742. distribution: zulu
  743. - name: Setup Android SDK
  744. uses: android-actions/setup-android@v3
  745. with:
  746. log-accepted-android-sdk-licenses: false
  747. - name: Build
  748. run: |
  749. cd examples/llama.android
  750. ./gradlew build --no-daemon
  751. # freeBSD-latest:
  752. # runs-on: macos-12
  753. # steps:
  754. # - name: Clone
  755. # uses: actions/checkout@v3
  756. #
  757. # - name: Build
  758. # uses: cross-platform-actions/action@v0.19.0
  759. # with:
  760. # operating_system: freebsd
  761. # version: '13.2'
  762. # hypervisor: 'qemu'
  763. # run: |
  764. # sudo pkg update
  765. # sudo pkg install -y gmake automake autoconf pkgconf llvm15 clinfo clover opencl clblast openblas
  766. # gmake CC=/usr/local/bin/clang15 CXX=/usr/local/bin/clang++15 -j `sysctl -n hw.ncpu`
  767. release:
  768. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  769. runs-on: ubuntu-latest
  770. needs:
  771. - ubuntu-focal-make
  772. - ubuntu-latest-cmake
  773. - macOS-latest-make
  774. - macOS-latest-cmake
  775. - windows-latest-cmake
  776. - windows-latest-cmake-cuda
  777. - macOS-latest-cmake-arm64
  778. - macOS-latest-cmake-x64
  779. steps:
  780. - name: Clone
  781. id: checkout
  782. uses: actions/checkout@v3
  783. with:
  784. fetch-depth: 0
  785. - name: Determine tag name
  786. id: tag
  787. shell: bash
  788. run: |
  789. BUILD_NUMBER="$(git rev-list --count HEAD)"
  790. SHORT_HASH="$(git rev-parse --short=7 HEAD)"
  791. if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
  792. echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
  793. else
  794. SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
  795. echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
  796. fi
  797. - name: Download artifacts
  798. id: download-artifact
  799. uses: actions/download-artifact@v3
  800. - name: Create release
  801. id: create_release
  802. uses: anzz1/action-create-release@v1
  803. env:
  804. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  805. with:
  806. tag_name: ${{ steps.tag.outputs.name }}
  807. - name: Upload release
  808. id: upload_release
  809. uses: actions/github-script@v3
  810. with:
  811. github-token: ${{secrets.GITHUB_TOKEN}}
  812. script: |
  813. const path = require('path');
  814. const fs = require('fs');
  815. const release_id = '${{ steps.create_release.outputs.id }}';
  816. for (let file of await fs.readdirSync('./artifact')) {
  817. if (path.extname(file) === '.zip') {
  818. console.log('uploadReleaseAsset', file);
  819. await github.repos.uploadReleaseAsset({
  820. owner: context.repo.owner,
  821. repo: context.repo.repo,
  822. release_id: release_id,
  823. name: file,
  824. data: await fs.readFileSync(`./artifact/${file}`)
  825. });
  826. }
  827. }
  828. # ubuntu-latest-gcc:
  829. # runs-on: ubuntu-latest
  830. #
  831. # strategy:
  832. # matrix:
  833. # build: [Debug, Release]
  834. #
  835. # steps:
  836. # - name: Clone
  837. # uses: actions/checkout@v3
  838. #
  839. # - name: Dependencies
  840. # run: |
  841. # sudo apt-get update
  842. # sudo apt-get install build-essential
  843. # sudo apt-get install cmake
  844. #
  845. # - name: Configure
  846. # run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  847. #
  848. # - name: Build
  849. # run: |
  850. # make
  851. #
  852. # ubuntu-latest-clang:
  853. # runs-on: ubuntu-latest
  854. #
  855. # strategy:
  856. # matrix:
  857. # build: [Debug, Release]
  858. #
  859. # steps:
  860. # - name: Clone
  861. # uses: actions/checkout@v3
  862. #
  863. # - name: Dependencies
  864. # run: |
  865. # sudo apt-get update
  866. # sudo apt-get install build-essential
  867. # sudo apt-get install cmake
  868. #
  869. # - name: Configure
  870. # run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
  871. #
  872. # - name: Build
  873. # run: |
  874. # make
  875. #
  876. # ubuntu-latest-gcc-sanitized:
  877. # runs-on: ubuntu-latest
  878. #
  879. # strategy:
  880. # matrix:
  881. # sanitizer: [ADDRESS, THREAD, UNDEFINED]
  882. #
  883. # steps:
  884. # - name: Clone
  885. # uses: actions/checkout@v3
  886. #
  887. # - name: Dependencies
  888. # run: |
  889. # sudo apt-get update
  890. # sudo apt-get install build-essential
  891. # sudo apt-get install cmake
  892. #
  893. # - name: Configure
  894. # run: cmake . -DCMAKE_BUILD_TYPE=Debug -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON
  895. #
  896. # - name: Build
  897. # run: |
  898. # make
  899. #
  900. # windows:
  901. # runs-on: windows-latest
  902. #
  903. # strategy:
  904. # matrix:
  905. # build: [Release]
  906. # arch: [Win32, x64]
  907. # include:
  908. # - arch: Win32
  909. # s2arc: x86
  910. # - arch: x64
  911. # s2arc: x64
  912. #
  913. # steps:
  914. # - name: Clone
  915. # uses: actions/checkout@v3
  916. #
  917. # - name: Add msbuild to PATH
  918. # uses: microsoft/setup-msbuild@v1
  919. #
  920. # - name: Configure
  921. # run: >
  922. # cmake -S . -B ./build -A ${{ matrix.arch }}
  923. # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  924. #
  925. # - name: Build
  926. # run: |
  927. # cd ./build
  928. # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
  929. #
  930. # - name: Upload binaries
  931. # uses: actions/upload-artifact@v1
  932. # with:
  933. # name: llama-bin-${{ matrix.arch }}
  934. # path: build/bin/${{ matrix.build }}
  935. #
  936. # windows-blas:
  937. # runs-on: windows-latest
  938. #
  939. # strategy:
  940. # matrix:
  941. # build: [Release]
  942. # arch: [Win32, x64]
  943. # blas: [ON]
  944. # include:
  945. # - arch: Win32
  946. # obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x86.zip
  947. # s2arc: x86
  948. # - arch: x64
  949. # obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip
  950. # s2arc: x64
  951. #
  952. # steps:
  953. # - name: Clone
  954. # uses: actions/checkout@v3
  955. #
  956. # - name: Add msbuild to PATH
  957. # uses: microsoft/setup-msbuild@v1
  958. #
  959. # - name: Fetch OpenBLAS
  960. # if: matrix.blas == 'ON'
  961. # run: |
  962. # C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
  963. # 7z x blas.zip -oblas -y
  964. # copy blas/include/cblas.h .
  965. # copy blas/include/openblas_config.h .
  966. # echo "blasdir=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
  967. #
  968. # - name: Configure
  969. # run: >
  970. # cmake -S . -B ./build -A ${{ matrix.arch }}
  971. # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  972. # -DLLAMA_SUPPORT_OPENBLAS=${{ matrix.blas }}
  973. # -DCMAKE_LIBRARY_PATH="$env:blasdir/lib"
  974. #
  975. # - name: Build
  976. # run: |
  977. # cd ./build
  978. # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
  979. #
  980. # - name: Copy libopenblas.dll
  981. # if: matrix.blas == 'ON'
  982. # run: copy "$env:blasdir/bin/libopenblas.dll" build/bin/${{ matrix.build }}
  983. #
  984. # - name: Upload binaries
  985. # if: matrix.blas == 'ON'
  986. # uses: actions/upload-artifact@v1
  987. # with:
  988. # name: llama-blas-bin-${{ matrix.arch }}
  989. # path: build/bin/${{ matrix.build }}
  990. #
  991. # emscripten:
  992. # runs-on: ubuntu-latest
  993. #
  994. # strategy:
  995. # matrix:
  996. # build: [Release]
  997. #
  998. # steps:
  999. # - name: Clone
  1000. # uses: actions/checkout@v3
  1001. #
  1002. # - name: Dependencies
  1003. # run: |
  1004. # wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
  1005. # tar -xvf master.tar.gz
  1006. # emsdk-master/emsdk update
  1007. # emsdk-master/emsdk install latest
  1008. # emsdk-master/emsdk activate latest
  1009. #
  1010. # - name: Configure
  1011. # run: echo "tmp"
  1012. #
  1013. # - name: Build
  1014. # run: |
  1015. # pushd emsdk-master
  1016. # source ./emsdk_env.sh
  1017. # popd
  1018. # emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  1019. # make