Skip to content

Commit 387fae6

Browse files
committed
working on the artifact for ios
1 parent bfbe3b8 commit 387fae6

File tree

1 file changed

+59
-4
lines changed

1 file changed

+59
-4
lines changed

.github/workflows/codeql.yml

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,67 @@ jobs:
156156
matrix:
157157
include:
158158
- language: swift
159-
build-mode: manual
159+
build-mode: autobuild
160+
build-ios:
161+
runs-on: macos-14
162+
env:
163+
TURBO_CACHE_DIR: .turbo/ios
160164
steps:
161-
- name: Checkout repository
162-
uses: actions/checkout@v4
165+
- name: Checkout
166+
uses: actions/checkout@v3
163167

164-
# Add any setup steps before running the `github/codeql-action/init` action.
168+
- name: Setup
169+
uses: ./.github/actions/setup
170+
171+
- name: Cache turborepo for iOS
172+
uses: actions/cache@v3
173+
with:
174+
path: ${{ env.TURBO_CACHE_DIR }}
175+
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
176+
restore-keys: |
177+
${{ runner.os }}-turborepo-ios-
178+
179+
- name: Check turborepo cache for iOS
180+
run: |
181+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
182+
183+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
184+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
185+
fi
186+
187+
- name: Cache cocoapods
188+
if: env.turbo_cache_hit != 1
189+
id: cocoapods-cache
190+
uses: actions/cache@v3
191+
with:
192+
path: |
193+
**/ios/Pods
194+
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
195+
restore-keys: |
196+
${{ runner.os }}-cocoapods-
197+
198+
- name: Install cocoapods
199+
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
200+
run: |
201+
cd example/ios
202+
pod install
203+
env:
204+
NO_FLIPPER: 1
205+
206+
- name: Build example for iOS
207+
run: |
208+
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
209+
echo "${{ env.TURBO_CACHE_DIR }}"
210+
211+
212+
# - name: 'Upload Artifact'
213+
# uses: actions/upload-artifact@v4
214+
# with:
215+
# name: ios-artifact
216+
# path:
217+
218+
219+
# Add any setup steps before running the `github/codeql-action/init` action.
165220
# This includes steps like installing compilers or runtimes (`actions/setup-node`
166221
# or others). This is typically only required for manual builds.
167222
# - name: Setup runtime (example)

0 commit comments

Comments
 (0)