Skip to content

Commit

Permalink
chore: update gitattributes (ollama#8860)
Browse files Browse the repository at this point in the history
* chore: update gitattributes
* chore: add build info source
  • Loading branch information
mxyng authored Feb 6, 2025
1 parent 451c159 commit 5b446cc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 80 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ ml/backend/**/*.cu linguist-vendored
ml/backend/**/*.cuh linguist-vendored
ml/backend/**/*.m linguist-vendored
ml/backend/**/*.metal linguist-vendored
ml/backend/**/CMakeLists.txt linguist-vendored

llama/build-info.cpp linguist-generated
ml/backend/ggml/ggml/src/ggml-metal/ggml-metal-embed.s linguist-generated

* text=auto
*.go text eol=lf
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,5 @@ jobs:
- uses: actions/checkout@v4
- name: Verify patches apply cleanly and do not change files
run: |
make -f Makefile.sync clean checkout sync
make -f Makefile.sync clean sync
git diff --compact-summary --exit-code
6 changes: 5 additions & 1 deletion Makefile.sync
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ help:
@echo " make -f $(lastword $(MAKEFILE_LIST)) clean sync"

.PHONY: sync
sync: llama/llama.cpp ml/backend/ggml/ggml apply-patches
sync: llama/build-info.cpp llama/llama.cpp ml/backend/ggml/ggml apply-patches

.PHONY: llama/build-info.cpp
llama/build-info.cpp: llama/build-info.cpp.in
sed -e 's|@FETCH_HEAD@|$(FETCH_HEAD)|' $< > $@

.PHONY: llama/llama.cpp
llama/llama.cpp: llama/vendor/ apply-patches
Expand Down
2 changes: 1 addition & 1 deletion llama/build-info.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions llama/build-info.cpp.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int LLAMA_BUILD_NUMBER = 0;
char const *LLAMA_COMMIT = "@FETCH_HEAD@";
char const *LLAMA_COMPILER = "";
char const *LLAMA_BUILD_TARGET = "";

This file was deleted.

0 comments on commit 5b446cc

Please sign in to comment.