Skip to content

chore(ci): fix ios builds #132

chore(ci): fix ios builds

chore(ci): fix ios builds #132

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./package
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
uses: ./.github/actions/setup
- name: Lint files
run: yarn lint
- name: Typecheck files
run: yarn typecheck
check-clang:
name: Check clang-format
defaults:
run:
working-directory: ./package
runs-on: ubuntu-latest
strategy:
matrix:
path:
- "package/cpp"
- "package/android/cpp"
- "package/ios"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run clang-format style check
uses: mrousavy/clang-format-action@v1
with:
clang-format-version: "16"
check-path: ${{ matrix.path }}
clang-format-style-path: package/cpp/.clang-format
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./package
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
uses: ./.github/actions/setup
- name: Build package
run: yarn prepack
android-debug:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./package
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
uses: ./.github/actions/setup
# Use java 17:
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "17"
- name: Build Android
run: cd example && npx react-native build-android --mode=debug
android-release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./package
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
uses: ./.github/actions/setup
# Use java 17:
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "17"
- name: Build Android
run: cd example && npx react-native build-android --mode=release
ios-debug:
runs-on: macos-latest
defaults:
run:
working-directory: ./package
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
uses: ./.github/actions/setup
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true
working-directory: ./package/example
- name: Restore Pods cache
uses: actions/cache@v4
with:
path: ./package/example/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Pod install
run: pwd && bundle exec pod install
working-directory: ./package/example/ios
- name: Install xcpretty
run: gem install xcpretty
working-directory: ./package/example
- name: Build iOS
working-directory: ./package/example/ios
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace SkiaSkottieExample.xcworkspace \
-scheme SkiaSkottieExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro Max' \
build \
CODE_SIGNING_ALLOWED=NO | xcpretty"