Skip to content

Commit b9a06c7

Browse files
committed
Update Makefile and GitHub Actions workflow for Windows compatibility
1 parent 7bdf23d commit b9a06c7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ jobs:
5252
with:
5353
submodules: true
5454

55+
- uses: msys2/[email protected]
56+
if: matrix.os == 'windows-latest'
57+
with:
58+
msystem: mingw64
59+
install: >-
60+
mingw-w64-x86_64-cc
61+
make
62+
5563
- name: build sqlite-ai
5664
run: make extension ${{ matrix.make && matrix.make || ''}}
5765

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,14 @@ test: $(TARGET)
140140
$(SQLITE3) ":memory:" -cmd ".bail on" ".load ./dist/ai" "SELECT ai_version();"
141141

142142
# Build submodules
143-
ifneq ($(PLATFORM),windows)
144-
BUILD_OPTIONS = -- -j$(CPUS)
145-
endif
146143
build/llama.cpp.stamp:
147144
cmake -B $(BUILD_LLAMA) -DBUILD_SHARED_LIBS=OFF $(LLAMA_OPTIONS) $(LLAMA_DIR)
148-
cmake --build $(BUILD_LLAMA) --config Release $(BUILD_OPTIONS)
145+
cmake --build $(BUILD_LLAMA) --config Release -- -j$(CPUS)
149146
touch $@
150147

151148
build/whisper.cpp.stamp:
152149
cmake -B $(BUILD_WHISPER) -DBUILD_SHARED_LIBS=OFF $(WHISPER_OPTIONS) $(WHISPER_DIR)
153-
cmake --build $(BUILD_WHISPER) --config Release $(BUILD_OPTIONS)
150+
cmake --build $(BUILD_WHISPER) --config Release -- -j$(CPUS)
154151
touch $@
155152

156153
$(LLAMA_LIBS): build/llama.cpp.stamp

0 commit comments

Comments
 (0)