1
0

build.yml 19 KB

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