mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
# Summary Due to the large number of example apps in the repository, I decided to change the structure and move all applications into an "apps" folder to maintain a clear structure.
82 lines
2.8 KiB
YAML
82 lines
2.8 KiB
YAML
name: Example iOS check
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/ios-build-test.yml
|
|
- RNSVG.podspec
|
|
- apple/**
|
|
- src/fabric/**
|
|
- package.json
|
|
- apps/example/package.json
|
|
- apps/example/ios/**
|
|
- apps/fabric-example/package.json
|
|
- apps/fabric-example/ios/**
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-14
|
|
strategy:
|
|
matrix:
|
|
working-directory: [example, fabric-example]
|
|
fail-fast: false
|
|
concurrency:
|
|
group: ios-${{ matrix.working-directory }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
steps:
|
|
- name: Checkout Git repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Use latest stable Xcode
|
|
uses: maxim-lobanov/setup-xcode@v1
|
|
with:
|
|
xcode-version: latest-stable
|
|
|
|
- name: Get react-native-svg node_modules cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }}
|
|
restore-keys: ${{ runner.os }}-node-modules-svg-
|
|
|
|
- name: Install react-native-svg node_modules
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Get app node_modules cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: apps/${{ matrix.working-directory }}/node_modules
|
|
key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/yarn.lock', matrix.working-directory)) }}
|
|
restore-keys: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-
|
|
|
|
- name: Install app node_modules
|
|
working-directory: apps/${{ matrix.working-directory }}
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Get Pods cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: apps/${{ matrix.working-directory }}/ios/Pods
|
|
key: ${{ runner.os }}-pods-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/ios/Podfile.lock', matrix.working-directory)) }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pods-${{ matrix.working-directory }}-
|
|
|
|
- name: Install Pods
|
|
working-directory: apps/${{ matrix.working-directory }}/ios
|
|
run: bundle install && bundle exec pod install
|
|
|
|
- name: Get build artifacts cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/Library/Developer/Xcode/DerivedData
|
|
key: ${{ runner.os }}-ios-derived-data-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/ios/Podfile.lock', matrix.working-directory)) }}
|
|
restore-keys: |
|
|
${{ runner.os }}-ios-derived-data-${{ matrix.working-directory }}-
|
|
|
|
- name: Build app
|
|
working-directory: apps/${{ matrix.working-directory }}
|
|
run: npx react-native run-ios --simulator="iPhone 15 Pro" --mode Debug --verbose --no-packager
|