Skip to content

Commit

Permalink
wip: fix CI iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Oct 17, 2024
1 parent 9e6407b commit 5564a5c
Showing 1 changed file with 22 additions and 40 deletions.
62 changes: 22 additions & 40 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,31 @@ on:
branches:
- main
paths:
- '.github/workflows/build-ios.yml'
- 'package/ios/**'
- 'package/*.podspec'
- 'package/example/ios/**'
- ".github/workflows/build-ios.yml"
- "package/ios/**"
- "package/*.podspec"
- "package/example/ios/**"
pull_request:
paths:
- '.github/workflows/build-ios.yml'
- 'package/ios/**'
- 'package/*.podspec'
- 'package/example/ios/**'
- ".github/workflows/build-ios.yml"
- "package/ios/**"
- "package/*.podspec"
- "package/example/ios/**"

jobs:
build:
name: Build iOS Example App
runs-on: macOS-latest
defaults:
run:
working-directory: package/example/ios
working-directory: example/ios
steps:
- uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Restore node_modules from cache
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-with-fps-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-with-fps-yarn-
- name: Install node_modules for example/
run: yarn install --frozen-lockfile --cwd ..
- uses: oven-sh/setup-bun@v2

- name: Install npm dependencies (bun)
run: cd ../../ && bun install

- name: Restore buildcache
uses: mikehardy/buildcache-action@v2
Expand All @@ -49,12 +40,12 @@ jobs:
with:
ruby-version: 2.7.2
bundler-cache: true
working-directory: package/example/ios
working-directory: example/ios

- name: Restore Pods cache
uses: actions/cache@v4
with:
path: package/example/ios/Pods
path: example/ios/Pods
key: ${{ runner.os }}-with-fps-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-with-fps-pods-
Expand All @@ -79,25 +70,16 @@ jobs:
runs-on: macOS-latest
defaults:
run:
working-directory: package/example/ios
working-directory: example/ios
steps:
- uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Restore node_modules from cache
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-without-fps-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-without-fps-yarn-
- name: Install node_modules for example/
run: yarn install --frozen-lockfile --cwd ..
- uses: oven-sh/setup-bun@v2

- name: Install npm dependencies (bun)
run: cd ../../ && bun install
- name: Remove worklets, skia and reanimated
run: yarn remove react-native-worklets-core @shopify/react-native-skia react-native-reanimated --cwd ..
run: cd ../../ && bun remove react-native-worklets-core @shopify/react-native-skia react-native-reanimated --cwd ..

- name: Restore buildcache
uses: mikehardy/buildcache-action@v2
Expand All @@ -113,7 +95,7 @@ jobs:
- name: Restore Pods cache
uses: actions/cache@v4
with:
path: package/example/ios/Pods
path: example/ios/Pods
key: ${{ runner.os }}-without-fps-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-without-fps-pods-
Expand Down

0 comments on commit 5564a5c

Please sign in to comment.