1616# >> Configure MINIO NATIVES SNAPSHOT
1717# OBJECTS_KEY=XXXXXX
1818# >> Configure SONATYPE RELEASE
19- # OSSRH_PASSWORD =XXXXXX
20- # OSSRH_USERNAME =XXXXXX
19+ # CENTRAL_PASSWORD =XXXXXX
20+ # CENTRAL_USERNAME =XXXXXX
2121# >> Configure SIGNING
2222# SIGNING_KEY=XXXXXX
2323# SIGNING_PASSWORD=XXXXXX
5151 - v3.5
5252 - v3.4
5353 - v3.3
54+ - ios-2024_2
5455 pull_request :
5556 release :
5657 types : [published]
@@ -59,62 +60,115 @@ jobs:
5960 ScreenshotTests :
6061 name : Run Screenshot Tests
6162 runs-on : ubuntu-latest
63+ container :
64+ image : ghcr.io/onemillionworlds/opengl-docker-image:v1
6265 permissions :
6366 contents : read
6467 steps :
65- - uses : actions/checkout@v4
66- - name : Set up JDK 17
67- uses : actions/setup-java@v4
68- with :
69- java-version : ' 17'
70- distribution : ' temurin'
71- - name : Install Mesa3D
72- run : |
73- sudo apt-get update
74- sudo apt-get install -y mesa-utils libgl1-mesa-dri libgl1 libglx-mesa0 xvfb
75- - name : Set environment variables for Mesa3D
76- run : |
77- echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV
78- echo "MESA_LOADER_DRIVER_OVERRIDE=llvmpipe" >> $GITHUB_ENV
79- - name : Start xvfb
80- run : |
81- sudo Xvfb :99 -ac -screen 0 1024x768x16 &
82- export DISPLAY=:99
83- echo "DISPLAY=:99" >> $GITHUB_ENV
84- - name : Verify Mesa3D Installation
85- run : |
86- glxinfo | grep "OpenGL"
87- - name : Validate the Gradle wrapper
88- uses : gradle/actions/wrapper-validation@v3
89- - name : Test with Gradle Wrapper
90- run : |
91- ./gradlew :jme3-screenshot-test:screenshotTest
92- - name : Upload Test Reports
93- uses : actions/upload-artifact@master
94- if : always()
95- with :
96- name : screenshot-test-report
97- retention-days : 30
98- path : |
99- **/build/reports/**
100- **/build/changed-images/**
101- **/build/test-results/**
68+ - uses : actions/checkout@v4
69+ - name : Start xvfb
70+ run : |
71+ Xvfb :99 -ac -screen 0 1024x768x16 &
72+ export DISPLAY=:99
73+ echo "DISPLAY=:99" >> $GITHUB_ENV
74+ - name : Report GL/Vulkan
75+ run : |
76+ set -x
77+ echo "DISPLAY=$DISPLAY"
78+ glxinfo | grep -E "OpenGL version|OpenGL renderer|OpenGL vendor" || true
79+ vulkaninfo --summary || true
80+ echo "VK_ICD_FILENAMES=$VK_ICD_FILENAMES"
81+ echo "MESA_LOADER_DRIVER_OVERRIDE=$MESA_LOADER_DRIVER_OVERRIDE"
82+ echo "GALLIUM_DRIVER=$GALLIUM_DRIVER"
83+ - name : Validate the Gradle wrapper
84+ uses : gradle/actions/wrapper-validation@v3
85+ - name : Test with Gradle Wrapper
86+ run : |
87+ ./gradlew :jme3-screenshot-test:screenshotTest
88+ - name : Upload Test Reports
89+ uses : actions/upload-artifact@master
90+ if : always()
91+ with :
92+ name : screenshot-test-report
93+ retention-days : 30
94+ path : |
95+ **/build/reports/**
96+ **/build/changed-images/**
97+ **/build/test-results/**
98+
99+ # Build iOS natives
100+ BuildIosNatives :
101+ name : Build natives for iOS
102+ runs-on : macOS-14
103+
104+ steps :
105+ - name : Check default JAVAs
106+ run : echo $JAVA_HOME --- $JAVA_HOME_8_X64 --- $JAVA_HOME_11_X64 --- $JAVA_HOME_17_X64 --- $JAVA_HOME_21_X64 ---
107+
108+ - name : Setup the java environment
109+ uses : actions/setup-java@v4
110+ with :
111+ distribution : ' temurin'
112+ java-version : ' 11.0.26+4'
113+
114+ - name : Setup the XCode version to 15.1.0
115+ uses : maxim-lobanov/setup-xcode@v1
116+ with :
117+ xcode-version : ' 15.1.0'
118+
119+ - name : Clone the repo
120+ uses : actions/checkout@v4
121+ with :
122+ fetch-depth : 1
123+
124+ - name : Validate the Gradle wrapper
125+ uses : gradle/actions/wrapper-validation@v3
126+
127+ - name : Build
128+ run : |
129+ ./gradlew -PuseCommitHashAsVersionName=true --no-daemon -PbuildNativeProjects=true \
130+ :jme3-ios-native:build
131+
132+ - name : Upload natives
133+ uses : actions/upload-artifact@master
134+ with :
135+ name : ios-natives
136+ path : jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework
137+
102138 # Build the natives on android
103139 BuildAndroidNatives :
104140 name : Build natives for android
105141 runs-on : ubuntu-latest
106142 container :
107- image : jmonkeyengine/buildenv-jme3:android
143+ image : ghcr.io/cirruslabs/android-sdk:36-ndk
108144
109145 steps :
110146 - name : Clone the repo
111147 uses : actions/checkout@v4
112148 with :
113149 fetch-depth : 1
150+
151+ - name : Setup Java 11
152+ uses : actions/setup-java@v4
153+ with :
154+ distribution : temurin
155+ java-version : ' 11'
156+
157+ - name : Check java version
158+ run : java -version
159+
160+ - name : Install CMake
161+ run : |
162+ apt-get update
163+ apt-get install -y cmake
164+ cmake --version
165+
114166 - name : Validate the Gradle wrapper
115167 uses : gradle/actions/wrapper-validation@v3
168+
116169 - name : Build
117170 run : |
171+ export ANDROID_NDK="$ANDROID_SDK_ROOT/ndk/$ANDROID_NDK_VERSION"
118172 ./gradlew -PuseCommitHashAsVersionName=true --no-daemon -PbuildNativeProjects=true \
119173 :jme3-android-native:assemble
120174
@@ -126,7 +180,7 @@ jobs:
126180
127181 # Build the engine, we only deploy from ubuntu-latest jdk21
128182 BuildJMonkey :
129- needs : [BuildAndroidNatives]
183+ needs : [BuildAndroidNatives, BuildIosNatives ]
130184 name : Build on ${{ matrix.osName }} jdk${{ matrix.jdk }}
131185 runs-on : ${{ matrix.os }}
132186 strategy :
@@ -167,6 +221,12 @@ jobs:
167221 name : android-natives
168222 path : build/native
169223
224+ - name : Download natives for iOS
225+ uses : actions/download-artifact@master
226+ with :
227+ name : ios-natives
228+ path : jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework
229+
170230 - name : Validate the Gradle wrapper
171231 uses : gradle/actions/wrapper-validation@v3
172232 - name : Build Engine
@@ -359,16 +419,22 @@ jobs:
359419 name : android-natives
360420 path : build/native
361421
362- - name : Rebuild the maven artifacts and deploy them to the Sonatype repository
422+ - name : Download natives for iOS
423+ uses : actions/download-artifact@master
424+ with :
425+ name : ios-natives
426+ path : jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework
427+
428+ - name : Rebuild the maven artifacts and upload them to Sonatype's maven-snapshots repo
363429 run : |
364- if [ "${{ secrets.OSSRH_PASSWORD }}" = "" ];
430+ if [ "${{ secrets.CENTRAL_PASSWORD }}" = "" ];
365431 then
366- echo "Configure the following secrets to enable deployment to Sonatype:"
367- echo "OSSRH_PASSWORD, OSSRH_USERNAME , SIGNING_KEY, SIGNING_PASSWORD"
432+ echo "Configure the following secrets to enable uploading to Sonatype:"
433+ echo "CENTRAL_PASSWORD, CENTRAL_USERNAME , SIGNING_KEY, SIGNING_PASSWORD"
368434 else
369435 ./gradlew publishMavenPublicationToSNAPSHOTRepository \
370- -PossrhPassword =${{ secrets.OSSRH_PASSWORD }} \
371- -PossrhUsername =${{ secrets.OSSRH_USERNAME }} \
436+ -PcentralPassword =${{ secrets.CENTRAL_PASSWORD }} \
437+ -PcentralUsername =${{ secrets.CENTRAL_USERNAME }} \
372438 -PsigningKey='${{ secrets.SIGNING_KEY }}' \
373439 -PsigningPassword='${{ secrets.SIGNING_PASSWORD }}' \
374440 -PuseCommitHashAsVersionName=true \
@@ -384,13 +450,13 @@ jobs:
384450 if : github.event_name == 'release'
385451 steps :
386452
387- # We need to clone everything again for uploadToMaven .sh ...
453+ # We need to clone everything again for uploadToCentral .sh ...
388454 - name : Clone the repo
389455 uses : actions/checkout@v4
390456 with :
391457 fetch-depth : 1
392458
393- # Setup jdk 21 used for building Sonatype OSSRH artifacts
459+ # Setup jdk 21 used for building Sonatype artifacts
394460 - name : Setup the java environment
395461 uses : actions/setup-java@v4
396462 with :
@@ -416,20 +482,29 @@ jobs:
416482 name : android-natives
417483 path : build/native
418484
419- - name : Rebuild the maven artifacts and deploy them to Sonatype OSSRH
485+ - name : Download natives for iOS
486+ uses : actions/download-artifact@master
487+ with :
488+ name : ios-natives
489+ path : jme3-ios-native/template/META-INF/robovm/ios/libs/jme3-ios-native.xcframework
490+
491+ - name : Rebuild the maven artifacts and upload them to Sonatype's Central Publisher Portal
420492 run : |
421- if [ "${{ secrets.OSSRH_PASSWORD }}" = "" ];
493+ if [ "${{ secrets.CENTRAL_PASSWORD }}" = "" ];
422494 then
423- echo "Configure the following secrets to enable deployment to Sonatype:"
424- echo "OSSRH_PASSWORD, OSSRH_USERNAME , SIGNING_KEY, SIGNING_PASSWORD"
495+ echo "Configure the following secrets to enable uploading to Sonatype:"
496+ echo "CENTRAL_PASSWORD, CENTRAL_USERNAME , SIGNING_KEY, SIGNING_PASSWORD"
425497 else
426- ./gradlew publishMavenPublicationToOSSRHRepository \
427- -PossrhPassword=${{ secrets.OSSRH_PASSWORD }} \
428- -PossrhUsername=${{ secrets.OSSRH_USERNAME }} \
429- -PsigningKey='${{ secrets.SIGNING_KEY }}' \
430- -PsigningPassword='${{ secrets.SIGNING_PASSWORD }}' \
431- -PuseCommitHashAsVersionName=true \
432- --console=plain --stacktrace
498+ ./gradlew publishMavenPublicationToCentralRepository \
499+ -PcentralPassword=${{ secrets.CENTRAL_PASSWORD }} \
500+ -PcentralUsername=${{ secrets.CENTRAL_USERNAME }} \
501+ -PsigningKey='${{ secrets.SIGNING_KEY }}' \
502+ -PsigningPassword='${{ secrets.SIGNING_PASSWORD }}' \
503+ -PuseCommitHashAsVersionName=true \
504+ --console=plain --stacktrace
505+ .github/actions/tools/uploadToCentral.sh \
506+ -p '${{ secrets.CENTRAL_PASSWORD }}' \
507+ -u '${{ secrets.CENTRAL_USERNAME }}'
433508 fi
434509
435510 - name : Deploy to GitHub Releases
0 commit comments