Add support of explicit resource management #1421
This file contains 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: Test iOS build | |
on: | |
pull_request: | |
paths: | |
- 'package/ios/**' | |
- 'package/cpp/**' | |
- 'example/package.json' | |
- '.github/workflows/**' | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: macos-12 | |
strategy: | |
matrix: | |
working-directory: [example, fabricexample] | |
concurrency: | |
group: ios-example-${{ matrix.working-directory }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
- name: Install root node dependencies | |
run: yarn | |
- name: Download Skia Binary Artifacts | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: "build-skia.yml" | |
repo: shopify/react-native-skia | |
path: artifacts | |
- name: Copy Artifacts to libs folder | |
run: yarn workflow-copy-libs | |
- name: Copy Skia Headers | |
run: yarn copy-skia-headers | |
- name: Install Package | |
working-directory: package | |
run: yarn install --frozen-lockfile | |
- name: Install app node_modules | |
working-directory: ${{ matrix.working-directory }} | |
run: yarn install --frozen-lockfile | |
- name: Restore Pods from cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ matrix.working-directory }}/ios/Pods | |
~/Library/Caches/CocoaPods | |
~/.cocoapods | |
key: ${{ runner.os }}-pods-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.working-directory)) }} | |
- name: Install Pods | |
working-directory: ${{ matrix.working-directory }}/ios | |
run: pod install | |
- name: Check if Podfile.lock has changed | |
working-directory: ${{ matrix.working-directory }}/ios | |
run: | | |
if git diff --quiet --ignore-all-space -I 'COCOAPODS:' HEAD -- Podfile.lock; then | |
echo "Podfile.lock is up to date." | |
else | |
echo "Podfile.lock has local changes, please update it." | |
git diff Podfile.lock | |
exit 1 | |
fi | |
- name: Restore build artifacts from cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/Library/Developer/Xcode/DerivedData | |
key: ${{ runner.os }}-ios-derived-data-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.working-directory)) }} | |
- name: Build app | |
working-directory: ${{ matrix.working-directory }} | |
run: CI=true yarn ios --simulator 'iPhone 14 Pro' | |
# - name: Run e2e tests | |
# working-directory: package | |
# run: yarn e2e | |
# - name: Start package manager | |
# working-directory: example | |
# run: E2E=true yarn start & | |
# - name: Take screenshot | |
# run: xcrun simctl io booted screenshot screenshot.png | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# path: screenshot.png | |
# name: Download-screenshots |