Skip to content

Commit

Permalink
Add pod install to turbo module (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon authored Sep 6, 2024
1 parent 4035869 commit 7c4f3d1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,6 @@ jobs:
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi
- name: Cache cocoapods
if: env.turbo_cache_hit != 1
id: cocoapods-cache
uses: actions/cache@v3
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-${{ hashFiles('./apps/paper/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-
- name: Install cocoapods
run: |
cd apps/paper/ios
pod install
env:
NO_FLIPPER: 1

- name: Build example for iOS
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
11 changes: 11 additions & 0 deletions apps/paper/ios/.xcode.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.

# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
1 change: 1 addition & 0 deletions apps/paper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"pod:install": "cd ios && pod install",
"build:android": "cd android && ./gradlew assembleDebug --warning-mode all",
"build:ios": "npm run mkdist && react-native bundle --entry-file index.js --platform ios --dev true --bundle-output dist/main.ios.jsbundle --assets-dest dist && react-native build-ios --scheme WgpuExample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\"",
"mkdist": "node -e \"require('node:fs').mkdirSync('dist', { recursive: true, mode: 0o755 })\""
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"lint": "turbo run lint",
"tsc": "turbo run tsc",
"build:ios": "turbo run build:ios",
"build:android": "turbo run build:android"
"build:android": "turbo run build:android",
"pod:install": "turbo run pod:install"
},
"devDependencies": {
"turbo": "^2.1.0"
Expand Down
6 changes: 6 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
]
},
"build:ios": {
"dependsOn": ["pod:install"],
"outputs": [
"apps/*/ios/build",
"apps/*/ios/Pods"
Expand All @@ -46,6 +47,11 @@
"!apps/*/ios/Pods"
]
},
"pod:install": {
"cache": false,
"inputs": ["**/ios/Podfile", "**/ios/Podfile.lock"],
"outputs": ["**/ios/Pods/**"]
},
"lint": {},
"tsc": {}
}
Expand Down

0 comments on commit 7c4f3d1

Please sign in to comment.