2021-06-27 04:37:54 -06:00
|
|
|
name: Build iOS
|
2021-03-11 08:51:28 -07:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/build-ios.yml'
|
2023-09-01 17:04:36 -06:00
|
|
|
- 'package/cpp/**'
|
|
|
|
- 'package/ios/**'
|
|
|
|
- 'package/*.podspec'
|
|
|
|
- 'package/example/ios/**'
|
2021-03-11 08:51:28 -07:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/build-ios.yml'
|
2023-09-01 17:04:36 -06:00
|
|
|
- 'package/cpp/**'
|
|
|
|
- 'package/ios/**'
|
|
|
|
- 'package/*.podspec'
|
|
|
|
- 'package/example/ios/**'
|
2021-03-11 08:51:28 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build iOS Example App
|
2023-10-18 10:25:30 -06:00
|
|
|
runs-on: macOS-latest
|
2021-03-11 08:51:28 -07:00
|
|
|
defaults:
|
|
|
|
run:
|
2023-09-01 10:15:28 -06:00
|
|
|
working-directory: package/example/ios
|
2021-03-11 08:51:28 -07:00
|
|
|
steps:
|
2023-09-21 11:02:10 -06:00
|
|
|
- uses: actions/checkout@v4
|
2021-03-11 08:51:28 -07:00
|
|
|
|
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
2024-01-31 12:48:10 -07:00
|
|
|
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
2021-03-11 08:51:28 -07:00
|
|
|
- name: Restore node_modules from cache
|
2024-01-31 09:26:21 -07:00
|
|
|
uses: actions/cache@v4
|
2021-03-11 08:51:28 -07:00
|
|
|
id: yarn-cache
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install node_modules for example/
|
|
|
|
run: yarn install --frozen-lockfile --cwd ..
|
|
|
|
|
2021-05-05 07:28:14 -06:00
|
|
|
- name: Restore buildcache
|
2023-09-21 11:13:18 -06:00
|
|
|
uses: mikehardy/buildcache-action@v2
|
2021-06-04 04:32:20 -06:00
|
|
|
continue-on-error: true
|
2021-05-05 07:28:14 -06:00
|
|
|
|
2021-03-11 11:08:51 -07:00
|
|
|
- name: Setup Ruby (bundle)
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
2023-07-20 07:30:04 -06:00
|
|
|
ruby-version: 2.6.10
|
|
|
|
bundler-cache: true
|
2023-12-13 08:38:02 -07:00
|
|
|
working-directory: package/example/ios
|
2023-07-20 07:30:04 -06:00
|
|
|
|
|
|
|
- name: Restore Pods cache
|
2024-02-06 06:32:48 -07:00
|
|
|
uses: actions/cache@v4
|
2023-07-20 07:30:04 -06:00
|
|
|
with:
|
2024-01-31 12:48:05 -07:00
|
|
|
path: package/example/ios/Pods
|
2023-07-20 07:30:04 -06:00
|
|
|
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pods-
|
|
|
|
- name: Install Pods
|
2023-12-13 08:38:02 -07:00
|
|
|
run: bundle exec pod install
|
2023-07-20 07:30:04 -06:00
|
|
|
- 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 VisionCameraExample.xcworkspace \
|
|
|
|
-scheme VisionCameraExample \
|
|
|
|
-sdk iphonesimulator \
|
|
|
|
-configuration Debug \
|
|
|
|
-destination 'platform=iOS Simulator,name=iPhone 11 Pro' \
|
|
|
|
build \
|
|
|
|
CODE_SIGNING_ALLOWED=NO | xcpretty"
|
2023-07-31 09:38:58 -06:00
|
|
|
|
2023-07-20 07:30:04 -06:00
|
|
|
build-no-frame-processors:
|
|
|
|
name: Build iOS Example App without Frame Processors
|
2023-10-18 10:25:30 -06:00
|
|
|
runs-on: macOS-latest
|
2023-07-20 07:30:04 -06:00
|
|
|
defaults:
|
|
|
|
run:
|
2023-09-01 10:15:28 -06:00
|
|
|
working-directory: package/example/ios
|
2023-07-20 07:30:04 -06:00
|
|
|
steps:
|
2023-09-21 11:02:10 -06:00
|
|
|
- uses: actions/checkout@v4
|
2023-07-20 07:30:04 -06:00
|
|
|
|
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
2024-01-31 12:48:10 -07:00
|
|
|
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
2023-07-20 07:30:04 -06:00
|
|
|
- name: Restore node_modules from cache
|
2024-01-31 09:26:21 -07:00
|
|
|
uses: actions/cache@v4
|
2023-07-20 07:30:04 -06:00
|
|
|
id: yarn-cache
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install node_modules for example/
|
|
|
|
run: yarn install --frozen-lockfile --cwd ..
|
2023-08-21 04:50:14 -06:00
|
|
|
- name: Remove react-native-worklets-core
|
|
|
|
run: yarn remove react-native-worklets-core --cwd ..
|
2023-07-20 07:30:04 -06:00
|
|
|
|
|
|
|
- name: Restore buildcache
|
2023-09-21 11:13:18 -06:00
|
|
|
uses: mikehardy/buildcache-action@v2
|
2023-07-20 07:30:04 -06:00
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
- name: Setup Ruby (bundle)
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 2.6.10
|
2021-03-11 11:08:51 -07:00
|
|
|
bundler-cache: true
|
2023-12-13 08:38:02 -07:00
|
|
|
working-directory: package/example/ios
|
2021-03-11 11:08:51 -07:00
|
|
|
|
2021-03-11 08:51:28 -07:00
|
|
|
- name: Restore Pods cache
|
2024-02-06 06:32:48 -07:00
|
|
|
uses: actions/cache@v4
|
2021-03-11 08:51:28 -07:00
|
|
|
with:
|
2024-01-31 12:48:05 -07:00
|
|
|
path: package/example/ios/Pods
|
2021-03-11 08:51:28 -07:00
|
|
|
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pods-
|
|
|
|
- name: Install Pods
|
2023-12-13 08:38:02 -07:00
|
|
|
run: bundle exec pod install
|
2021-06-04 04:32:20 -06:00
|
|
|
- name: Install xcpretty
|
|
|
|
run: gem install xcpretty
|
2021-03-11 08:51:28 -07:00
|
|
|
- name: Build App
|
2021-06-04 04:32:20 -06:00
|
|
|
run: "set -o pipefail && xcodebuild \
|
2021-05-05 07:28:14 -06:00
|
|
|
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
|
2021-06-03 06:31:04 -06:00
|
|
|
-derivedDataPath build -UseModernBuildSystem=YES \
|
2021-03-11 08:51:28 -07:00
|
|
|
-workspace VisionCameraExample.xcworkspace \
|
|
|
|
-scheme VisionCameraExample \
|
2021-03-11 10:27:10 -07:00
|
|
|
-sdk iphonesimulator \
|
2021-03-11 08:51:28 -07:00
|
|
|
-configuration Debug \
|
2021-06-04 04:32:20 -06:00
|
|
|
-destination 'platform=iOS Simulator,name=iPhone 11 Pro' \
|
2021-03-11 10:27:10 -07:00
|
|
|
build \
|
2021-06-04 04:32:20 -06:00
|
|
|
CODE_SIGNING_ALLOWED=NO | xcpretty"
|