From 0ba030cc2496d6daf556e87e702c7cf47bdfd1d6 Mon Sep 17 00:00:00 2001 From: slaren Date: Sun, 1 Dec 2024 20:38:43 +0100 Subject: [PATCH] wip2 --- .github/workflows/build.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8185644d62619..662b8a5817f618 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,10 @@ jobs: arch: [avx, avx2, avx512, amx] include: - { sys: UCRT64, env: ucrt-x86_64, build: Release } + - { arch: avx, defines: '-DGGML_AVX=ON -DGGML_AVX2=OFF -DGGML_AVX512=OFF -DGGML_AMX_TILE=OFF -DGGML_AMX_INT8=OFF' } + - { arch: avx2, defines: '-DGGML_AVX=ON -DGGML_AVX2=ON -DGGML_AVX512=OFF -DGGML_AMX_TILE=OFF -DGGML_AMX_INT8=OFF' } + - { arch: avx512, defines: '-DGGML_AVX=ON -DGGML_AVX2=ON -DGGML_AVX512=ON -DGGML_AMX_TILE=OFF -DGGML_AMX_INT8=OFF' } + - { arch: amx, defines: '-DGGML_AVX=ON -DGGML_AVX2=ON -DGGML_AVX512=ON -DGGML_AMX_TILE=ON -DGGML_AMX_INT8=ON' } steps: - name: Clone @@ -58,19 +62,10 @@ jobs: mingw-w64-${{matrix.env}}-cmake mingw-w64-${{matrix.env}}-ninja - - name: Configure - shell: msys2 {0} - run: | - cmake -B build -G "Ninja Multi-Config" -DGGML_NATIVE=OFF -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON \ - -DGGML_AVX=${{ matrix.arch == 'avx' && 'ON' || 'OFF' }} \ - -DGGML_AVX2=${{ matrix.arch == 'avx2' && 'ON' || 'OFF' }} \ - -DGGML_AVX512=${{ matrix.arch == 'avx512' && 'ON' || 'OFF' }} \ - -GGML_AMX_TILE=${{ matrix.arch == 'amx' && 'ON' || 'OFF' }} \ - -GGML_AMX_INT8=${{ matrix.arch == 'amx' && 'ON' || 'OFF' }} - - name: Build using CMake shell: msys2 {0} run: | + cmake -B build -G "Ninja Multi-Config" -DGGML_NATIVE=OFF -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON ${{ matrix.defines }} cmake --build build --config ${{ matrix.build }} -t ggml-cpu - name: Rename artifacts @@ -111,11 +106,12 @@ jobs: mingw-w64-${{matrix.env}}-toolchain mingw-w64-${{matrix.env}}-cmake mingw-w64-${{matrix.env}}-ninja + mingw-w64-${{matrix.env}}-curl - name: Build using CMake shell: msys2 {0} run: | - cmake -B build -G "Ninja Multi-Config" -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON + cmake -B build -G "Ninja Multi-Config" -DLLAMA_CURL=ON -DLLAMA_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON cmake --build build --config ${{ matrix.build }} rm build/bin/Release/ggml-cpu.dll @@ -145,6 +141,14 @@ jobs: Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt 7z a llama-${{ steps.tag.outputs.name }}-bin-msys2-cpu-${{ matrix.build }}.zip .\build\bin\Release\* + - name: Upload artifacts + id: upload_artifacts + if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }} + uses: actions/upload-artifact@v4 + with: + path: llama-${{ steps.tag.outputs.name }}-bin-msys2-cpu-${{ matrix.build }}.zip + name: llama-${{ steps.tag.outputs.name }}-bin-msys2-cpu-${{ matrix.build }}.zip + release: if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}