diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 587afac3a..5045777e7 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -4,7 +4,7 @@ on: jobs: build-android: - runs-on: macos-latest + runs-on: macos-15 steps: - name: Checkout Repo uses: actions/checkout@v4.2.2 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 647e40dff..e2f074826 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -5,7 +5,7 @@ on: jobs: build-iOS: - runs-on: macos-latest + runs-on: macos-15 steps: - name: Checkout Repo uses: actions/checkout@v4.2.2 diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index acec94c3a..3317003ed 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -4,7 +4,7 @@ on: jobs: package: - runs-on: macos-latest + runs-on: macos-15 steps: - name: Checkout Repo uses: actions/checkout@v4.2.2 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 43291c2f1..ead4c1b27 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: uses: ./.github/workflows/package.yml publish: - runs-on: macos-latest + runs-on: macos-15 needs: [package] steps: - name: Setup Node.js diff --git a/.github/workflows/publish_preview.yml b/.github/workflows/publish_preview.yml index e632f7f5c..fb96e64d8 100644 --- a/.github/workflows/publish_preview.yml +++ b/.github/workflows/publish_preview.yml @@ -22,7 +22,7 @@ jobs: uses: ./.github/workflows/package.yml publish: - runs-on: macos-latest + runs-on: macos-15 needs: [package] steps: - name: Setup Node.js diff --git a/.github/workflows/test_android.yml b/.github/workflows/test_android.yml index 44101829e..ee71632dd 100644 --- a/.github/workflows/test_android.yml +++ b/.github/workflows/test_android.yml @@ -5,7 +5,7 @@ on: jobs: build-test-android: - runs-on: macos-latest + runs-on: macos-15 steps: - name: Checkout Repo uses: actions/checkout@v4.2.2 diff --git a/.github/workflows/test_ios.yml b/.github/workflows/test_ios.yml index 1512f7591..38a9123b9 100644 --- a/.github/workflows/test_ios.yml +++ b/.github/workflows/test_ios.yml @@ -5,7 +5,7 @@ on: jobs: build-test-iOS: - runs-on: macos-latest + runs-on: macos-15 steps: - name: Checkout Repo uses: actions/checkout@v4.2.2 diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 7fd954d80..70a833b70 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -4,7 +4,7 @@ on: workflow_call jobs: Build: - runs-on: macos-latest + runs-on: macos-15 steps: - name: Checkout Repo uses: actions/checkout@v4.2.2 diff --git a/Apps/Playground/android/gradle.properties b/Apps/Playground/android/gradle.properties index 2a9e5673c..10e55c7dd 100644 --- a/Apps/Playground/android/gradle.properties +++ b/Apps/Playground/android/gradle.properties @@ -32,7 +32,9 @@ android.jetifier.ignorelist=hermes-android # Use this property to specify which architecture you want to build. # You can also override it from the CLI using # ./gradlew -PreactNativeArchitectures=x86_64 -reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 +# NOTE: the 32-bit x86 ABI is not supported. bgfx's bx requires SSE4.x +# intrinsics, which are above the Android x86 ABI baseline (SSSE3). +reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86_64 # Use this property to enable support to the new architecture. # This will allow you to use TurboModules and the Fabric render in diff --git a/Modules/@babylonjs/react-native/README.md b/Modules/@babylonjs/react-native/README.md index 166e8d4f0..66c9c38df 100644 --- a/Modules/@babylonjs/react-native/README.md +++ b/Modules/@babylonjs/react-native/README.md @@ -74,7 +74,7 @@ Babylon.js minimal version: |BabylonReactNative version | Babylon.js version | BabylonNative commit | | ----------- | ------------------------ | --- | -|2.0.2 | 9.0.0 | ce2edf0851e0c8483559832a4f8eb9d39c6b2f53 +|2.0.2 | 9.0.0 | b9aab7a366a0b0e81e65945449a3dd9960609d78 |2.0.0 | 8.3.0 | 6c25966e8f8c0f3a0c13fdf77064f1bde790391f diff --git a/Modules/@babylonjs/react-native/android/build.gradle b/Modules/@babylonjs/react-native/android/build.gradle index 52894ac97..eceddcac2 100644 --- a/Modules/@babylonjs/react-native/android/build.gradle +++ b/Modules/@babylonjs/react-native/android/build.gradle @@ -39,7 +39,16 @@ apply plugin: 'kotlin-android' def reactNativeArchitectures() { def value = project.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] + def architectures = value ? value.split(",").collect { it.trim() } : ["armeabi-v7a", "x86_64", "arm64-v8a"] + // The 32-bit x86 ABI is not supported: bgfx's bx uses SSE4.x intrinsics + // (_mm_blendv_ps, _mm_round_ps), which are above the Android x86 ABI baseline + // of SSSE3 and fail to compile. Drop it rather than break the whole build for + // consumers still carrying x86 in the React Native default property. + def unsupported = architectures.findAll { it == "x86" } + if (!unsupported.isEmpty()) { + logger.warn("BabylonReactNative: skipping unsupported ABI 'x86' (requires SSE4.x, unavailable on the Android x86 baseline).") + } + return architectures - unsupported } static def findNodeModules(baseDir) { diff --git a/Modules/@babylonjs/react-native/react-native-babylon.podspec b/Modules/@babylonjs/react-native/react-native-babylon.podspec index c1e80889d..8e2ffe593 100644 --- a/Modules/@babylonjs/react-native/react-native-babylon.podspec +++ b/Modules/@babylonjs/react-native/react-native-babylon.podspec @@ -32,7 +32,6 @@ items = ['/shared/BabylonNative/Repo/Polyfills/Canvas', '/_deps/glslang-build/OGLCompilersDLL', '/_deps/glslang-build/SPIRV', '/_deps/urllib-build', - '/_deps/libwebp-build', '/_deps/jsruntimehost-build/Polyfills/XMLHttpRequest', '/_deps/jsruntimehost-build/Polyfills/Scheduling', '/_deps/jsruntimehost-build/Core/JsRuntime', @@ -102,10 +101,7 @@ Pod::Spec.new do |s| 'Window', 'XMLHttpRequest', 'ShaderCache', - 'ShaderCompiler', - 'webp', - 'metal-cpp', - 'sharpyuv'] + 'ShaderCompiler'] if ENV['BABYLON_NATIVE_PLUGIN_NATIVECAMERA'] != '0' libs << 'NativeCamera' diff --git a/Modules/@babylonjs/react-native/shared/BabylonNative/CMakeLists.txt b/Modules/@babylonjs/react-native/shared/BabylonNative/CMakeLists.txt index be49daed7..5e0aa01c2 100644 --- a/Modules/@babylonjs/react-native/shared/BabylonNative/CMakeLists.txt +++ b/Modules/@babylonjs/react-native/shared/BabylonNative/CMakeLists.txt @@ -10,7 +10,6 @@ set(FETCHCONTENT_SOURCE_DIR_CMAKEEXTENSIONS "${CMAKE_CURRENT_SOURCE_DIR}/deps/cm set(FETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST "${CMAKE_CURRENT_SOURCE_DIR}/deps/jsruntimehost-src") set(FETCHCONTENT_SOURCE_DIR_URLLIB "${CMAKE_CURRENT_SOURCE_DIR}/deps/urllib-src") set(FETCHCONTENT_SOURCE_DIR_SPIRV-CROSS "${CMAKE_CURRENT_SOURCE_DIR}/deps/spirv-cross-src") -set(FETCHCONTENT_SOURCE_DIR_LIBWEBP "${CMAKE_CURRENT_SOURCE_DIR}/deps/libwebp-src") set(FETCHCONTENT_SOURCE_DIR_GLSLANG "${CMAKE_CURRENT_SOURCE_DIR}/deps/glslang-src") set(FETCHCONTENT_SOURCE_DIR_BASE-N "${CMAKE_CURRENT_SOURCE_DIR}/deps/base-n-src") set(FETCHCONTENT_SOURCE_DIR_IOS-CMAKE "${CMAKE_CURRENT_SOURCE_DIR}/deps/ios-cmake-src") diff --git a/Modules/@babylonjs/react-native/windows/BabylonReactNative/BabylonReactNative.vcxproj b/Modules/@babylonjs/react-native/windows/BabylonReactNative/BabylonReactNative.vcxproj index 9fdeec3b5..557fab908 100644 --- a/Modules/@babylonjs/react-native/windows/BabylonReactNative/BabylonReactNative.vcxproj +++ b/Modules/@babylonjs/react-native/windows/BabylonReactNative/BabylonReactNative.vcxproj @@ -148,7 +148,6 @@ $(BabylonNativeBuildDir)_deps\jsruntimehost-build\Polyfills\XMLHttpRequest\$(Configuration); $(BabylonNativeBuildDir)_deps\jsruntimehost-build\Core\Foundation\$(Configuration); $(BabylonNativeBuildDir)_deps\urllib-build\$(Configuration); - $(BabylonNativeBuildDir)_deps\libwebp-build\$(Configuration); $(BabylonNativeBuildDir)_deps\bgfx.cmake-build\cmake\bgfx\$(Configuration); $(BabylonNativeBuildDir)_deps\bgfx.cmake-build\cmake\bx\$(Configuration); $(BabylonNativeBuildDir)_deps\bgfx.cmake-build\cmake\bimg\$(Configuration); @@ -207,8 +206,6 @@ SPIRVd.lib; UrlLib.lib; Window.lib; - libwebp.lib; - libsharpyuv.lib; Scheduling.lib; XMLHttpRequest.lib; WindowsApp.lib; @@ -269,8 +266,6 @@ Scheduling.lib; XMLHttpRequest.lib; WindowsApp.lib; - libwebp.lib; - libsharpyuv.lib; %(AdditionalDependencies); %(AdditionalOptions) diff --git a/Package/gulpfile.js b/Package/gulpfile.js index 2d498c74e..178a95281 100644 --- a/Package/gulpfile.js +++ b/Package/gulpfile.js @@ -230,7 +230,7 @@ const createPackage = async () => { exec('npm pack', 'Assembled'); }; -const COMMIT_ID = 'ce2edf0851e0c8483559832a4f8eb9d39c6b2f53'; +const COMMIT_ID = 'a4031689b3c4ec08062f0e044b67970eb2382c9f'; const ZIP_URL = `https://github.com/BabylonJS/BabylonNative/archive/${COMMIT_ID}.zip`; const TARGET_DIR = path.resolve(__dirname, '../Modules/@babylonjs/react-native/shared/BabylonNative'); const ZIP_PATH = path.join(TARGET_DIR, `${COMMIT_ID}.zip`); @@ -380,7 +380,10 @@ const buildBabylonNativeSourceTree = async () => { deleteFolderRecursive(`${UNZIP_FOLDER}/Install`); // dependencies cleanup - deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/3rdparty`, ['renderdoc', 'stb', 'sdf']); + // Keep only the 3rdparty folders that bgfx/src actually includes: + // renderdoc (debug_renderdoc.cpp), metal-cpp (renderer_mtl.h), h264 (video.h), + // plus stb/sdf. + deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/3rdparty`, ['renderdoc', 'stb', 'sdf', 'metal-cpp', 'h264']); deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/examples`,['common']); deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/bindings`); deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/docs`);