~ Updated the binary files after updating the rlottie submodule. #108
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
name: Build and Test | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
branches: | |
- dev | |
jobs: | |
build_windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build | |
run: | | |
cd projects/CMake | |
cmake -S . -B ./build_x86 -A Win32 | |
cmake -S . -B ./build_x86_64 -A x64 | |
cmake --build ./build_x86 --config Release | |
cmake --build ./build_x86_64 --config Release | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: LottiePluginWindowsArtifacts | |
path: | | |
out/Release/Plugins/Windows/x86/LottiePlugin.dll | |
out/Release/Plugins/Windows/x86_64/LottiePlugin.dll | |
build_android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Setup CMake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.25.2' | |
- name: Set execution permissions for gradlew | |
run: chmod +x projects/AndroidStudio/gradlew | |
- name: Build Gradle project | |
run: | | |
echo $ANDROID_NDK_HOME | |
result=$(find $ANDROID_NDK_HOME -name aarch64-linux-android-strip) | |
echo $result | |
cd projects/AndroidStudio | |
./gradlew assembleRelease | |
tree ../../out | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: LottiePluginAndroidArtifacts | |
path: | | |
out/RelWithDebInfo/Plugins/Android/arm64-v8a/libLottiePlugin.so | |
out/RelWithDebInfo/Plugins/Android/armeabi-v7a/libLottiePlugin.so | |
out/RelWithDebInfo/Plugins/Android/x86/libLottiePlugin.so | |
out/RelWithDebInfo/Plugins/Android/x86_64/libLottiePlugin.so | |
build_macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install CMake | |
run: brew install cmake | |
- name: Build | |
run: | | |
cd projects/CMake | |
cmake -S . -B ./buildOSX -G Xcode -DRLOTTIE_OSX=1 -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" | |
cmake --build ./buildOSX --config Release | |
brew install tree | |
tree ../../out | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: LottiePluginMacOSArtifacts | |
path: | | |
out/Release/Plugins/Darwin/x86_64/libLottiePlugin.dylib | |
build_ios: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install CMake | |
run: brew install cmake | |
- name: Build | |
run: | | |
cd projects/CMake | |
cmake -S . -B ./buildIOS -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../dependency/cmake-ios-toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -DRLOTTIE_IOS=1 | |
cmake --build ./buildIOS --config Release --target LottiePlugin | |
brew install tree | |
tree ../../out | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: LottiePluginIOSArtifacts | |
path: | | |
out/Release/Plugins/iOS/aarch64/libLottiePlugin.a | |
out/Release/Plugins/iOS/aarch64/librlottie.a | |
build_linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install CMake | |
run: sudo apt-get install cmake | |
- name: Build | |
run: | | |
cd projects/CMake | |
cmake -S . -B ./buildLinux -G "Unix Makefiles" -DRLOTTIE_LINUX=1 | |
cmake --build ./buildLinux --config Release | |
tree ../../out | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: LottiePluginLinuxArtifacts | |
path: | | |
out/Plugins/Linux/x86_64/libLottiePlugin.so | |
build_webgl: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Modify rlottie CMakeLists.txt | |
run: sed -i '/add_subdirectory(example)/d' dependency/rlottie/CMakeLists.txt | |
- name: Install Emscripten and Build | |
run: | | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk | |
./emsdk install latest | |
./emsdk activate latest | |
source ./emsdk_env.sh | |
cd ../projects/CMake | |
emcmake cmake -S . -B ./buildWebGL -DRLOTTIE_WEB_ASSEMBLY=1 -DLOTTIE_MODULE=OFF -DBUILD_SHARED_LIBS=OFF | |
emmake cmake --build ./buildWebGL --config Release | |
cd ../.. | |
mkdir -p out/Release/Plugins/WebGL | |
emcc -O3 -flto -o out/Release/Plugins/WebGL/LottiePlugin.bc out/Plugins/Emscripten/x86/libLottiePlugin.a out/Plugins/Emscripten/x86/librlottie.a | |
tree out | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: LottiePluginWebGLArtifacts | |
path: | | |
out/Release/Plugins/WebGL/LottiePlugin.bc | |
out/Release/Plugins/WebGL/LottiePlugin.wasm | |
out/Plugins/Emscripten/x86/libLottiePlugin.a | |
out/Plugins/Emscripten/x86/librlottie.a | |
# run_tests_and_build_unity: | |
# needs: [build_windows, build_android, build_macos, build_ios, build_linux] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# with: | |
# submodules: recursive | |
# - name: Download artifacts | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: LottiePluginLinuxArtifacts | |
# path: out/Plugins/Linux | |
# - name: Force replace the native libraries | |
# run: | | |
# tree out | |
# cp -f out/Plugins/Linux/libLottiePlugin.so unity/RLottieUnity/Assets/LottiePlugin/Plugins/Linux/x86_64/libLottiePlugin.so | |
# tree unity/RLottieUnity/Assets/LottiePlugin/Plugins/Linux | |
# - name: Run Tests in Unity | |
# uses: game-ci/[email protected] | |
# env: | |
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
# with: | |
# projectPath: unity/RLottieUnity | |
# githubToken: ${{ secrets.GITHUB_TOKEN }} | |
# customParameters: -logFile - | |