Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
461ad250
Unverified
Commit
461ad250
authored
Mar 27, 2024
by
Michael Yang
Committed by
GitHub
Mar 27, 2024
Browse files
Merge pull request #3376 from ollama/mxyng/conditional-generate
only generate on changes to llm subdirectory
parents
c363282f
8838ae78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
13 deletions
+36
-13
.github/workflows/test.yaml
.github/workflows/test.yaml
+36
-13
No files found.
.github/workflows/test.yaml
View file @
461ad250
...
...
@@ -23,11 +23,14 @@ jobs:
}
{
echo GENERATE_CUDA=$(changed llm)
echo GENERATE_ROCM=$(changed llm)
echo GENERATE=$(changed llm/)
echo GENERATE_CUDA=$(changed llm/)
echo GENERATE_ROCM=$(changed llm/)
} >>$GITHUB_OUTPUT
generate
:
needs
:
[
changes
]
if
:
${{ needs.changes.outputs.GENERATE == 'True' }}
strategy
:
matrix
:
os
:
[
ubuntu-latest
,
macos-latest
,
windows-2019
]
...
...
@@ -150,21 +153,26 @@ jobs:
go-version
:
'
1.22'
cache
:
false
-
run
:
|
mkdir -p llm/llama.cpp/build/linux/${{ matrix.arch }}/stub/lib/
touch llm/llama.cpp/build/linux/${{ matrix.arch }}/stub/lib/stub.so
case ${{ matrix.arch }} in
amd64) echo ARCH=x86_64 ;;
arm64) echo ARCH=arm64 ;;
esac >>$GITHUB_ENV
shell
:
bash
-
run
:
|
mkdir -p llm/llama.cpp/build/linux/$ARCH/stub/lib/
touch llm/llama.cpp/build/linux/$ARCH/stub/lib/stub.so
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
mkdir -p llm/llama.cpp/build/darwin/$
ARCH
/stub/lib/
touch llm/llama.cpp/build/darwin/$
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
mkdir -p llm/llama.cpp/build/windows/$
ARCH/stub
/stub/lib/
touch llm/llama.cpp/build/windows/$
ARCH/stub
/stub/lib/stub.dll
if
:
${{ startsWith(matrix.os, 'windows-') }}
-
uses
:
golangci/golangci-lint-action@v3
test
:
needs
:
generate
strategy
:
matrix
:
os
:
[
ubuntu-latest
,
macos-latest
,
windows-2019
]
...
...
@@ -187,10 +195,25 @@ jobs:
go-version
:
'
1.22'
cache
:
true
-
run
:
go get
-
uses
:
actions/download-artifact@v4
with
:
name
:
${{ matrix.os }}-${{ matrix.arch }}-libraries
path
:
llm/llama.cpp/build
-
run
:
|
case ${{ matrix.arch }} in
amd64) echo ARCH=x86_64 ;;
arm64) echo ARCH=arm64 ;;
esac >>$GITHUB_ENV
shell
:
bash
-
run
:
|
mkdir -p llm/llama.cpp/build/linux/$ARCH/stub/lib/
touch llm/llama.cpp/build/linux/$ARCH/stub/lib/stub.so
if
:
${{ startsWith(matrix.os, 'ubuntu-') }}
-
run
:
|
mkdir -p llm/llama.cpp/build/darwin/$ARCH/stub/lib/
touch llm/llama.cpp/build/darwin/$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/$ARCH/stub/stub/lib/
touch llm/llama.cpp/build/windows/$ARCH/stub/stub/lib/stub.dll
if
:
${{ startsWith(matrix.os, 'windows-') }}
-
run
:
go build
-
run
:
go test -v ./...
-
uses
:
actions/upload-artifact@v4
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment