Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ jobs:
run: |
CC=gcc-8 make

- name: Test
id: make_test
run: |
CC=gcc-8 make tests
make test

ubuntu-latest-cmake:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -157,6 +163,12 @@ jobs:
run: |
make

- name: Test
id: make_test
run: |
make tests
make test

macOS-latest-cmake:
runs-on: macos-latest

Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ TEST_TARGETS = tests/test-llama-grammar tests/test-grammar-parser tests/test-dou

default: $(BUILD_TARGETS)

test:
@echo "Running tests..."
@for test_target in $(TEST_TARGETS); do \
if [ "$$test_target" = "tests/test-tokenizer-0-llama" ]; then \
./$$test_target $(CURDIR)/models/ggml-vocab-llama.gguf; \
elif [ "$$test_target" = "tests/test-tokenizer-0-falcon" ]; then \
continue; \
elif [ "$$test_target" = "tests/test-tokenizer-1" ]; then \
continue; \
else \
./$$test_target; \
fi; \
done
@echo "All tests have been run."

all: $(BUILD_TARGETS) $(TEST_TARGETS)

ifndef UNAME_S
UNAME_S := $(shell uname -s)
endif
Expand Down