build.yml 19 KB

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