only generate on changes to llm subdirectory
This commit is contained in:
parent
c363282fdc
commit
1e85a140a3
1 changed files with 18 additions and 7 deletions
25
.github/workflows/test.yaml
vendored
25
.github/workflows/test.yaml
vendored
|
@ -23,11 +23,14 @@ jobs:
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
echo GENERATE_CUDA=$(changed llm)
|
echo GENERATE=$(changed llm/)
|
||||||
echo GENERATE_ROCM=$(changed llm)
|
echo GENERATE_CUDA=$(changed llm/)
|
||||||
|
echo GENERATE_ROCM=$(changed llm/)
|
||||||
} >>$GITHUB_OUTPUT
|
} >>$GITHUB_OUTPUT
|
||||||
|
|
||||||
generate:
|
generate:
|
||||||
|
needs: [changes]
|
||||||
|
if: ${{ needs.changes.outputs.GENERATE == 'True' }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-2019]
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
||||||
|
@ -164,7 +167,6 @@ jobs:
|
||||||
if: ${{ startsWith(matrix.os, 'windows-') }}
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||||
- uses: golangci/golangci-lint-action@v3
|
- uses: golangci/golangci-lint-action@v3
|
||||||
test:
|
test:
|
||||||
needs: generate
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-2019]
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
||||||
|
@ -187,10 +189,19 @@ jobs:
|
||||||
go-version: '1.22'
|
go-version: '1.22'
|
||||||
cache: true
|
cache: true
|
||||||
- run: go get
|
- run: go get
|
||||||
- uses: actions/download-artifact@v4
|
- run: |
|
||||||
with:
|
mkdir -p llm/llama.cpp/build/linux/${{ matrix.arch }}/stub/lib/
|
||||||
name: ${{ matrix.os }}-${{ matrix.arch }}-libraries
|
touch llm/llama.cpp/build/linux/${{ matrix.arch }}/stub/lib/stub.so
|
||||||
path: llm/llama.cpp/build
|
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
||||||
|
- run: |
|
||||||
|
mkdir -p llm/llama.cpp/build/darwin/${{ matrix.arch }}/stub/lib/
|
||||||
|
touch llm/llama.cpp/build/darwin/${{ matrix.arch }}/stub/lib/stub.dylib
|
||||||
|
touch llm/llama.cpp/ggml-metal.metal
|
||||||
|
if: ${{ startsWith(matrix.os, 'macos-') }}
|
||||||
|
- run: |
|
||||||
|
mkdir -p llm/llama.cpp/build/windows/${{ matrix.arch }}/stub/lib/
|
||||||
|
touch llm/llama.cpp/build/windows/${{ matrix.arch }}/stub/lib/stub.dll
|
||||||
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||||
- run: go build
|
- run: go build
|
||||||
- run: go test -v ./...
|
- run: go test -v ./...
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
|
|
Loading…
Reference in a new issue