Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: macos-26
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- name: 'Install toolchain and dependencies'
Expand All @@ -27,13 +27,31 @@ jobs:
java-version: '25'
distribution: 'temurin'

- uses: Apple-Actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.GLUON_IOS_CERTIFICATES_FILE_BASE64 }}
p12-password: ${{ secrets.GLUON_IOS_CERTIFICATES_PASSWORD }}

- uses: Apple-Actions/download-provisioning-profiles@v4
with:
bundle-id: com.gluonhq.helloworld.HelloMobileApp
issuer-id: ${{ secrets.GLUON_IOS_APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.GLUON_IOS_APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.GLUON_IOS_APPSTORE_PRIVATE_KEY }}

- name: Run build script
run: |
cd app
./script.sh
env:
DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }}
CURRENT_VERSION: ${{ github.run_number }}
ISSUER_ID: ${{ secrets.GLUON_IOS_APPSTORE_ISSUER_ID }}
API_KEY_ID: ${{ secrets.GLUON_IOS_APPSTORE_KEY_ID }}
API_PRIVATE_KEY: ${{ secrets.GLUON_IOS_APPSTORE_PRIVATE_KEY }}

- name: Upload iOS Artifact
- name: Upload iOS IPA
uses: actions/upload-artifact@v4
with:
name: helloMobileApp
path: app/build/Release/Applications
path: app/build/Release/HelloMobileApp.xcarchive
44 changes: 44 additions & 0 deletions .github/workflows/build-openjdk-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build OpenJDK Mobile for macOS

on:
workflow_call:

jobs:
build:
runs-on: macos-14

steps:
- name: 'Install toolchain and dependencies'
run: |
# Run Homebrew installation and xcode-select
brew install autoconf make
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH

- name: Checkout builder repo
uses: actions/checkout@v4

- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'

- name: Patch and build OpenJDK Mobile sources
run: |
git clone https://github.com/openjdk/mobile.git
cd mobile

bash configure \
--with-conf-name=macos-aarch64 \
--with-boot-jdk=$JAVA_HOME \
--disable-warnings-as-errors
make LOG=cmdlines,info CONF=macos-aarch64 jdk-image

- name: Upload macOS JDK
uses: actions/upload-artifact@v4
with:
name: macos-jdk
path: |
mobile/build/macos-aarch64/images/jdk
11 changes: 3 additions & 8 deletions .github/workflows/build-openjdk-sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH

- name: Checkout builder repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK 25
uses: actions/setup-java@v4
Expand All @@ -34,22 +34,17 @@ jobs:
mkdir -p ../support
unzip libffi-ios-sim.zip -d ../support
echo "unzip done"
ls -l ..
ls -l ../support
pwd
echo "$(realpath ../support)"

- name: Clone OpenJDK Mobile sources
run: |
git clone https://github.com/openjdk/mobile.git
cp openjdk-ext/src/hotspot/symbol_keeper.cpp mobile/src/hotspot/os/bsd
cd mobile

# optionally checkout a specific branch or tag
git checkout master
pwd
ls -l .
ls -l ..
ls -l ../../support

bash configure \
--with-conf-name=iossim-aarch64-zero-release \
--disable-warnings-as-errors \
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/build-openjdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH

- name: Checkout builder repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK 25
uses: actions/setup-java@v4
Expand All @@ -34,9 +34,6 @@ jobs:
mkdir -p ../support
unzip libffi-ios.zip -d ../support
echo "unzip done"
ls -l ..
ls -l ../support
pwd
echo "$(realpath ../support)"

- name: Clone OpenJDK Mobile sources
Expand All @@ -46,10 +43,7 @@ jobs:
cd mobile
# optionally checkout a specific branch or tag
git checkout master
pwd
ls -l .
ls -l ..
ls -l ../../support

bash configure \
--with-conf-name=ios-aarch64-zero-release \
--disable-warnings-as-errors \
Expand Down
46 changes: 35 additions & 11 deletions .github/workflows/combine-xcframework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,49 @@ jobs:
build-openjdk-sim:
uses: ./.github/workflows/build-openjdk-sim.yml

build-openjdk-macos:
uses: ./.github/workflows/build-openjdk-macos.yml

combine:
needs: [ build-openjdk, build-openjdk-sim ]
needs: [ build-openjdk, build-openjdk-sim, build-openjdk-macos ]
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download JDK for macOS
uses: actions/download-artifact@v4
with:
name: macos-jdk
path: ./macos-jdk

- name: Download java.base for device
uses: actions/download-artifact@v4
with:
name: java.base-device
path: ./java.base-device/java.base

