From 607d7c6bcdcfbb05546d5a5f0f29b856cf1afe57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 14 Feb 2022 22:02:38 +0100 Subject: [PATCH 1/3] [pick-next] package/ci: add Android builds. These don't do anything here, will do only in the ports branch. --- package/ci/android-x86-gles.sh | 114 +++++++++++++++++++++++++++++++++ package/ci/circleci.yml | 42 +++++++++++- 2 files changed, 155 insertions(+), 1 deletion(-) create mode 100755 package/ci/android-x86-gles.sh diff --git a/package/ci/android-x86-gles.sh b/package/ci/android-x86-gles.sh new file mode 100755 index 00000000..170c2c87 --- /dev/null +++ b/package/ci/android-x86-gles.sh @@ -0,0 +1,114 @@ +#!/bin/bash +set -ev + +git clone --depth 1 https://github.com/mosra/corrade.git +cd corrade + +# Build native corrade-rc +mkdir build && cd build || exit /b +cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$HOME/deps-native \ + -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 \ + -DWITH_TESTSUITE=OFF \ + -G Ninja +ninja install +cd ../.. + +# Crosscompile Magnum +git clone --depth 1 https://github.com/mosra/magnum.git +cd magnum +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 \ + -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 \ + -DWITH_AUDIO=OFF \ + -DWITH_DEBUGTOOLS=OFF \ + -DWITH_MESHTOOLS=ON \ + -DWITH_PRIMITIVES=ON \ + -DWITH_SCENEGRAPH=ON \ + -DWITH_SCENETOOLS=OFF \ + -DWITH_SHADERS=ON \ + -DWITH_SHADERTOOLS=OFF \ + -DWITH_TEXT=OFF \ + -DWITH_TEXTURETOOLS=OFF \ + -DWITH_TRADE=ON \ + -DWITH_VK=OFF \ + -DWITH_ANDROIDAPPLICATION=ON \ + -DWITH_ANYIMAGEIMPORTER=ON \ + -DWITH_TGAIMPORTER=ON \ + -DTARGET_GLES2=$TARGET_GLES2 \ + -G Ninja +ninja install +cd ../.. + +# Crosscompile Magnum Integration +git clone --depth 1 https://github.com/mosra/magnum-integration.git +cd magnum-integration +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 \ + -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 \ + -G Ninja +ninja install +cd ../.. + +# Crosscompile Magnum Extras +git clone --depth 1 https://github.com/mosra/magnum-extras.git +cd magnum-extras +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 \ + -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 \ + -G Ninja +ninja install +cd ../.. + +# So Gradle can find our stuff, hopefully the Android binaries first +export CMAKE_PREFIX_PATH="$HOME/deps/;$HOME/deps-native/" diff --git a/package/ci/circleci.yml b/package/ci/circleci.yml index b2b1d79c..49142f97 100644 --- a/package/ci/circleci.yml +++ b/package/ci/circleci.yml @@ -24,6 +24,9 @@ executors: # https://github.com/mosra/magnum/issues/413, # https://github.com/emscripten-core/emscripten/pull/10161 - image: emscripten/emsdk:1.39.6-upstream + android-29: + machine: + image: android:202102-01 commands: install-base-linux: @@ -53,6 +56,19 @@ commands: command: | HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake ninja << parameters.extra >> + install-base-android: + parameters: + extra: + type: string + default: "" + steps: + - run: + name: Update apt and install base packages + # Compared to Docker images this needs sudo + command: | + sudo apt update + sudo apt install -y ninja-build << parameters.extra >> + install-gcc-4_8: steps: - run: @@ -209,10 +225,32 @@ jobs: - build: script: emscripten.sh + android-x86-gles2: + executor: android-29 + environment: + # STUPID yml interprets unquoted ON as a boolean + TARGET_GLES2: "ON" + steps: + - install-base-android: + extra: wget + - build: + script: android-x86-gles.sh + + android-x86-gles3: + executor: android-29 + environment: + # STUPID yml interprets unquoted OFF as a boolean + TARGET_GLES2: "OFF" + steps: + - install-base-android: + extra: wget + - build: + script: android-x86-gles.sh + ports-ios-gles3: executor: xcode-11_5 environment: - # STUPID yml interprets unquoted ON as a boolean + # STUPID yml interprets unquoted OFF as a boolean TARGET_GLES2: "OFF" steps: - install-base-macos: @@ -231,4 +269,6 @@ workflows: - ports-macos - ports-emscripten-webgl1 - ports-emscripten-webgl2 + #- android-x86-gles2 + #- android-x86-gles3 - ports-ios-gles3 From 0590e41759aadd2a40ba161a42281b3afb1b6705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 14 Feb 2022 22:06:19 +0100 Subject: [PATCH 2/3] package/ci: add Android builds of the first four examples. --- package/ci/android-x86-gles.sh | 20 ++++++++++++++++++++ package/ci/circleci.yml | 8 ++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/package/ci/android-x86-gles.sh b/package/ci/android-x86-gles.sh index 170c2c87..be0c05e2 100755 --- a/package/ci/android-x86-gles.sh +++ b/package/ci/android-x86-gles.sh @@ -112,3 +112,23 @@ cd ../.. # So Gradle can find our stuff, hopefully the Android binaries first export CMAKE_PREFIX_PATH="$HOME/deps/;$HOME/deps-native/" + +# Build the Triangle example +cd src/triangle +gradle build +cd ../.. + +# Build the Primitives example +cd src/primitives +gradle build +cd ../.. + +# Build the Textured Quad example +cd src/texturedquad +gradle build +cd ../.. + +# Build the Viewer example +cd src/viewer +gradle build +cd ../.. diff --git a/package/ci/circleci.yml b/package/ci/circleci.yml index 49142f97..2fbdf732 100644 --- a/package/ci/circleci.yml +++ b/package/ci/circleci.yml @@ -225,7 +225,7 @@ jobs: - build: script: emscripten.sh - android-x86-gles2: + ports-android-x86-gles2: executor: android-29 environment: # STUPID yml interprets unquoted ON as a boolean @@ -236,7 +236,7 @@ jobs: - build: script: android-x86-gles.sh - android-x86-gles3: + ports-android-x86-gles3: executor: android-29 environment: # STUPID yml interprets unquoted OFF as a boolean @@ -269,6 +269,6 @@ workflows: - ports-macos - ports-emscripten-webgl1 - ports-emscripten-webgl2 - #- android-x86-gles2 - #- android-x86-gles3 + - ports-android-x86-gles2 + - ports-android-x86-gles3 - ports-ios-gles3 From f1ed5b21f032ec63081ff4bb40c124eceb10ef0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 15 Feb 2022 11:34:40 +0100 Subject: [PATCH 3/3] [wip] --- package/ci/appveyor.yml | 98 ++++++++++++++++++++--------------------- package/ci/circleci.yml | 16 +++---- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/package/ci/appveyor.yml b/package/ci/appveyor.yml index d1f90b0e..25a5c027 100755 --- a/package/ci/appveyor.yml +++ b/package/ci/appveyor.yml @@ -2,56 +2,56 @@ clone_depth: 1 environment: matrix: - - TARGET: desktop - COMPILER: msvc - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - APPVEYOR_JOB_NAME: ports-windows-msvc2015 - ENABLE_VULKAN: OFF - - TARGET: desktop - COMPILER: msvc - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_JOB_NAME: ports-windows-msvc2017 - ENABLE_VULKAN: OFF - - TARGET: desktop - COMPILER: msvc - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - APPVEYOR_JOB_NAME: ports-windows-msvc2019 - ENABLE_VULKAN: ON - - TARGET: desktop - COMPILER: msvc - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_JOB_NAME: ports-windows-msvc2022 - ENABLE_VULKAN: ON - - TARGET: desktop - COMPILER: mingw - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_JOB_NAME: ports-windows-mingw - ENABLE_VULKAN: ON - - TARGET: desktop-gles - COMPILER: msvc - TARGET_GLES2: ON - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - APPVEYOR_JOB_NAME: ports-windows-gles2-msvc2019 - - TARGET: desktop-gles - COMPILER: msvc - TARGET_GLES2: ON - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_JOB_NAME: ports-windows-gles2-msvc2022 - - TARGET: desktop-gles - COMPILER: msvc - TARGET_GLES2: OFF - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - APPVEYOR_JOB_NAME: ports-windows-gles3-msvc2019 - - TARGET: desktop-gles - COMPILER: msvc - TARGET_GLES2: OFF - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_JOB_NAME: ports-windows-gles3-msvc2022 - # Disabled because SDL_WinRTRunApp: identifier not found - #- TARGET: rt - #TARGET_GLES2: OFF + #- TARGET: desktop + #COMPILER: msvc + #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + #APPVEYOR_JOB_NAME: ports-windows-msvc2015 + #ENABLE_VULKAN: OFF + #- TARGET: desktop + #COMPILER: msvc + #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + #APPVEYOR_JOB_NAME: ports-windows-msvc2017 + #ENABLE_VULKAN: OFF + #- TARGET: desktop + #COMPILER: msvc + #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + #APPVEYOR_JOB_NAME: ports-windows-msvc2019 + #ENABLE_VULKAN: ON + #- TARGET: desktop + #COMPILER: msvc + #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + #APPVEYOR_JOB_NAME: ports-windows-msvc2022 + #ENABLE_VULKAN: ON + #- TARGET: desktop + #COMPILER: mingw #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - #APPVEYOR_JOB_NAME: ports-windows-rt-gles3-msvc2017 + #APPVEYOR_JOB_NAME: ports-windows-mingw + #ENABLE_VULKAN: ON + #- TARGET: desktop-gles + #COMPILER: msvc + #TARGET_GLES2: ON + #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + #APPVEYOR_JOB_NAME: ports-windows-gles2-msvc2019 + #- TARGET: desktop-gles + #COMPILER: msvc + #TARGET_GLES2: ON + #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + #APPVEYOR_JOB_NAME: ports-windows-gles2-msvc2022 + #- TARGET: desktop-gles + #COMPILER: msvc + #TARGET_GLES2: OFF + #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + #APPVEYOR_JOB_NAME: ports-windows-gles3-msvc2019 + #- TARGET: desktop-gles + #COMPILER: msvc + #TARGET_GLES2: OFF + #APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + #APPVEYOR_JOB_NAME: ports-windows-gles3-msvc2022 + ## Disabled because SDL_WinRTRunApp: identifier not found + ##- TARGET: rt + ##TARGET_GLES2: OFF + ##APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + ##APPVEYOR_JOB_NAME: ports-windows-rt-gles3-msvc2017 install: - cinst ninja diff --git a/package/ci/circleci.yml b/package/ci/circleci.yml index 2fbdf732..0405b9ac 100644 --- a/package/ci/circleci.yml +++ b/package/ci/circleci.yml @@ -262,13 +262,13 @@ workflows: version: 2 build: jobs: - - ports-linux - - ports-linux-gles2 - - ports-linux-gles3 - - ports-linux-nondeprecated - - ports-macos - - ports-emscripten-webgl1 - - ports-emscripten-webgl2 + #- ports-linux + #- ports-linux-gles2 + #- ports-linux-gles3 + #- ports-linux-nondeprecated + #- ports-macos + #- ports-emscripten-webgl1 + #- ports-emscripten-webgl2 - ports-android-x86-gles2 - ports-android-x86-gles3 - - ports-ios-gles3 + #- ports-ios-gles3