build.yml 20 KB

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