-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test installation iOS/Linux/MacOS (#1401)
forum: https://forum.babylonjs.com/t/integrate-babylon-native-in-existing-swift-project/35886/28?u=cedric - Because of CMake and Xcode, there are incompatilities with `install` scheme on iOS. So, build needs to be started with the playground, then using `cmake --install` . Also iOS install needs absolute prefix ( https://gitlab.kitware.com/cmake/cmake/-/issues/21282 ) - MacOS install scheme is fine but I could not enable scheme creation on that target. So, it's been enabled for all targets. - `if (TARGET ...` in cmake script test if the target exists. But if the target exists but is not used, it will not be built. This is the case for NativeTracing, disabling its build for iOS otherwise its .a is not found at installation. Why is it not an issue for other build/installs? - disable gtest fetching for ios - disable openXR not other than win32 platforms - `UNIX` is true in cmake scripts for Apple platforms, update checks accordingly - bump iOS deployment target to 15 - bump gradle task version because deprecate - bump Xcode version from 15.3 to 15.4
- Loading branch information
1 parent
dd56a4d
commit c2bf9df
Showing
20 changed files
with
226 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
parameters: | ||
name: '' | ||
vmImage: '' | ||
deploymentTarget: '15' | ||
|
||
jobs: | ||
- job: ${{ parameters.name }} | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
timeoutInMinutes: 40 | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
|
||
steps: | ||
- template: cmake.yml | ||
parameters: | ||
vmImage: ${{ parameters.vmImage }} | ||
|
||
- script: | | ||
sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer | ||
displayName: 'Select Xcode $(XCODE_VERSION)' | ||
- script: | | ||
cmake -G Xcode -B buildiOS -D IOS=ON -D DEPLOYMENT_TARGET=${{ parameters.deploymentTarget }} -D CMAKE_UNITY_BUILD=$(UNITY_BUILD) -D BABYLON_DEBUG_TRACE=ON -D CMAKE_IOS_INSTALL_COMBINED=NO | ||
displayName: 'Generate iOS solution' | ||
- task: Xcode@5 | ||
inputs: | ||
xcWorkspacePath: 'buildiOS/BabylonNative.xcodeproj' | ||
scheme: 'Playground' | ||
sdk: 'iphoneos' | ||
useXcpretty: false | ||
configuration: Release | ||
displayName: 'Build Playground iOS' | ||
|
||
- script: | | ||
cmake --install buildiOS --prefix="$(Build.SourcesDirectory)/Install" | ||
lipo -info $(Build.SourcesDirectory)/Install/lib/libxr.a | ||
displayName: 'Install' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
parameters: | ||
name: '' | ||
vmImage: '' | ||
CC: '' | ||
CXX: '' | ||
JSEngine: '' | ||
|
||
jobs: | ||
- job: ${{ parameters.name }} | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
timeoutInMinutes: 30 | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
|
||
variables: | ||
CC: ${{ parameters.CC }} | ||
CXX: ${{ parameters.CXX }} | ||
|
||
steps: | ||
- template: cmake.yml | ||
parameters: | ||
vmImage: ${{ parameters.vmImage }} | ||
|
||
- script: | | ||
sudo apt-get update | ||
sudo apt-get install libjavascriptcoregtk-4.0-dev libgl1-mesa-dev libcurl4-openssl-dev | ||
displayName: 'Install packages' | ||
- script: | | ||
cmake -G Ninja -B build -D JAVASCRIPTCORE_LIBRARY=/usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so -D NAPI_JAVASCRIPT_ENGINE=${{ parameters.JSEngine }} -D CMAKE_BUILD_TYPE=RelWithDebInfo -D BX_CONFIG_DEBUG=ON -D CMAKE_UNITY_BUILD=$(UNITY_BUILD) -D OpenGL_GL_PREFERENCE=GLVND -D BABYLON_DEBUG_TRACE=ON | ||
ninja -C build | ||
displayName: 'Build X11' | ||
- script: | | ||
cmake --install build --prefix="./install" | ||
displayName: 'Install' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
parameters: | ||
name: '' | ||
vmImage: '' | ||
|
||
jobs: | ||
- job: ${{ parameters.name }} | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
timeoutInMinutes: 30 | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
|
||
steps: | ||
- template: cmake.yml | ||
parameters: | ||
vmImage: ${{ parameters.vmImage }} | ||
|
||
- script: | | ||
sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer | ||
displayName: 'Select XCode $(XCODE_VERSION)' | ||
- script: | | ||
cmake -G Xcode -B buildmacOS -D CMAKE_UNITY_BUILD=$(UNITY_BUILD) -D BABYLON_DEBUG_TRACE=ON | ||
displayName: 'Generate macOS solution' | ||
- script: | | ||
xcodebuild -list -project buildmacOS/BabylonNative.xcodeproj | ||
displayName: 'List available project schemes' | ||
- task: Xcode@5 | ||
inputs: | ||
xcWorkspacePath: 'buildmacOS/BabylonNative.xcodeproj' | ||
scheme: 'install' | ||
sdk: 'macosx' | ||
useXcpretty: false | ||
configuration: Release | ||
displayName: 'Build Installation content macOS' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
parameters: | ||
- name: name | ||
type: string | ||
- name: vmImage | ||
type: string | ||
- name: platform | ||
type: string | ||
- name: napiType | ||
type: string | ||
default: direct | ||
values: | ||
- direct | ||
- jsi | ||
- V8 | ||
- name: graphics_api | ||
type: string | ||
default: D3D11 | ||
|
||
jobs: | ||
- job: ${{ parameters.name }} | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
timeoutInMinutes: 20 | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
variables: | ||
${{ if eq(parameters.napiType, 'jsi') }}: | ||
napiSuffix: '_JSI' | ||
jsEngineDefine: '-DNAPI_JAVASCRIPT_ENGINE=JSI' | ||
${{ elseif eq(parameters.napiType, 'V8') }}: | ||
napiSuffix: '_V8' | ||
jsEngineDefine: '-DNAPI_JAVASCRIPT_ENGINE=V8' | ||
${{ else }}: | ||
napiSuffix: '' | ||
jsEngineDefine: '' | ||
solutionName: 'Win32_${{ parameters.platform }}${{variables.napiSuffix}}' | ||
|
||
steps: | ||
- script: | | ||
# BGFX_CONFIG_MAX_FRAME_BUFFERS is set so enough Framebuffers are available before V8 starts disposing unused ones | ||
cmake -B build${{ variables.solutionName }} -A ${{ parameters.platform }} ${{ variables.jsEngineDefine }} -D BX_CONFIG_DEBUG=ON -D GRAPHICS_API=${{ parameters.graphics_api }} -D CMAKE_UNITY_BUILD=$(UNITY_BUILD) -D BGFX_CONFIG_MAX_FRAME_BUFFERS=256 -D BABYLON_DEBUG_TRACE=ON | ||
displayName: 'Generate ${{ variables.solutionName }} solution' | ||
- task: MSBuild@1 | ||
inputs: | ||
solution: 'build${{ variables.solutionName }}/BabylonNative.sln' | ||
maximumCpuCount: true | ||
configuration: 'RelWithDebInfo' | ||
displayName: 'Build ${{ variables.solutionName }}' | ||
|
||
- script: | | ||
cmake --build build${{ variables.solutionName }} --target INSTALL --config RelWithDebInfo | ||
cd Install/Test | ||
cmake . -DBINARY_DIR=../../build${{ variables.solutionName }} ${{ variables.jsEngineDefine }} | ||
cmake --build . --config RelWithDebInfo | ||
displayName: 'Install' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.