From d886e285d133401c453d2358f37b97368752a625 Mon Sep 17 00:00:00 2001 From: Edison Jwa Date: Wed, 3 Jun 2026 18:09:07 +0900 Subject: [PATCH] build: add silero-coreml submodule (#19) * build: add silero-coreml as git submodule Replaces sibling-directory local package with in-repo submodule. Updates Xcode relative paths and CI checkout to fetch submodules. * build: add silero-coreml submodule --- .github/workflows/ci.yml | 6 ++++-- .gitmodules | 3 +++ apps/chanora_flutter/ios/Runner.xcodeproj/project.pbxproj | 2 +- apps/chanora_flutter/macos/Runner.xcodeproj/project.pbxproj | 2 +- silero-coreml | 1 + 5 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .gitmodules create mode 160000 silero-coreml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dd2542..1f9df1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,16 +118,18 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: stable + - name: Try to fetch local SileroCoreML package + run: git submodule update --init --depth=1 silero-coreml || true - name: flutter pub get working-directory: apps/chanora_flutter run: flutter pub get - name: Check local SileroCoreML package id: silero-coreml run: | - if [ -d ../silero-coreml ]; then + if [ -f silero-coreml/Package.swift ]; then echo "available=true" >> "$GITHUB_OUTPUT" else - echo "::notice::Skipping iOS build because ../silero-coreml is not available on this runner" + echo "::notice::Skipping iOS build because silero-coreml submodule is not available" echo "available=false" >> "$GITHUB_OUTPUT" fi - name: flutter build ios --no-codesign diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..fd080c9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "silero-coreml"] + path = silero-coreml + url = git@github.com:chanoraapp/silero-coreml.git diff --git a/apps/chanora_flutter/ios/Runner.xcodeproj/project.pbxproj b/apps/chanora_flutter/ios/Runner.xcodeproj/project.pbxproj index 93bcf4a..56513e7 100644 --- a/apps/chanora_flutter/ios/Runner.xcodeproj/project.pbxproj +++ b/apps/chanora_flutter/ios/Runner.xcodeproj/project.pbxproj @@ -758,7 +758,7 @@ /* Begin XCLocalSwiftPackageReference section */ 8C5000022DD0000000000001 /* XCLocalSwiftPackageReference "silero-coreml" */ = { isa = XCLocalSwiftPackageReference; - relativePath = ../../../../silero-coreml; + relativePath = ../../../silero-coreml; }; /* End XCLocalSwiftPackageReference section */ diff --git a/apps/chanora_flutter/macos/Runner.xcodeproj/project.pbxproj b/apps/chanora_flutter/macos/Runner.xcodeproj/project.pbxproj index f76cca2..23801f8 100644 --- a/apps/chanora_flutter/macos/Runner.xcodeproj/project.pbxproj +++ b/apps/chanora_flutter/macos/Runner.xcodeproj/project.pbxproj @@ -863,7 +863,7 @@ /* Begin XCLocalSwiftPackageReference section */ 8C6000022DD0000000000001 /* XCLocalSwiftPackageReference "silero-coreml" */ = { isa = XCLocalSwiftPackageReference; - relativePath = ../../../../silero-coreml; + relativePath = ../../../silero-coreml; }; /* End XCLocalSwiftPackageReference section */ diff --git a/silero-coreml b/silero-coreml new file mode 160000 index 0000000..855c21a --- /dev/null +++ b/silero-coreml @@ -0,0 +1 @@ +Subproject commit 855c21a4b502ced728e77e4ce648dde668ebc176