1
0

build.yml 19 KB

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