Skip to content

Commit bd1032d

Browse files
authored
Merge branch 'master' into capdevon-SimpleApplication
2 parents 3557dbe + d963986 commit bd1032d

File tree

125 files changed

+11123
-2300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+11123
-2300
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://jmonkeyengine.org/funding.json
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#! /bin/bash
2+
set -euo pipefail
3+
4+
## Upload a deployment
5+
## from the "org.jmonkeyengine" namespace in Sonatype's OSSRH staging area
6+
## to Sonatype's Central Publisher Portal
7+
## so the deployment can be tested and then published or dropped.
8+
9+
## IMPORTANT: The upload request must originate
10+
## from the IP address used to stage the deployment to the staging area!
11+
12+
# The required -p and -u flags on the command line
13+
# specify the password and username components of a "user token"
14+
# generated using the web interface at https://central.sonatype.com/account
15+
16+
while getopts p:u: flag
17+
do
18+
case "${flag}" in
19+
p) centralPassword=${OPTARG};;
20+
u) centralUsername=${OPTARG};;
21+
esac
22+
done
23+
24+
# Combine both components into a base64 "user token"
25+
# suitable for the Authorization header of a POST request:
26+
27+
token=$(printf %s:%s "${centralUsername}" "${centralPassword}" | base64)
28+
29+
# Send a POST request to upload the deployment:
30+
31+
server='ossrh-staging-api.central.sonatype.com'
32+
endpoint='/manual/upload/defaultRepository/org.jmonkeyengine'
33+
url="https://${server}${endpoint}"
34+
35+
statusCode=$(curl "${url}" \
36+
--no-progress-meter \
37+
--output postData1.txt \
38+
--write-out '%{response_code}' \
39+
--request POST \
40+
--header 'accept: */*' \
41+
--header "Authorization: Bearer ${token}" \
42+
--data '')
43+
44+
echo "Status code = ${statusCode}"
45+
echo 'Received data:'
46+
cat postData1.txt
47+
echo '[EOF]'
48+
49+
# Retry if the default repo isn't found (status=400).
50+
51+
if [ "${statusCode}" == "400" ]; then
52+
echo "Will retry after 30 seconds."
53+
sleep 30
54+
55+
statusCode2=$(curl "${url}" \
56+
--no-progress-meter \
57+
--output postData2.txt \
58+
--write-out '%{response_code}' \
59+
--request POST \
60+
--header 'accept: */*' \
61+
--header "Authorization: Bearer ${token}" \
62+
--data '')
63+
64+
echo "Status code = ${statusCode2}"
65+
echo 'Received data:'
66+
cat postData2.txt
67+
echo '[EOF]'
68+
fi

.github/workflows/main.yml

Lines changed: 135 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
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
@@ -51,6 +51,7 @@ on:
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

.github/workflows/screenshot-test-comment.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
contents: read
2222
steps:
2323
- name: Wait for GitHub to register the workflow run
24-
run: sleep 15
24+
run: sleep 120
2525

2626
- name: Wait for Screenshot Tests to complete
2727
uses: lewagon/[email protected]
@@ -113,5 +113,7 @@ jobs:
113113
**Note;** it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".
114114
115115
See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information
116+
117+
Contact @richardTingle (aka richtea) for guidance if required
116118
edit-mode: replace
117119
comment-id: ${{ steps.existingCommentId.outputs.comment-id }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jMonkeyEngine
44
[![Build Status](https://github.com/jMonkeyEngine/jmonkeyengine/workflows/Build%20jMonkeyEngine/badge.svg)](https://github.com/jMonkeyEngine/jmonkeyengine/actions)
55

66
jMonkeyEngine is a 3-D game engine for adventurous Java developers. It’s open-source, cross-platform, and cutting-edge.
7-
v3.7.0 is the latest stable version of the engine.
7+
v3.8.0 is the latest stable version of the engine.
88

99
The engine is used by several commercial game studios and computer-science courses. Here's a taste:
1010

0 commit comments

Comments
 (0)