Skip to content

Commit b65c72a

Browse files
Fix CI: Update pipelines for artifact compilation
- Updated `.github/workflows/maven.yml`: - Android: Uses `cn1:build` to generate source, then runs `./gradlew assembleDebug` to build the APK. - iOS: Uses `cn1:build` to generate source, then runs `xcodebuild` to create the `.app` bundle. - Replaced manual emulator script with `reactivecircus/android-emulator-runner@v2` for stability. - Ensures artifacts are correctly located using `find` before testing. - Updated `scripts/ci/build-thirdparty-app.sh`: - Switched to `cn1:build` goal. - Defaults to source generation targets (`android-source`, `ios-source`). - Updated `scripts/ci/run-ios-simulator.sh`: - Improved error reporting for missing app bundles. - Removed obsolete `start-android-emulator.sh`.
1 parent 13e0345 commit b65c72a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/maven.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,22 @@ jobs:
6262
env:
6363
JAVA_HOME: ${{ env.JAVA17_HOME }}
6464
run: |
65-
# Find the generated Gradle project
66-
GRADLE_PROJ=$(find BTDemo/target -name "build.gradle" -exec dirname {} \; | grep "android-source" | head -n 1)
67-
if [[ -z "$GRADLE_PROJ" ]]; then
65+
# Locate the Gradle project root
66+
GRADLE_ROOT=$(find BTDemo/target -name "gradlew" -type f -exec dirname {} \; | head -n 1)
67+
68+
if [[ -z "$GRADLE_ROOT" ]]; then
6869
echo "Error: Gradle project not found in BTDemo/target"
70+
echo "Listing BTDemo/target recursively:"
6971
ls -R BTDemo/target
7072
exit 1
7173
fi
72-
echo "Found Gradle project: $GRADLE_PROJ"
7374
74-
# Build the APK
75-
cd "$GRADLE_PROJ"
75+
echo "Found Gradle project at: $GRADLE_ROOT"
76+
cd "$GRADLE_ROOT"
7677
chmod +x gradlew
7778
./gradlew assembleDebug
7879
79-
# Copy APK to a known location for the runner
80+
# Move artifact to a predictable location
8081
mkdir -p ../../../../build/android
8182
find . -name "*.apk" -exec cp {} ../../../../build/android/app-debug.apk \;
8283
@@ -120,11 +121,14 @@ jobs:
120121
run: |
121122
# Find the generated Xcode project
122123
XCODE_PROJ=$(find BTDemo/target -name "*.xcodeproj" -type d | head -n 1)
124+
123125
if [[ -z "$XCODE_PROJ" ]]; then
124126
echo "Error: Xcode project not found in BTDemo/target"
127+
echo "Listing BTDemo/target recursively:"
125128
ls -R BTDemo/target
126129
exit 1
127130
fi
131+
128132
echo "Found Xcode project: $XCODE_PROJ"
129133
130134
# Build the app for the simulator

0 commit comments

Comments
 (0)