fix(ci): isolate SPM and DerivedData to prevent cache corruption
- Remove destructive clean step that causes corruption when dirs are in use - Add -derivedDataPath to isolate CI build from user Xcode cache - Add -clonedSourcePackagesDirPath to isolate SPM clones - Fix Package IPA step to use new isolated derived data path
This commit is contained in:
@@ -54,7 +54,6 @@ jobs:
|
||||
- name: Build app
|
||||
run: |
|
||||
cd tabatago-swift
|
||||
rm -rf ~/Library/Developer/Xcode/DerivedData ~/Library/Caches/org.swift.swiftpm
|
||||
xcodebuild -list
|
||||
xcodebuild build \
|
||||
-project TabataGo.xcodeproj \
|
||||
@@ -62,13 +61,16 @@ jobs:
|
||||
-destination "generic/platform=iOS" \
|
||||
-configuration Debug \
|
||||
-allowProvisioningUpdates \
|
||||
-derivedDataPath ../build/derived \
|
||||
-clonedSourcePackagesDirPath ../build/spm-cache \
|
||||
-skipPackagePluginValidation \
|
||||
CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=2MJF39L8VY SWIFT_ENABLE_EXPLICIT_MODULES=NO
|
||||
|
||||
- name: Package IPA
|
||||
run: |
|
||||
cd tabatago-swift
|
||||
mkdir -p Payload
|
||||
cp -R "$(find build -name '*.app' -type d | head -1)" Payload/
|
||||
cp -R "$(find ../build/derived -name '*.app' -type d | head -1)" Payload/
|
||||
zip -r build/TabataGo.ipa Payload/
|
||||
rm -rf Payload
|
||||
|
||||
|
||||
Reference in New Issue
Block a user