Skip to content

Commit 4c136e0

Browse files
CI: Adapt BTDemo build for simulators and fix environments
- Modified `scripts/ci/build-thirdparty-app.sh` to target the `BTDemo` project directly and respect POM versions. - Updated `.github/workflows/maven.yml`: - Default to JDK 11 for all builds. - Install JDK 17 as a secondary JDK (`JAVA17_HOME`) for Android emulator tasks. - Fixed `android-actions/setup-android` package list format. - Updated iOS job to use `macos-15` runner. - Removed bundled sample project (`hellocodenameone`). - Removed obsolete `scripts/ci/README.md`.
1 parent ac3fa1b commit 4c136e0

File tree

8 files changed

+67
-367
lines changed

8 files changed

+67
-367
lines changed

.github/workflows/maven.yml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
1211
runs-on: ubuntu-latest
13-
1412
steps:
1513
- uses: actions/checkout@v2
1614
- name: Set up JDK 11
@@ -23,7 +21,7 @@ jobs:
2321
mkdir -p ~/.codenameone
2422
wget https://github.com/codenameone/CodenameOne/raw/refs/heads/master/maven/CodeNameOneBuildClient.jar -O ~/.codenameone/CodeNameOneBuildClient.jar
2523
- name: Build with Maven
26-
run: mvn install
24+
run: mvn install -DskipTests
2725

2826
android:
2927
runs-on: ubuntu-22.04
@@ -34,6 +32,19 @@ jobs:
3432
with:
3533
distribution: temurin
3634
java-version: '17'
35+
- name: Set JAVA17_HOME
36+
run: echo "JAVA17_HOME=$JAVA_HOME" >> $GITHUB_ENV
37+
- name: Install Java 11
38+
uses: actions/setup-java@v4
39+
with:
40+
distribution: temurin
41+
java-version: '11'
42+
- name: Setup Codename One Build Client
43+
run: |
44+
mkdir -p ~/.codenameone
45+
wget https://github.com/codenameone/CodenameOne/raw/refs/heads/master/maven/CodeNameOneBuildClient.jar -O ~/.codenameone/CodeNameOneBuildClient.jar
46+
- name: Install Libraries (JDK 11)
47+
run: mvn install -DskipTests
3748
- name: Install Android SDK
3849
uses: android-actions/setup-android@v3
3950
with:
@@ -44,35 +55,45 @@ jobs:
4455
sudo apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
4556
sudo usermod -aG kvm $USER
4657
sudo udevadm control --reload-rules && sudo udevadm trigger
47-
- name: Build app with Maven Central artifacts
58+
- name: Build BTDemo (JDK 17)
59+
env:
60+
APP_DIR: BTDemo
61+
JAVA_HOME: ${{ env.JAVA17_HOME }}
4862
run: |
49-
CODENAMEONE_VERSION=LATEST \
5063
./scripts/ci/build-thirdparty-app.sh android
5164
- name: Boot emulator and run smoke test
5265
env:
5366
ANDROID_SDK_ROOT: ${{ env.ANDROID_SDK_ROOT }}
5467
run: |
5568
./scripts/ci/start-android-emulator.sh
56-
adb install -r scripts/ci/.thirdparty-app/app/target/*-android-device.apk
57-
adb shell am start -n com.codename1.hellocodenameone/.HelloCodenameOne
69+
adb install -r BTDemo/target/*-android-device.apk
70+
adb shell am start -n com.codename1.btle/.BTDemoStub
5871
adb logcat -d | tail -n 200
5972
6073
ios:
6174
runs-on: macos-15
6275
steps:
6376
- uses: actions/checkout@v4
64-
- name: Install Java 17
77+
- name: Install Java 11
6578
uses: actions/setup-java@v4
6679
with:
6780
distribution: temurin
68-
java-version: '17'
69-
- name: Build simulator bundle from Maven Central
81+
java-version: '11'
82+
- name: Setup Codename One Build Client
83+
run: |
84+
mkdir -p ~/.codenameone
85+
wget https://github.com/codenameone/CodenameOne/raw/refs/heads/master/maven/CodeNameOneBuildClient.jar -O ~/.codenameone/CodeNameOneBuildClient.jar
86+
- name: Install Libraries (JDK 11)
87+
run: mvn install -DskipTests
88+
- name: Build BTDemo Simulator Bundle
89+
env:
90+
APP_DIR: BTDemo
91+
BUILD_TARGET: ios-sim
7092
run: |
71-
BUILD_TARGET=ios-sim \
7293
./scripts/ci/build-thirdparty-app.sh ios
7394
- name: Boot simulator, install, and launch
7495
env:
75-
APP_BUNDLE: scripts/ci/.thirdparty-app/app/target/ios-sim/HelloCodenameOne.app
76-
BUNDLE_ID: com.codename1.hellocodenameone
96+
APP_BUNDLE: BTDemo/target/ios-sim/BTDemo.app
97+
BUNDLE_ID: com.codename1.btle
7798
run: |
7899
./scripts/ci/run-ios-simulator.sh

scripts/ci/README.md

Lines changed: 0 additions & 195 deletions
This file was deleted.

0 commit comments

Comments
 (0)