build.yml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  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']
  13. pull_request:
  14. types: [opened, synchronize, reopened]
  15. paths: ['**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu']
  16. env:
  17. BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
  18. GGML_NLOOP: 3
  19. GGML_NITER: 1
  20. jobs:
  21. ubuntu-focal-make:
  22. runs-on: ubuntu-20.04
  23. steps:
  24. - name: Clone
  25. id: checkout
  26. uses: actions/checkout@v1
  27. - name: Dependencies
  28. id: depends
  29. run: |
  30. sudo apt-get update
  31. sudo apt-get install build-essential gcc-8
  32. - name: Build
  33. id: make_build
  34. run: |
  35. CC=gcc-8 make
  36. ubuntu-latest-cmake:
  37. runs-on: ubuntu-latest
  38. steps:
  39. - name: Clone
  40. id: checkout
  41. uses: actions/checkout@v1
  42. - name: Dependencies
  43. id: depends
  44. run: |
  45. sudo apt-get update
  46. sudo apt-get install build-essential
  47. - name: Build
  48. id: cmake_build
  49. run: |
  50. mkdir build
  51. cd build
  52. cmake ..
  53. cmake --build . --config Release
  54. - name: Test
  55. id: cmake_test
  56. run: |
  57. cd build
  58. ctest --verbose --timeout 900
  59. ubuntu-latest-cmake-sanitizer:
  60. runs-on: ubuntu-latest
  61. continue-on-error: true
  62. strategy:
  63. matrix:
  64. sanitizer: [ADDRESS, THREAD, UNDEFINED]
  65. build_type: [Debug, Release]
  66. steps:
  67. - name: Clone
  68. id: checkout
  69. uses: actions/checkout@v1
  70. - name: Dependencies
  71. id: depends
  72. run: |
  73. sudo apt-get update
  74. sudo apt-get install build-essential
  75. - name: Build
  76. id: cmake_build
  77. run: |
  78. mkdir build
  79. cd build
  80. cmake .. -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
  81. cmake --build . --config ${{ matrix.build_type }}
  82. - name: Test
  83. id: cmake_test
  84. run: |
  85. cd build
  86. ctest --verbose --timeout 900
  87. macOS-latest-make:
  88. runs-on: macos-latest
  89. steps:
  90. - name: Clone
  91. id: checkout
  92. uses: actions/checkout@v1
  93. - name: Dependencies
  94. id: depends
  95. continue-on-error: true
  96. run: |
  97. brew update
  98. - name: Build
  99. id: make_build
  100. run: |
  101. make
  102. macOS-latest-cmake:
  103. runs-on: macos-latest
  104. steps:
  105. - name: Clone
  106. id: checkout
  107. uses: actions/checkout@v1
  108. - name: Dependencies
  109. id: depends
  110. continue-on-error: true
  111. run: |
  112. brew update
  113. - name: Build
  114. id: cmake_build
  115. run: |
  116. sysctl -a
  117. mkdir build
  118. cd build
  119. cmake -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF ..
  120. cmake --build . --config Release
  121. - name: Test
  122. id: cmake_test
  123. run: |
  124. cd build
  125. ctest --verbose --timeout 900
  126. windows-latest-cmake:
  127. runs-on: windows-latest
  128. env:
  129. OPENBLAS_VERSION: 0.3.23
  130. OPENCL_VERSION: 2023.04.17
  131. CLBLAST_VERSION: 1.6.0
  132. strategy:
  133. matrix:
  134. include:
  135. - build: 'avx2'
  136. defines: '-DLLAMA_BUILD_SERVER=ON'
  137. - build: 'avx'
  138. defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX2=OFF'
  139. - build: 'avx512'
  140. defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON'
  141. - build: 'clblast'
  142. defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"'
  143. - build: 'openblas'
  144. defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
  145. steps:
  146. - name: Clone
  147. id: checkout
  148. uses: actions/checkout@v1
  149. - name: Download OpenCL SDK
  150. id: get_opencl
  151. if: ${{ matrix.build == 'clblast' }}
  152. run: |
  153. 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"
  154. mkdir $env:RUNNER_TEMP/opencl
  155. tar.exe -xvf $env:RUNNER_TEMP/opencl.zip --strip-components=1 -C $env:RUNNER_TEMP/opencl
  156. - name: Download CLBlast
  157. id: get_clblast
  158. if: ${{ matrix.build == 'clblast' }}
  159. run: |
  160. 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"
  161. curl.exe -o $env:RUNNER_TEMP/CLBlast.LICENSE.txt -L "https://github.com/CNugteren/CLBlast/raw/${env:CLBLAST_VERSION}/LICENSE"
  162. 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/clblast.7z
  163. rename-item $env:RUNNER_TEMP/CLBlast-${env:CLBLAST_VERSION}-windows-x64 clblast
  164. foreach ($f in (gci -Recurse -Path "$env:RUNNER_TEMP/clblast" -Filter '*.cmake')) {
  165. $txt = Get-Content -Path $f -Raw
  166. $txt.Replace('C:/vcpkg/packages/opencl_x64-windows/', "$($env:RUNNER_TEMP.Replace('\','/'))/opencl/") | Set-Content -Path $f -Encoding UTF8
  167. }
  168. - name: Download OpenBLAS
  169. id: get_openblas
  170. if: ${{ matrix.build == 'openblas' }}
  171. run: |
  172. 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"
  173. curl.exe -o $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt -L "https://github.com/xianyi/OpenBLAS/raw/v${env:OPENBLAS_VERSION}/LICENSE"
  174. mkdir $env:RUNNER_TEMP/openblas
  175. tar.exe -xvf $env:RUNNER_TEMP/openblas.zip -C $env:RUNNER_TEMP/openblas
  176. $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)
  177. $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim()))
  178. $lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe')
  179. & $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll
  180. - name: Build
  181. id: cmake_build
  182. run: |
  183. mkdir build
  184. cd build
  185. cmake .. ${{ matrix.defines }}
  186. cmake --build . --config Release
  187. - name: Add clblast.dll
  188. id: add_clblast_dll
  189. if: ${{ matrix.build == 'clblast' }}
  190. run: |
  191. cp $env:RUNNER_TEMP/clblast/lib/clblast.dll ./build/bin/Release
  192. cp $env:RUNNER_TEMP/CLBlast.LICENSE.txt ./build/bin/Release/CLBlast-${env:CLBLAST_VERSION}.txt
  193. - name: Add libopenblas.dll
  194. id: add_libopenblas_dll
  195. if: ${{ matrix.build == 'openblas' }}
  196. run: |
  197. cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll
  198. cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt
  199. - name: Check AVX512F support
  200. id: check_avx512f
  201. if: ${{ matrix.build == 'avx512' }}
  202. continue-on-error: true
  203. run: |
  204. cd build
  205. $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)
  206. $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim()))
  207. $cl = $(join-path $msvc 'bin\Hostx64\x64\cl.exe')
  208. echo 'int main(void){unsigned int a[4];__cpuid(a,7);return !(a[1]&65536);}' >> avx512f.c
  209. & $cl /O2 /GS- /kernel avx512f.c /link /nodefaultlib /entry:main
  210. .\avx512f.exe && echo "AVX512F: YES" && ( echo HAS_AVX512F=1 >> $env:GITHUB_ENV ) || echo "AVX512F: NO"
  211. - name: Test
  212. id: cmake_test
  213. if: ${{ matrix.build != 'clblast' && (matrix.build != 'avx512' || env.HAS_AVX512F == '1') }} # Test AVX-512 only when possible
  214. run: |
  215. cd build
  216. ctest -C Release --verbose --timeout 900
  217. - name: Get commit hash
  218. id: commit
  219. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  220. uses: pr-mpt/actions-commit-hash@v2
  221. - name: Pack artifacts
  222. id: pack_artifacts
  223. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  224. run: |
  225. Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt
  226. 7z a llama-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip .\build\bin\Release\*
  227. - name: Upload artifacts
  228. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  229. uses: actions/upload-artifact@v3
  230. with:
  231. path: |
  232. llama-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
  233. windows-latest-cmake-cublas:
  234. runs-on: windows-latest
  235. strategy:
  236. matrix:
  237. cuda: ['12.1.0', '11.7.1']
  238. build: ['cublas']
  239. steps:
  240. - name: Clone
  241. id: checkout
  242. uses: actions/checkout@v1
  243. - uses: Jimver/cuda-toolkit@v0.2.10
  244. id: cuda-toolkit
  245. with:
  246. cuda: ${{ matrix.cuda }}
  247. # TODO(green-sky): _dev seems to fail, and non dev are not enought
  248. #sub-packages: '["nvcc", "cudart", "cublas", "cudart_dev", "cublas_dev"]'
  249. - name: Build
  250. id: cmake_build
  251. run: |
  252. mkdir build
  253. cd build
  254. cmake .. -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUBLAS=ON
  255. cmake --build . --config Release
  256. - name: Get commit hash
  257. id: commit
  258. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  259. uses: pr-mpt/actions-commit-hash@v2
  260. - name: Pack artifacts
  261. id: pack_artifacts
  262. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  263. run: |
  264. 7z a llama-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip .\build\bin\Release\*
  265. - name: Upload artifacts
  266. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  267. uses: actions/upload-artifact@v3
  268. with:
  269. path: |
  270. llama-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip
  271. - name: Copy and pack Cuda runtime
  272. if: ${{ matrix.cuda == '12.1.0' }}
  273. # TODO(green-sky): paths are cuda 12 specific
  274. run: |
  275. echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
  276. mkdir '.\build\bin\cudart\'
  277. cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cudart64_12.dll" '.\build\bin\cudart\'
  278. cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublas64_12.dll" '.\build\bin\cudart\'
  279. cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublasLt64_12.dll" '.\build\bin\cudart\'
  280. 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip .\build\bin\cudart\*
  281. - name: Copy and pack Cuda runtime
  282. if: ${{ matrix.cuda == '11.7.1' }}
  283. # TODO(green-sky): paths are cuda 11 specific
  284. run: |
  285. echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
  286. mkdir '.\build\bin\cudart\'
  287. ls "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin"
  288. cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cudart64_110.dll" '.\build\bin\cudart\'
  289. cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublas64_11.dll" '.\build\bin\cudart\'
  290. cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublasLt64_11.dll" '.\build\bin\cudart\'
  291. 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip .\build\bin\cudart\*
  292. - name: Upload Cuda runtime
  293. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  294. uses: actions/upload-artifact@v3
  295. with:
  296. path: |
  297. cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
  298. release:
  299. if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
  300. runs-on: ubuntu-latest
  301. needs:
  302. - ubuntu-focal-make
  303. - ubuntu-latest-cmake
  304. - macOS-latest-make
  305. - macOS-latest-cmake
  306. - windows-latest-cmake
  307. - windows-latest-cmake-cublas
  308. steps:
  309. - name: Download artifacts
  310. id: download-artifact
  311. uses: actions/download-artifact@v3
  312. - name: Get commit hash
  313. id: commit
  314. uses: pr-mpt/actions-commit-hash@v2
  315. - name: Create release
  316. id: create_release
  317. uses: anzz1/action-create-release@v1
  318. env:
  319. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  320. with:
  321. tag_name: ${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}
  322. - name: Upload release
  323. id: upload_release
  324. uses: actions/github-script@v3
  325. with:
  326. github-token: ${{secrets.GITHUB_TOKEN}}
  327. script: |
  328. const path = require('path');
  329. const fs = require('fs');
  330. const release_id = '${{ steps.create_release.outputs.id }}';
  331. for (let file of await fs.readdirSync('./artifact')) {
  332. if (path.extname(file) === '.zip') {
  333. console.log('uploadReleaseAsset', file);
  334. await github.repos.uploadReleaseAsset({
  335. owner: context.repo.owner,
  336. repo: context.repo.repo,
  337. release_id: release_id,
  338. name: file,
  339. data: await fs.readFileSync(`./artifact/${file}`)
  340. });
  341. }
  342. }
  343. # ubuntu-latest-gcc:
  344. # runs-on: ubuntu-latest
  345. #
  346. # strategy:
  347. # matrix:
  348. # build: [Debug, Release]
  349. #
  350. # steps:
  351. # - name: Clone
  352. # uses: actions/checkout@v1
  353. #
  354. # - name: Dependencies
  355. # run: |
  356. # sudo apt-get update
  357. # sudo apt-get install build-essential
  358. # sudo apt-get install cmake
  359. #
  360. # - name: Configure
  361. # run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  362. #
  363. # - name: Build
  364. # run: |
  365. # make
  366. #
  367. # ubuntu-latest-clang:
  368. # runs-on: ubuntu-latest
  369. #
  370. # strategy:
  371. # matrix:
  372. # build: [Debug, Release]
  373. #
  374. # steps:
  375. # - name: Clone
  376. # uses: actions/checkout@v1
  377. #
  378. # - name: Dependencies
  379. # run: |
  380. # sudo apt-get update
  381. # sudo apt-get install build-essential
  382. # sudo apt-get install cmake
  383. #
  384. # - name: Configure
  385. # run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
  386. #
  387. # - name: Build
  388. # run: |
  389. # make
  390. #
  391. # ubuntu-latest-gcc-sanitized:
  392. # runs-on: ubuntu-latest
  393. #
  394. # strategy:
  395. # matrix:
  396. # sanitizer: [ADDRESS, THREAD, UNDEFINED]
  397. #
  398. # steps:
  399. # - name: Clone
  400. # uses: actions/checkout@v1
  401. #
  402. # - name: Dependencies
  403. # run: |
  404. # sudo apt-get update
  405. # sudo apt-get install build-essential
  406. # sudo apt-get install cmake
  407. #
  408. # - name: Configure
  409. # run: cmake . -DCMAKE_BUILD_TYPE=Debug -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON
  410. #
  411. # - name: Build
  412. # run: |
  413. # make
  414. #
  415. # windows:
  416. # runs-on: windows-latest
  417. #
  418. # strategy:
  419. # matrix:
  420. # build: [Release]
  421. # arch: [Win32, x64]
  422. # include:
  423. # - arch: Win32
  424. # s2arc: x86
  425. # - arch: x64
  426. # s2arc: x64
  427. #
  428. # steps:
  429. # - name: Clone
  430. # uses: actions/checkout@v1
  431. #
  432. # - name: Add msbuild to PATH
  433. # uses: microsoft/setup-msbuild@v1
  434. #
  435. # - name: Configure
  436. # run: >
  437. # cmake -S . -B ./build -A ${{ matrix.arch }}
  438. # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  439. #
  440. # - name: Build
  441. # run: |
  442. # cd ./build
  443. # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
  444. #
  445. # - name: Upload binaries
  446. # uses: actions/upload-artifact@v1
  447. # with:
  448. # name: llama-bin-${{ matrix.arch }}
  449. # path: build/bin/${{ matrix.build }}
  450. #
  451. # windows-blas:
  452. # runs-on: windows-latest
  453. #
  454. # strategy:
  455. # matrix:
  456. # build: [Release]
  457. # arch: [Win32, x64]
  458. # blas: [ON]
  459. # include:
  460. # - arch: Win32
  461. # obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x86.zip
  462. # s2arc: x86
  463. # - arch: x64
  464. # obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip
  465. # s2arc: x64
  466. #
  467. # steps:
  468. # - name: Clone
  469. # uses: actions/checkout@v1
  470. #
  471. # - name: Add msbuild to PATH
  472. # uses: microsoft/setup-msbuild@v1
  473. #
  474. # - name: Fetch OpenBLAS
  475. # if: matrix.blas == 'ON'
  476. # run: |
  477. # C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
  478. # 7z x blas.zip -oblas -y
  479. # copy blas/include/cblas.h .
  480. # copy blas/include/openblas_config.h .
  481. # echo "blasdir=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
  482. #
  483. # - name: Configure
  484. # run: >
  485. # cmake -S . -B ./build -A ${{ matrix.arch }}
  486. # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  487. # -DLLAMA_SUPPORT_OPENBLAS=${{ matrix.blas }}
  488. # -DCMAKE_LIBRARY_PATH="$env:blasdir/lib"
  489. #
  490. # - name: Build
  491. # run: |
  492. # cd ./build
  493. # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
  494. #
  495. # - name: Copy libopenblas.dll
  496. # if: matrix.blas == 'ON'
  497. # run: copy "$env:blasdir/bin/libopenblas.dll" build/bin/${{ matrix.build }}
  498. #
  499. # - name: Upload binaries
  500. # if: matrix.blas == 'ON'
  501. # uses: actions/upload-artifact@v1
  502. # with:
  503. # name: llama-blas-bin-${{ matrix.arch }}
  504. # path: build/bin/${{ matrix.build }}
  505. #
  506. # emscripten:
  507. # runs-on: ubuntu-latest
  508. #
  509. # strategy:
  510. # matrix:
  511. # build: [Release]
  512. #
  513. # steps:
  514. # - name: Clone
  515. # uses: actions/checkout@v1
  516. #
  517. # - name: Dependencies
  518. # run: |
  519. # wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
  520. # tar -xvf master.tar.gz
  521. # emsdk-master/emsdk update
  522. # emsdk-master/emsdk install latest
  523. # emsdk-master/emsdk activate latest
  524. #
  525. # - name: Configure
  526. # run: echo "tmp"
  527. #
  528. # - name: Build
  529. # run: |
  530. # pushd emsdk-master
  531. # source ./emsdk_env.sh
  532. # popd
  533. # emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
  534. # make