Skip to content

Commit

Permalink
Update build-ios.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Feb 23, 2024
1 parent 9c40932 commit 6c88d02
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,61 @@ name: Test iOS build
on:
pull_request:
paths:
- .github/workflows/ios-build.yml
- Example/package.json
- Example/ios/**
- .github/workflows/build-ios.yml
- RNLiveMarkdown.podspec
- ios/**
- example/package.json
- example/ios/**
merge_group:
branches:
- main
push:
branches:
- main
paths:
- .github/workflows/ios-build.yml
- Example/package.json
- Example/ios/**
- .github/workflows/build-ios.yml
- RNLiveMarkdown.podspec
- ios/**
- example/package.json
- example/ios/**

jobs:
build_ios:
runs-on: macos-12
build:
if: github.repository == 'Expensify/react-native-live-markdown'
runs-on: macos-13
strategy:
matrix: {dir: ['example']}
matrix:
working-directory: [example]
fail-fast: false
concurrency:
group: ios-${{ matrix.working-directory }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install app node_modules
working-directory: ${{ matrix.dir }}
run: yarn install --frozen-lockfile
- name: Install node_modules
run: yarn install --immutable

- name: Restore Pods from cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ matrix.dir }}/ios/Pods
${{ matrix.working-directory }}/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ matrix.dir }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.dir)) }}
key: ${{ runner.os }}-pods-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.working-directory)) }}

- name: Install Pods
working-directory: ${{ matrix.dir }}/ios
run: pod install
working-directory: ${{ matrix.working-directory }}/ios
run: bundler install && bundler exec pod install

- name: Restore build artifacts from cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-ios-derived-data-${{ matrix.dir }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.dir)) }}
key: ${{ runner.os }}-ios-derived-data-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.working-directory)) }}

- name: Build app
working-directory: ${{ matrix.dir }}
run: npx react-native run-ios
working-directory: ${{ matrix.working-directory }}
run: npx react-native run-ios --no-packager

0 comments on commit 6c88d02

Please sign in to comment.