File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -975,7 +975,11 @@ jobs:
975975 tag-suffix : " -metal-darwin-arm64-mlx-audio"
976976 build-type : " mps"
977977 - backend : " stablediffusion-ggml"
978- tag-suffix : " -metal-darwin-arm64-mlx-audio"
978+ tag-suffix : " -metal-darwin-arm64-stablediffusion-ggml"
979+ build-type : " metal"
980+ lang : " go"
981+ - backend : " whisper"
982+ tag-suffix : " -metal-darwin-arm64-whisper"
979983 build-type : " metal"
980984 lang : " go"
981985 with :
Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
66add_subdirectory (./sources /whisper.cpp)
77
88add_library (gowhisper MODULE gowhisper.cpp)
9- target_link_libraries (gowhisper PRIVATE whisper ggml stdc++fs)
9+ target_link_libraries (gowhisper PRIVATE whisper ggml)
10+
11+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
12+ target_link_libraries (gosd PRIVATE stdc++fs)
13+ endif ()
1014
1115set_property (TARGET gowhisper PROPERTY CXX_STANDARD 17)
1216set_target_properties (gowhisper PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} )
Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ libgowhisper.so: sources/whisper.cpp CMakeLists.txt gowhisper.cpp gowhisper.h
6868whisper : main.go gowhisper.go libgowhisper.so
6969 CGO_ENABLED=0 $(GOCMD ) build -tags " $( GO_TAGS) " -o whisper ./
7070
71- package :
71+ package : whisper
7272 bash package.sh
7373
74- build : whisper package
74+ build : package
7575
7676clean :
7777 rm -rf libgowhisper.o build whisper
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ CURDIR=$(dirname "$(realpath $0)")
1010# Create lib directory
1111mkdir -p $CURDIR /package/lib
1212
13- cp -avrf $CURDIR /whisper $CURDIR /libgowhisper.so $CURDIR /package/
14- cp -rfv $CURDIR /run.sh $CURDIR /package/
13+ cp -avf $CURDIR /whisper $CURDIR /libgowhisper.so $CURDIR /package/
14+ cp -fv $CURDIR /run.sh $CURDIR /package/
1515
1616# Detect architecture and copy appropriate libraries
1717if [ -f " /lib64/ld-linux-x86-64.so.2" ]; then
@@ -42,6 +42,8 @@ elif [ -f "/lib/ld-linux-aarch64.so.1" ]; then
4242 cp -arfLv /lib/aarch64-linux-gnu/libdl.so.2 $CURDIR /package/lib/libdl.so.2
4343 cp -arfLv /lib/aarch64-linux-gnu/librt.so.1 $CURDIR /package/lib/librt.so.1
4444 cp -arfLv /lib/aarch64-linux-gnu/libpthread.so.0 $CURDIR /package/lib/libpthread.so.0
45+ elif [ $( uname -s) = " Darwin" ]; then
46+ echo " Detected Darwin"
4547else
4648 echo " Error: Could not detect architecture"
4749 exit 1
You can’t perform that action at this time.
0 commit comments