Skip to content

Commit

Permalink
Updates for build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Macoron committed Jun 14, 2023
1 parent 408d325 commit fe690f9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
whisper_cpp_repo_ref:
description: 'Tag, branch or commit'
required: true
default: 'v1.2.1'
default: 'v1.4.2'
jobs:
build-windows:
name: Build for Windows (x86_64)
Expand Down Expand Up @@ -66,11 +66,17 @@ jobs:
apt-get update
apt-get install -y build-essential
apt-get install -y cmake
- name: Change gcc and g++
- run: apt-get install -y gcc-8 g++-8

- name: Run build script
run: |
cd whisper-unity
sh build_cpp_linux.sh ../whisper-cpp/
env:
CC: gcc-8
CXX: g++-8

- name: Upload results
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion build_cpp.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set MY_PATH=%CD%

cd %1
rmdir .\build /s /q
cmake -S . -B ./build -A x64 -DCMAKE_BUILD_TYPE=Release
cmake -S . -B ./build -A x64 -DCMAKE_BUILD_TYPE=Release -DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_EXAMPLES=OFF

cd ./build
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=Release -p:platform=x64
Expand Down
8 changes: 5 additions & 3 deletions build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ build_ios() {
echo "Starting building for ios..."

cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_SYSTEM_NAME=iOS \
"-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \
-DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_IOS_INSTALL_COMBINED=YES ../
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_IOS_INSTALL_COMBINED=YES \
-DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_EXAMPLES=OFF ../
make

echo "Build for ios complete!"
Expand All @@ -51,7 +52,8 @@ build_android() {
clean_build
echo "Starting building for Android..."

cmake -DCMAKE_TOOLCHAIN_FILE="$android_sdk_path" -DANDROID_ABI=arm64-v8a -DBUILD_SHARED_LIBS=OFF ../
cmake -DCMAKE_TOOLCHAIN_FILE="$android_sdk_path" -DANDROID_ABI=arm64-v8a -DBUILD_SHARED_LIBS=OFF \
-DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_EXAMPLES=OFF ../
make

echo "Build for Android complete!"
Expand Down
3 changes: 2 additions & 1 deletion build_cpp_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ build_linux() {
clean_build
echo "Starting building for Linux..."

cmake -DCMAKE_BUILD_TYPE=Release ../
cmake -DCMAKE_BUILD_TYPE=Release \
-DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_EXAMPLES=OFF ../
make

echo "Build for Linux complete!"
Expand Down

0 comments on commit fe690f9

Please sign in to comment.