diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 888f29d..1bf97a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -188,6 +188,7 @@ jobs: app/shared/build app/desktop/build/classes app/desktop/build/libs + include-hidden-files: true if-no-files-found: error retention-days: 3 @@ -620,6 +621,9 @@ jobs: if: needs.resolve-version.outputs.should_build == 'true' runs-on: macos-latest timeout-minutes: 120 + env: + GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.vfs.watch=false + ORG_GRADLE_PROJECT_org.gradle.workers.max: "4" steps: - uses: actions/checkout@v5 - uses: ./.github/actions/restore-git-mtimes diff --git a/scripts/package-ios-ipa.sh b/scripts/package-ios-ipa.sh index 1b36853..1da0797 100755 --- a/scripts/package-ios-ipa.sh +++ b/scripts/package-ios-ipa.sh @@ -29,6 +29,41 @@ fi rm -rf "$BUILD_DIR" mkdir -p "$BUILD_DIR" "$OUT_DIR" +# xcodebuild hides Run Script output and starts Gradle without --no-daemon, which often looks +# "stuck" on CI (no log lines for many minutes). Build the KMP framework explicitly first. +echo "Building Kotlin framework for Release / iphoneos…" +PRODUCTS_DIR="$BUILD_DIR/Build/Products/Release-iphoneos" +mkdir -p "$PRODUCTS_DIR" + +export CONFIGURATION=Release +export SDK_NAME="$(xcrun --sdk iphoneos --show-sdk-name)" +export ARCHS=arm64 +export PLATFORM_NAME=iphoneos +export EFFECTIVE_PLATFORM_NAME=-iphoneos +export TARGET_BUILD_DIR="$PRODUCTS_DIR" +export FRAMEWORKS_FOLDER_PATH="iosApp.app/Frameworks" +export CODE_SIGNING_ALLOWED=NO +export CODE_SIGNING_REQUIRED=NO +export EXPANDED_CODE_SIGN_IDENTITY="-" +export OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED=YES + +echo "Using SDK_NAME=$SDK_NAME" + +cd "$ROOT" +./gradlew :app:shared:embedAndSignAppleFrameworkForXcode \ + --no-daemon \ + --console=plain \ + -Dorg.gradle.vfs.watch=false \ + -Djdk.lang.Process.launchMechanism=fork + +FRAMEWORK_DIR="$ROOT/app/shared/build/xcode-frameworks/Release/$SDK_NAME" +if [[ ! -d "$FRAMEWORK_DIR" ]]; then + echo "Kotlin framework missing under $FRAMEWORK_DIR" >&2 + exit 1 +fi +echo "Kotlin framework ready at $FRAMEWORK_DIR" + +echo "Running xcodebuild (Kotlin build phase skipped)…" xcodebuild \ -project "$IOS_PROJECT_DIR/iosApp.xcodeproj" \ -scheme iosApp \ @@ -44,7 +79,8 @@ xcodebuild \ CODE_SIGN_STYLE=Manual \ DEVELOPMENT_TEAM="" \ PROVISIONING_PROFILE_SPECIFIER="" \ - clean build + OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED=YES \ + build APP_BUNDLE_PATH="$(find "$BUILD_DIR/Build/Products/Release-iphoneos" -name '*.app' -type d | head -n 1)" if [[ -z "$APP_BUNDLE_PATH" ]]; then