-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [ci] migrate to matrix strategy for build jobs * [ci] map os to build in matrix
- Loading branch information
1 parent
05816bb
commit 58c0020
Showing
5 changed files
with
145 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Exit the script on any error | ||
set -e | ||
|
||
# Navigate to the root directory of the project | ||
cd "$(dirname "$0")/.." || exit | ||
|
||
# Create distributions folder in the root directory (if not already present) | ||
mkdir -p distributions | ||
mkdir -p distributions/android | ||
|
||
# Build Android App | ||
echo "Building Android App 📱" | ||
./gradlew :sample:composeApp:assembleDebug | ||
./gradlew :sample:composeApp:assembleDebug --console=plain --stacktrace | ||
|
||
# Check if the build was successful | ||
if [ $? -eq 0 ]; then | ||
echo "Android build successful." | ||
|
||
# Verify and copy the APK to the distributions folder | ||
APK_PATH="sample/composeApp/build/outputs/apk/debug/composeApp-debug.apk" | ||
|
||
# Verify and copy the APK to the distributions folder | ||
echo "Verifying Android App" | ||
cp sample/composeApp/build/outputs/apk/debug/composeApp-debug.apk distributions/jetlime-sample-android.apk | ||
if [ -f "$APK_PATH" ]; then | ||
cp "$APK_PATH" distributions/android/jetlime-sample-android.apk | ||
echo "Android APK copied to distributions/android/jetlime-sample-android.apk" | ||
else | ||
echo "APK not found at expected path: $APK_PATH" | ||
exit 1 | ||
fi | ||
else | ||
echo "Android build failed." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Navigate to the root directory of the project | ||
cd "$(dirname "$0")/.." || exit | ||
|
||
# Build iOS app using xcodebuild | ||
xcodebuild build \ | ||
-workspace sample/iosApp/iosApp.xcworkspace \ | ||
-configuration Debug \ | ||
-scheme iosApp \ | ||
-sdk iphonesimulator \ | ||
-verbose | ||
|
||
# Check if the build was successful | ||
if [ $? -eq 0 ]; then | ||
echo "iOS build successful." | ||
|
||
# Create distributions directory if it doesn't exist | ||
mkdir -p distributions/ios | ||
|
||
# Copy the generated iOS build products to the distributions/ directory | ||
BUILD_DIR=$(xcodebuild -workspace sample/iosApp/iosApp.xcworkspace \ | ||
-scheme iosApp -configuration Debug -sdk iphonesimulator -showBuildSettings | grep -m1 " BUILT_PRODUCTS_DIR" | awk '{print $3}') | ||
|
||
if [ -d "$BUILD_DIR" ]; then | ||
cp -R "$BUILD_DIR"/* distributions/ios/ | ||
echo "iOS build copied to distributions/ios/ directory." | ||
else | ||
echo "Build directory not found!" | ||
exit 1 | ||
fi | ||
else | ||
echo "iOS build failed." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Exit the script on any error | ||
set -e | ||
|
||
# Navigate to the root directory of the project | ||
cd "$(dirname "$0")/.." || exit | ||
|
||
# Create distributions folder in the root directory (if not already present) | ||
mkdir -p distributions | ||
mkdir -p distributions/macos | ||
|
||
# Build Mac Desktop App | ||
echo "Building Mac Desktop App 🖥️" | ||
./gradlew :sample:composeApp:packageUberJarForCurrentOS | ||
./gradlew :sample:composeApp:packageUberJarForCurrentOS --console=plain --stacktrace | ||
|
||
# Check if the build was successful | ||
if [ $? -eq 0 ]; then | ||
echo "Mac Desktop build successful." | ||
|
||
# Verify and copy the JAR to the distributions folder | ||
echo "Verifying Mac Desktop App" | ||
cp "sample/composeApp/build/compose/jars/JetLime Samples-macos-arm64-1.0.0.jar" distributions/jetlime-sample-macos-x64.jar | ||
# Verify and copy the JAR to the distributions folder | ||
JAR_PATH="sample/composeApp/build/compose/jars/JetLime Samples-macos-arm64-1.0.0.jar" | ||
|
||
echo "Mac Desktop app build and copied to distributions/jetlime-sample-macos-x64.jar" | ||
if [ -f "$JAR_PATH" ]; then | ||
cp "$JAR_PATH" distributions/macos/jetlime-sample-macos-x64.jar | ||
echo "Mac Desktop app copied to distributions/macos/jetlime-sample-macos-x64.jar" | ||
else | ||
echo "JAR not found at expected path: $JAR_PATH" | ||
exit 1 | ||
fi | ||
else | ||
echo "Mac Desktop build failed." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# Exit the script on any error | ||
set -e | ||
|
||
# Navigate to the root directory of the project | ||
cd "$(dirname "$0")/.." || exit | ||
|
||
# Build Web App | ||
echo "Building Web App 🌎" | ||
./gradlew :sample:composeApp:wasmJsBrowserDistribution | ||
./gradlew :sample:composeApp:wasmJsBrowserDistribution --console=plain --stacktrace | ||
|
||
# Check if the build was successful | ||
if [ $? -eq 0 ]; then | ||
echo "Web build successful." | ||
|
||
# Create the distributions/jetlime-web folder in the root directory | ||
mkdir -p distributions/jetlime-web | ||
# Create the distributions/jetlime-web folder in the root directory | ||
mkdir -p distributions/web | ||
|
||
# Copy the production executable to the distributions folder | ||
cp -r sample/composeApp/build/dist/wasmJs/productionExecutable/ distributions/jetlime-web/ | ||
# Path to the production executable | ||
WEB_EXECUTABLE_PATH="sample/composeApp/build/dist/wasmJs/productionExecutable/" | ||
|
||
echo "Web app build and copied to distributions/jetlime-web" | ||
# Verify and copy the production executable to the distributions folder | ||
if [ -d "$WEB_EXECUTABLE_PATH" ]; then | ||
cp -r "$WEB_EXECUTABLE_PATH" distributions/web/ | ||
echo "Web app copied to distributions/web" | ||
else | ||
echo "Web build output not found at expected path: $WEB_EXECUTABLE_PATH" | ||
exit 1 | ||
fi | ||
else | ||
echo "Web build failed." | ||
exit 1 | ||
fi |