From a15f08d36680095fa9e77b19db0cdb8bcea4638d Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:53:34 +0100 Subject: [PATCH] be more specific about what to build on windows --- .github/workflows/build-commit.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 45be8ff..ac3df52 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -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