be more specific about what to build on windows

This commit is contained in:
James Ravenscroft 2023-05-28 15:53:34 +01:00
parent d1469d1dbb
commit a15f08d366

View File

@ -74,16 +74,18 @@ jobs:
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
strategy:
matrix:
include:
- build: 'avx2'
defines: ''
- build: 'avx'
defines: '-DGGML_AVX2=OFF'
- build: 'avx512'
defines: '-DGGML_AVX512=ON -DBUILD_SHARED_LIBS=ON'
- build: 'openblas'
defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
# strategy:
# matrix:
# include:
# - build: 'avx2'
# defines: ''
# - build: 'avx'
# defines: '-DLLAMA_AVX2=OFF'
# - build: 'avx512'
# defines: '-DLLAMA_AVX512=ON'
steps:
@ -94,12 +96,16 @@ jobs:
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -yq libboost-dev
- name: Install OpenBlas
if: ${{ matrix.build == 'openblas' }}
run: sudo apt-get install libopenblas-dev
- name: Build
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
cd ${{github.workspace}}/ggml
cmake -B ${{github.workspace}}/ggml/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D CMAKE_EXE_LINKER_FLAGS="-static"
cmake -B ${{github.workspace}}/ggml/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D CMAKE_EXE_LINKER_FLAGS="-static" ${{ matrix.defines }}
cd ${{github.workspace}}/ggml/build
make codegen codegen-serve codegen-quantize
chmod +x ${{github.workspace}}/ggml/build/bin/codegen
@ -203,7 +209,9 @@ jobs:
mkdir build
cd build
cmake .. ${{ matrix.defines }}
cmake --build . --config Release
cmake --build . --config Release -t codegen
cmake --build . --config Release -t codegen-serve
cmake --build . --config Release -t codegen-quantize
- name: Add libopenblas.dll
id: add_libopenblas_dll