Skip to content

Commit a51d7a8

Browse files
committed
debug
1 parent 9f1dfd0 commit a51d7a8

2 files changed

Lines changed: 34 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,42 @@ jobs:
132132
npm ci
133133
npm run build:mobile -- --no-progress
134134
npx cap sync ios
135+
136+
# The cloned packages and their binary artifacts are ~250MB of prebuilt
137+
# xcframeworks. Restore and save are split rather than using actions/cache,
138+
# which only saves when the whole job succeeds - the cache should persist even
139+
# if the build step later fails.
140+
- name: Restore Swift package cache
141+
id: spm-cache
142+
uses: actions/cache/restore@v4
143+
with:
144+
path: IsraelHiking.Web/ios/.spm-cache
145+
key: spm-${{ runner.os }}-${{ hashFiles('IsraelHiking.Web/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
146+
restore-keys: spm-${{ runner.os }}-
147+
148+
# Resolve up front. Left to fastlane, this download happens inside
149+
# xcodebuild -showBuildSettings, whose output fastlane captures - so it is
150+
# invisible and trips the build-settings timeout. Must run after `npm ci`, since
151+
# the plugin packages are path references into node_modules.
152+
- name: Resolve Swift packages
153+
timeout-minutes: 20
154+
run: |
155+
cd IsraelHiking.Web/ios/App
156+
time xcodebuild -resolvePackageDependencies \
157+
-project App.xcodeproj \
158+
-clonedSourcePackagesDirPath ../.spm-cache
159+
du -sh ../.spm-cache ../.spm-cache/artifacts
160+
161+
- name: Save Swift package cache
162+
if: steps.spm-cache.outputs.cache-hit != 'true'
163+
uses: actions/cache/save@v4
164+
with:
165+
path: IsraelHiking.Web/ios/.spm-cache
166+
key: spm-${{ runner.os }}-${{ hashFiles('IsraelHiking.Web/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
167+
135168
- name: Build iOS with signing
136169
if: ${{ github.secret_source == 'Actions' }}
170+
timeout-minutes: 25
137171
run: |
138172
cd IsraelHiking.Web/ios/App
139173
bundle exec fastlane build_ios

IsraelHiking.Web/ios/App/fastlane/Fastfile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@ platform :ios do
2828
# Where CI resolved the packages. Derived from this file's own location rather
2929
# than an env var or lane argument, both of which have silently arrived empty.
3030
spm_cache = options[:spm_cache] || File.expand_path("../../.spm-cache", __dir__)
31-
# TEMPORARY DIAGNOSTIC. The identical command runs in seconds in the workflow's
32-
# resolve step, but hangs when build_app runs it here. The only remaining
33-
# difference is that this point is after setup_ci swapped the default keychain.
34-
# Running it ourselves, streamed, tells us which side the stall is on.
35-
# NB: fastlane's `sh` runs in the fastlane/ directory, so cd to the project first.
36-
sh("cd #{File.expand_path('..', __dir__).shellescape} && date +%T && " \
37-
"xcodebuild -showBuildSettings -scheme App -project App.xcodeproj " \
38-
"-clonedSourcePackagesDirPath #{spm_cache.shellescape} " \
39-
"-disableAutomaticPackageResolution -skipPackageUpdates " \
40-
"-destination 'generic/platform=iOS' > /dev/null; " \
41-
"echo \"exit=$?\"; date +%T")
4231
build_app(
4332
project: "App.xcodeproj",
4433
scheme: "App",

0 commit comments

Comments
 (0)