Skip to content

Commit 57d7e0a

Browse files
committed
WIP
1 parent c78df80 commit 57d7e0a

File tree

1 file changed

+82
-2
lines changed

1 file changed

+82
-2
lines changed

.github/workflows/e2e-self-hosted.yml

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,33 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v4
2727

28+
- name: System Information
29+
run: |
30+
echo "=== System Information ==="
31+
echo "macOS Version:"
32+
sw_vers
33+
echo ""
34+
echo "Xcode Version:"
35+
xcodebuild -version
36+
echo ""
37+
echo "Xcode Path:"
38+
xcode-select -p
39+
echo ""
40+
echo "Available Xcode Versions:"
41+
ls -la /Applications/ | grep -i xcode || echo "No Xcode installations found in /Applications/"
42+
echo ""
43+
echo "System Architecture:"
44+
uname -m
45+
echo ""
46+
echo "Available Simulators:"
47+
xcrun simctl list devices available | head -20
48+
echo ""
49+
echo "Disk Space:"
50+
df -h
51+
echo ""
52+
echo "Memory:"
53+
system_profiler SPHardwareDataType | grep "Memory:"
54+
2855
# - name: Setup Xcode
2956
# uses: maxim-lobanov/setup-xcode@v1
3057
# with:
@@ -74,19 +101,72 @@ jobs:
74101
open -a Simulator
75102
sleep 5
76103
104+
- name: Clean build environment
105+
run: |
106+
# Clean any existing build artifacts
107+
rm -rf DerivedData
108+
rm -rf ~/Library/Developer/Xcode/DerivedData
109+
110+
# Clean Swift Package Manager caches
111+
rm -rf ~/Library/Caches/org.swift.swiftpm
112+
rm -rf ~/Library/org.swift.swiftpm
113+
114+
# Reset package caches
115+
xcodebuild -resolvePackageDependencies -workspace Bitkit.xcodeproj/project.xcworkspace -scheme Bitkit
116+
117+
- name: Fix CodeScanner asset catalog issue
118+
run: |
119+
# This is a known issue with CodeScanner on some Xcode versions
120+
# Try to fix the asset catalog compilation issue
121+
echo "Attempting to fix CodeScanner asset catalog issue..."
122+
123+
# Find the CodeScanner package path
124+
CODESCANNER_PATH=$(find DerivedData -name "CodeScanner" -type d | head -1)
125+
if [ -n "$CODESCANNER_PATH" ]; then
126+
echo "Found CodeScanner at: $CODESCANNER_PATH"
127+
# Check if Assets.xcassets exists and is valid
128+
if [ -d "$CODESCANNER_PATH/Sources/CodeScanner/Resources/Assets.xcassets" ]; then
129+
echo "CodeScanner Assets.xcassets found, checking contents..."
130+
ls -la "$CODESCANNER_PATH/Sources/CodeScanner/Resources/Assets.xcassets"
131+
fi
132+
fi
133+
77134
- name: Build iOS app
78135
env:
79136
GITHUB_ACTOR: ${{ github.actor }}
80137
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81138
CHATWOOT_API: ${{ secrets.CHATWOOT_API }}
82139
E2E: true
83140
run: |
84-
xcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace \
141+
# Build with additional flags to handle asset catalog issues
142+
echo "=== Attempting first build ==="
143+
if xcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace \
85144
-scheme Bitkit \
86145
-configuration Debug \
87146
-destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
88147
-derivedDataPath DerivedData \
89-
build
148+
-allowProvisioningUpdates \
149+
-skipPackagePluginValidation \
150+
-disableAutomaticPackageResolution \
151+
build; then
152+
echo "✅ First build succeeded!"
153+
else
154+
echo "❌ First build failed, trying fallback approach..."
155+
156+
# Fallback: Clean everything and try a simpler build
157+
echo "=== Cleaning for fallback build ==="
158+
rm -rf DerivedData
159+
rm -rf ~/Library/Developer/Xcode/DerivedData
160+
161+
echo "=== Attempting fallback build ==="
162+
xcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace \
163+
-scheme Bitkit \
164+
-configuration Debug \
165+
-destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
166+
-derivedDataPath DerivedData \
167+
-allowProvisioningUpdates \
168+
build
169+
fi
90170
91171
- name: Prepare app for E2E tests
92172
run: |

0 commit comments

Comments
 (0)