- name: Create modules jimage for device
run: |
chmod +x ./macos-jdk/bin/jmod
chmod +x ./macos-jdk/bin/jlink

mkdir jmods-device
./macos-jdk/bin/jmod create --class-path ./java.base-device/java.base --target-platform ios-aarch64 jmods-device/java.base.jmod
./macos-jdk/bin/jlink --module-path ./jmods-device --add-modules java.base --output java_bundle-device

- name: Download java.base for simulator
uses: actions/download-artifact@v4
with:
name: java.base-simulator
path: ./java.base-simulator/java.base

- name: Create modules jimage for simulator
run: |
mkdir jmods-simulator
./macos-jdk/bin/jmod create --class-path ./java.base-simulator/java.base --target-platform ios-aarch64 jmods-simulator/java.base.jmod
./macos-jdk/bin/jlink --module-path ./jmods-simulator --add-modules java.base --output java_bundle-simulator

- name: Download and unzip mobile-support
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -56,19 +80,19 @@ jobs:
chmod +x .github/scripts/build-xcframework.sh
.github/scripts/build-xcframework.sh

- name: Compress XCFramework and java.base module
- name: Compress XCFramework and modules jimage
run: |
zip -r OpenJDK.xcframework.zip OpenJDK.xcframework
cd java.base-device
zip -r ../java.base-device.zip java.base
cd ../java.base-simulator
zip -r ../java.base-simulator.zip java.base
zip -r java_bundle-device.zip java_bundle-device
zip -r java_bundle-simulator.zip java_bundle-simulator

- name: Upload XCFramework and java.base module
- name: Upload XCFramework and modules jimage
uses: actions/upload-artifact@v4
with:
name: OpenJDK.xcframework
path: ./OpenJDK.xcframework
path: |
./OpenJDK.xcframework
./java_bundle-device
./java_bundle-simulator

- name: Create snapshot release
uses: softprops/action-gh-release@v2
Expand All @@ -78,5 +102,5 @@ jobs:
prerelease: true
files: |
OpenJDK.xcframework.zip
java.base-device.zip
java.base-simulator.zip
java_bundle-device.zip
java_bundle-simulator.zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ hs_err_pid*
replay_pid*
.idea
app/build
app/sdk
21 changes: 21 additions & 0 deletions app/exportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>teamID</key>
<string>GET_DEVELOPMENT_TEAM</string>
<key>method</key>
<string>app-store-connect</string>
<key>destination</key>
<string>upload</string>
<key>manageAppVersionAndBuildNumber</key>
<true/>
<key>uploadBitcode</key>
<false/>
<key>uploadSymbols</key>
<true/>
<key>compileBitcode</key>
<false/>
<key>signingStyle</key>
<string>automatic</string>
</dict>
</plist>
28 changes: 18 additions & 10 deletions app/project.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: HelloMobileApp
options:
bundleIdPrefix: com.example.helloworld
bundleIdPrefix: com.gluonhq.helloworld
targets:
HelloMobileApp:
type: application
platform: iOS
deploymentTarget: "15.0"
dependencies:
- framework: HelloMobileApp/OpenJDK.xcframework
embed: false
link: true
- sdk: libz.tbd
sources:
- path: HelloMobileApp
Expand All @@ -17,17 +20,22 @@ targets:
type: folder
buildPhase:
resources
info:
path: HelloMobileApp/Info.plist
properties:
UISupportedInterfaceOrientations: [UIInterfaceOrientationPortrait]
UILaunchStoryboardName: LaunchScreen
UIMainStoryboardFile: Main
settings:
base:
OTHER_LDFLAGS: -lc++
DEVELOPMENT_TEAM: GET_DEVELOPMENT_TEAM
GENERATE_INFOPLIST_FILE: Yes
PRODUCT_BUNDLE_IDENTIFIER: com.example.helloworld.HelloMobileApp
ENABLE_TESTABILITY: YES
ENABLE_DEBUG_DYLIB: No
INFOPLIST_FILE: HelloMobileApp/Info.plist
GENERATE_INFOPLIST_FILE: Yes
PRODUCT_NAME: HelloMobileApp
PRODUCT_BUNDLE_IDENTIFIER: com.gluonhq.helloworld.HelloMobileApp
PROVISIONING_PROFILE_SPECIFIER: "HelloMobileApp"
DEVELOPMENT_TEAM: GET_DEVELOPMENT_TEAM
MARKETING_VERSION: '1.0.1'
CURRENT_PROJECT_VERSION: GET_CURRENT_VERSION
configs:
debug:
CODE_SIGN_IDENTITY: iPhone Developer
release:
CODE_SIGN_IDENTITY: Apple Distribution

Loading