Skip to content

chore: RN Upgrade

chore: RN Upgrade #122

Workflow file for this run

name: Build iOS
on:
push:
branches:
- main
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- '*.podspec'
- 'example/ios/**'
pull_request:
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- '*.podspec'
- 'example/ios/**'
jobs:
build:
name: Build iOS Example App
runs-on: macOS-latest
defaults:
run:
working-directory: example/ios
steps:
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Enable Corepack
run: corepack enable
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: |
if command -v yarn &> /dev/null; then
CACHE_DIR=$(yarn config get cacheFolder 2>/dev/null || yarn cache dir 2>/dev/null || echo "")
if [ -z "$CACHE_DIR" ]; then
CACHE_DIR="$HOME/.yarn/cache"
fi
else
CACHE_DIR="$HOME/.yarn/cache"
fi
echo "dir=$CACHE_DIR" >> $GITHUB_OUTPUT
- name: Restore node_modules from cache
uses: actions/cache@v5
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
example/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules for example/
run: yarn install --frozen-lockfile
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.0
bundler-cache: true
working-directory: example
- name: Restore Pods cache
uses: actions/cache@v5
with:
path: |
example/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Pods
run: pod install
- name: Install xcpretty
run: gem install xcpretty
- name: Build App
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace BlurhashExample.xcworkspace \
ONLY_ACTIVE_ARCH=NO \
-scheme BlurhashExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 16 Pro' \
build \
CODE_SIGNING_ALLOWED=NO | xcpretty"