-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package/ci: add Android x86 GLES2, GLES3 and Vulkan builds on CircleCI.
This apparently can test even the GPU! Let's C.
- Loading branch information
Showing
3 changed files
with
246 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/bin/bash | ||
set -ev | ||
|
||
git submodule update --init | ||
|
||
# Corrade | ||
git clone --depth 1 https://github.com/mosra/corrade.git | ||
cd corrade | ||
|
||
# Build native corrade-rc | ||
mkdir build && cd build | ||
cmake .. \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/deps-native \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DWITH_INTERCONNECT=OFF \ | ||
-DWITH_PLUGINMANAGER=OFF \ | ||
-DWITH_TESTSUITE=OFF \ | ||
-DWITH_UTILITY=OFF \ | ||
-G Ninja | ||
ninja install | ||
cd .. | ||
|
||
# Crosscompile Corrade | ||
mkdir build-android-x86 && cd build-android-x86 | ||
cmake .. \ | ||
-DCMAKE_SYSTEM_NAME=Android \ | ||
-DCMAKE_SYSTEM_VERSION=29 \ | ||
-DCMAKE_ANDROID_ARCH_ABI=x86 \ | ||
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \ | ||
-DCMAKE_ANDROID_STL_TYPE=c++_static \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/deps \ | ||
-DWITH_INTERCONNECT=OFF \ | ||
-G Ninja | ||
ninja install | ||
cd .. | ||
|
||
cd .. | ||
|
||
# Generate debug keystore for APK signing | ||
keytool -genkeypair -keystore $HOME/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -validity 10000 -dname CN=,OU=,O=,L=,S=,C= | ||
|
||
# Crosscompile | ||
mkdir build-android-x86 && cd build-android-x86 | ||
cmake .. \ | ||
-DCMAKE_SYSTEM_NAME=Android \ | ||
-DCMAKE_SYSTEM_VERSION=29 \ | ||
-DCMAKE_ANDROID_ARCH_ABI=x86 \ | ||
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \ | ||
-DCMAKE_ANDROID_STL_TYPE=c++_static \ | ||
-DCMAKE_FIND_ROOT_PATH="/opt/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot;$HOME/deps" \ | ||
-DCMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX=/i686-linux-android/29 \ | ||
-DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/deps \ | ||
-DCMAKE_PREFIX_PATH=$HOME/deps \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DTARGET_GLES2=$TARGET_GLES2 \ | ||
-DWITH_AUDIO=OFF \ | ||
-DWITH_VK=OFF \ | ||
-DWITH_ANDROIDAPPLICATION=ON \ | ||
-DWITH_EGLCONTEXT=ON \ | ||
-DWITH_ANYAUDIOIMPORTER=OFF \ | ||
-DWITH_ANYIMAGECONVERTER=ON \ | ||
-DWITH_ANYIMAGEIMPORTER=ON \ | ||
-DWITH_ANYSCENECONVERTER=ON \ | ||
-DWITH_ANYSCENEIMPORTER=ON \ | ||
-DWITH_ANYSHADERCONVERTER=ON \ | ||
-DWITH_MAGNUMFONT=ON \ | ||
-DWITH_MAGNUMFONTCONVERTER=ON \ | ||
-DWITH_OBJIMPORTER=ON \ | ||
-DWITH_TGAIMAGECONVERTER=ON \ | ||
-DWITH_TGAIMPORTER=ON \ | ||
-DWITH_WAVAUDIOIMPORTER=OFF \ | ||
-DWITH_GL_INFO=ON \ | ||
-DBUILD_TESTS=ON \ | ||
-DBUILD_GL_TESTS=ON \ | ||
-G Ninja | ||
ninja $NINJA_JOBS | ||
|
||
# Wait for emulator to start (done in parallel to build) and run tests | ||
circle-android wait-for-boot | ||
CORRADE_TEST_COLOR=ON ctest -V | ||
|
||
# Test install, after running the tests as for them it shouldn't be needed | ||
ninja 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,107 @@ | ||
#!/bin/bash | ||
set -ev | ||
|
||
git submodule update --init | ||
|
||
# Corrade | ||
git clone --depth 1 https://github.com/mosra/corrade.git | ||
cd corrade | ||
|
||
# Build native corrade-rc | ||
mkdir build && cd build | ||
cmake .. \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/deps-native \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DWITH_INTERCONNECT=OFF \ | ||
-DWITH_PLUGINMANAGER=OFF \ | ||
-DWITH_TESTSUITE=OFF \ | ||
-DWITH_UTILITY=OFF \ | ||
-G Ninja | ||
ninja install | ||
cd .. | ||
|
||
# Crosscompile Corrade | ||
mkdir build-android-x86 && cd build-android-x86 | ||
cmake .. \ | ||
-DCMAKE_SYSTEM_NAME=Android \ | ||
-DCMAKE_SYSTEM_VERSION=29 \ | ||
-DCMAKE_ANDROID_ARCH_ABI=x86 \ | ||
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \ | ||
-DCMAKE_ANDROID_STL_TYPE=c++_static \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/deps \ | ||
-DWITH_INTERCONNECT=OFF \ | ||
-G Ninja | ||
ninja install | ||
cd .. | ||
|
||
cd .. | ||
|
||
# Generate debug keystore for APK signing | ||
keytool -genkeypair -keystore $HOME/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -validity 10000 -dname CN=,OU=,O=,L=,S=,C= | ||
|
||
# Crosscompile. Enabling only stuff that's directly affected by Vulkan (which | ||
# means also parts of Platform, which need Trade for icon import in tests), | ||
# disabling everything else. Should be consistent with unix-desktop-vulkan.sh, | ||
# except for features not available on Android like Sdl2 or GlfwApplication. | ||
mkdir build-android-x86 && cd build-android-x86 | ||
cmake .. \ | ||
-DCMAKE_SYSTEM_NAME=Android \ | ||
-DCMAKE_SYSTEM_VERSION=29 \ | ||
-DCMAKE_ANDROID_ARCH_ABI=x86 \ | ||
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \ | ||
-DCMAKE_ANDROID_STL_TYPE=c++_static \ | ||
-DCMAKE_FIND_ROOT_PATH="/opt/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot;$HOME/deps" \ | ||
-DCMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX=/i686-linux-android/29 \ | ||
-DCORRADE_RC_EXECUTABLE=$HOME/deps-native/bin/corrade-rc \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/deps \ | ||
-DCMAKE_PREFIX_PATH=$HOME/deps \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DWITH_AUDIO=OFF \ | ||
`# Needed by VkMeshVkTest, together with TgaImporter and AnyImageImporter` \ | ||
-DWITH_DEBUGTOOLS=ON \ | ||
-DWITH_GL=OFF \ | ||
-DWITH_MESHTOOLS=OFF \ | ||
-DWITH_PRIMITIVES=OFF \ | ||
-DWITH_SCENEGRAPH=OFF \ | ||
-DWITH_SCENETOOLS=OFF \ | ||
-DWITH_SHADERS=OFF \ | ||
-DWITH_TEXT=OFF \ | ||
-DWITH_TEXTURETOOLS=OFF \ | ||
-DWITH_TRADE=ON \ | ||
-DWITH_VK=ON \ | ||
-DWITH_AL_INFO=OFF \ | ||
-DWITH_VK_INFO=ON \ | ||
-DWITH_GL_INFO=OFF \ | ||
-DWITH_ANYAUDIOIMPORTER=OFF \ | ||
-DWITH_ANYIMAGECONVERTER=OFF \ | ||
-DWITH_ANYIMAGEIMPORTER=ON \ | ||
-DWITH_ANYSCENECONVERTER=OFF \ | ||
-DWITH_ANYSCENEIMPORTER=OFF \ | ||
-DWITH_ANYSHADERCONVERTER=OFF \ | ||
-DWITH_MAGNUMFONT=OFF \ | ||
-DWITH_MAGNUMFONTCONVERTER=OFF \ | ||
-DWITH_OBJIMPORTER=OFF \ | ||
-DWITH_TGAIMAGECONVERTER=OFF \ | ||
-DWITH_TGAIMPORTER=ON \ | ||
-DWITH_WAVAUDIOIMPORTER=OFF \ | ||
-DWITH_DISTANCEFIELDCONVERTER=OFF \ | ||
-DWITH_FONTCONVERTER=OFF \ | ||
-DWITH_IMAGECONVERTER=OFF \ | ||
-DWITH_SCENECONVERTER=OFF \ | ||
-DWITH_SHADERCONVERTER=OFF \ | ||
`# TODO: enable back when it can be GL-less` \ | ||
-DWITH_ANDROIDAPPLICATION=OFF \ | ||
-DBUILD_TESTS=ON \ | ||
-DBUILD_GL_TESTS=OFF \ | ||
-DBUILD_VK_TESTS=ON \ | ||
-G Ninja | ||
ninja $NINJA_JOBS | ||
|
||
# Wait for emulator to start (done in parallel to build) and run tests | ||
circle-android wait-for-boot | ||
CORRADE_TEST_COLOR=ON ctest -V | ||
|
||
# Test install, after running the tests as for them it shouldn't be needed | ||
ninja 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