ci: per-app build matrix with precise path triggers #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: iOS example apps build check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| jobs: | |
| detect-changes: | |
| if: github.repository == 'software-mansion/react-native-executorch' && github.event.pull_request.draft != true | |
| runs-on: ubuntu-latest | |
| outputs: | |
| apps: ${{ steps.matrix.outputs.apps }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Detect changed apps | |
| id: filter | |
| if: github.event_name != 'workflow_dispatch' | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| workflow: &workflow | |
| - .github/workflows/build-ios.yml | |
| - .github/actions/build-ios-app/** | |
| shared: &shared | |
| - *workflow | |
| - packages/react-native-executorch/ios/** | |
| - packages/react-native-executorch/scripts/** | |
| - packages/react-native-executorch/third-party/** | |
| - packages/react-native-executorch/package.json | |
| - packages/react-native-executorch/react-native-executorch.podspec | |
| - packages/react-native-executorch/tsconfig.json | |
| - packages/react-native-executorch/common/ada/** | |
| - packages/react-native-executorch/common/runner/** | |
| - packages/react-native-executorch/common/rnexecutorch/Error.h | |
| - packages/react-native-executorch/common/rnexecutorch/ErrorCodes.h | |
| - packages/react-native-executorch/common/rnexecutorch/Log.h | |
| - packages/react-native-executorch/common/rnexecutorch/RnExecutorchInstaller.cpp | |
| - packages/react-native-executorch/common/rnexecutorch/RnExecutorchInstaller.h | |
| - packages/react-native-executorch/common/rnexecutorch/data_processing/** | |
| - packages/react-native-executorch/common/rnexecutorch/host_objects/** | |
| - packages/react-native-executorch/common/rnexecutorch/jsi/** | |
| - packages/react-native-executorch/common/rnexecutorch/metaprogramming/** | |
| - packages/react-native-executorch/common/rnexecutorch/tests/** | |
| - packages/react-native-executorch/common/rnexecutorch/threads/** | |
| - packages/react-native-executorch/common/rnexecutorch/utils/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/BaseModel.cpp | |
| - packages/react-native-executorch/common/rnexecutorch/models/BaseModel.h | |
| - packages/react-native-executorch/src/index.ts | |
| - packages/react-native-executorch/src/common/** | |
| - packages/react-native-executorch/src/constants/** | |
| - packages/react-native-executorch/src/errors/** | |
| - packages/react-native-executorch/src/native/** | |
| - packages/react-native-executorch/src/types/** | |
| - packages/react-native-executorch/src/utils/** | |
| - packages/react-native-executorch/src/modules/BaseModule.ts | |
| - packages/react-native-executorch/src/modules/general/** | |
| - packages/react-native-executorch/src/hooks/general/** | |
| - packages/react-native-executorch/src/hooks/useModule.ts | |
| - packages/react-native-executorch/src/hooks/useModuleFactory.ts | |
| - package.json | |
| - yarn.lock | |
| expo-shared: &expo-shared | |
| - *shared | |
| - packages/expo-resource-fetcher/** | |
| llm-pkg: &llm-pkg | |
| - packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp | |
| - packages/react-native-executorch/common/rnexecutorch/TokenizerModule.h | |
| - packages/react-native-executorch/common/rnexecutorch/models/llm/** | |
| - packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts | |
| - packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts | |
| - packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts | |
| - packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts | |
| - packages/react-native-executorch/src/controllers/LLMController.ts | |
| llm: | |
| - *expo-shared | |
| - *llm-pkg | |
| - apps/llm/** | |
| computer-vision: | |
| - *expo-shared | |
| - packages/react-native-executorch/common/rnexecutorch/models/VisionModel.cpp | |
| - packages/react-native-executorch/common/rnexecutorch/models/VisionModel.h | |
| - packages/react-native-executorch/common/rnexecutorch/models/classification/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/instance_segmentation/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/object_detection/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/ocr/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/semantic_segmentation/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/style_transfer/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/text_to_image/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/vertical_ocr/** | |
| - packages/react-native-executorch/src/modules/computer_vision/** | |
| - packages/react-native-executorch/src/hooks/computer_vision/** | |
| - packages/react-native-executorch/src/controllers/BaseOCRController.ts | |
| - packages/react-native-executorch/src/controllers/OCRController.ts | |
| - packages/react-native-executorch/src/controllers/VerticalOCRController.ts | |
| - apps/computer-vision/** | |
| speech: | |
| - *expo-shared | |
| - packages/react-native-executorch/common/pfft/** | |
| - packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp | |
| - packages/react-native-executorch/common/rnexecutorch/TokenizerModule.h | |
| - packages/react-native-executorch/common/rnexecutorch/models/speech_to_text/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/text_to_speech/** | |
| - packages/react-native-executorch/common/rnexecutorch/models/voice_activity_detection/** | |
| - packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts | |
| - packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts | |
| - packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts | |
| - packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts | |
| - packages/react-native-executorch/src/hooks/natural_language_processing/useSpeechToText.ts | |
| - packages/react-native-executorch/src/hooks/natural_language_processing/useTextToSpeech.ts | |
| - packages/react-native-executorch/src/hooks/natural_language_processing/useVAD.ts | |
| - packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts | |
| - apps/speech/** | |
| text-embeddings: | |
| - *expo-shared | |
| - packages/react-native-executorch/common/rnexecutorch/TokenizerModule.cpp | |
| - packages/react-native-executorch/common/rnexecutorch/TokenizerModule.h | |
| - packages/react-native-executorch/common/rnexecutorch/models/embeddings/** | |
| - packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts | |
| - packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts | |
| - packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts | |
| - packages/react-native-executorch/src/hooks/natural_language_processing/useTextEmbeddings.ts | |
| - packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts | |
| - packages/react-native-executorch/src/hooks/computer_vision/useImageEmbeddings.ts | |
| - apps/text-embeddings/** | |
| bare-rn: | |
| - *shared | |
| - *llm-pkg | |
| - packages/bare-resource-fetcher/** | |
| - apps/bare-rn/** | |
| - name: Compute matrix | |
| id: matrix | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo 'apps=["llm","computer-vision","speech","text-embeddings","bare-rn"]' >> "$GITHUB_OUTPUT" | |
| else | |
| echo "apps=${{ steps.filter.outputs.changes }}" >> "$GITHUB_OUTPUT" | |
| fi | |
| build: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.apps != '[]' && needs.detect-changes.outputs.apps != '' | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| app: ${{ fromJSON(needs.detect-changes.outputs.apps) }} | |
| concurrency: | |
| group: ios-${{ matrix.app }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Build iOS app | |
| uses: ./.github/actions/build-ios-app | |
| with: | |
| app-path: apps/${{ matrix.app }} | |
| expo-prebuild: ${{ matrix.app == 'bare-rn' && 'false' || 'true' }} |