Skip to content

UrhoCooker , monodis is failing if Mono sdk is not installed , causin… #56

UrhoCooker , monodis is failing if Mono sdk is not installed , causin…

UrhoCooker , monodis is failing if Mono sdk is not installed , causin… #56

name : Build-Artifacts
on:
workflow_dispatch:
push:
branches:
- dotnet-6.x
jobs:
generate-bindings:
name: Generate Bindings
runs-on: macos-latest
if: contains(github.event.head_commit.message, 'build-artifacts') || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Dotnet setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Select Xcode version
run: |
sudo xcode-select --switch /Applications/Xcode.app
- name: Create SDK directory
run: sudo mkdir -p /Library/Developer/CommandLineTools/usr/share/SDKs/default.sdk/MacOSX.sdk
- name: Create SDKSettings.plist file
run: sudo touch /Library/Developer/CommandLineTools/usr/share/SDKs/default.sdk/MacOSX.sdk/SDKSettings.plist
- name: Set SDKROOT in SDKSettings.plist
run: |
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" | sudo tee /Library/Developer/CommandLineTools/usr/share/SDKs/default.sdk/MacOSX.sdk/SDKSettings.plist
- name: Symbolic link to OpenGL headers
run: sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL
- name: generate bindings
run : |
cd Source
./script/make_csharp_bindings.sh
cd ..
- name: Create artifact directory
run: |
mkdir -p bindings/Source/DotNet/Bindings
mkdir -p bindings/Source/Source/Urho3D/DotNet
- name: Copy files to artifact directory
run: |
cp -R Source/DotNet/Bindings/Portable bindings/Source/DotNet/Bindings
cp Source/Source/Urho3D/DotNet/binding.cpp bindings/Source/Source/Urho3D/DotNet
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: bindings
retention-days: 1
path: |
bindings
- name: Delete artifact directory
run: rm -rf bindings
build-macos:
name: build install urho.Net macOS
runs-on: macos-latest
if: contains(github.event.head_commit.message, 'build-artifacts') || github.event_name == 'workflow_dispatch'
needs: [generate-bindings]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Dotnet setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Select xcode
run: sudo xcode-select --switch /Applications/Xcode_14.0.1.app
- name: Download Bindings artifacts
uses: actions/download-artifact@v3
with:
name: bindings
path: bindings
- name: Copy Bindings to the destination path
run: |
ls -ld Source/DotNet/Bindings
ls -la Source/Source/Urho3D/DotNet/binding.cpp
rm -Rf Source/DotNet/Bindings/Portable
cp -R bindings/Source/DotNet/Bindings/Portable Source/DotNet/Bindings
cp -f bindings/Source/Source/Urho3D/DotNet/binding.cpp Source/Source/Urho3D/DotNet/
rm -Rf bindings
ls -ld Source/DotNet/Bindings
ls -la Source/Source/Urho3D/DotNet/binding.cpp
- name: build and install macos urho.Net libs
run : ./Source/script/build_install_urhonet_macos.sh
- name: Create artifact directory
run: |
mkdir -p build-macos/template/libs/dotnet/urho
mkdir -p build-macos/template/libs
- name: Copy files to artifact directory
run: |
cp -R template/libs/dotnet/urho/desktop build-macos/template/libs/dotnet/urho
cp -R template/libs/macos build-macos/template/libs
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: build-macos
retention-days: 1
path: |
build-macos
build-Linux:
name: build install urho.Net Linux
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'build-artifacts') || github.event_name == 'workflow_dispatch'
needs: [generate-bindings]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Dotnet setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Install dependencies
run: sudo apt-get install -y libgl1-mesa-dev libegl1-mesa-dev mesa-common-dev xorg-dev libasound-dev
- name: Download Bindings artifacts
uses: actions/download-artifact@v3
with:
name: bindings
path: bindings
- name: Copy Bindings to the destination path
run: |
ls -ld Source/DotNet/Bindings
ls -la Source/Source/Urho3D/DotNet/binding.cpp
rm -Rf Source/DotNet/Bindings/Portable
cp -R bindings/Source/DotNet/Bindings/Portable Source/DotNet/Bindings
cp -f bindings/Source/Source/Urho3D/DotNet/binding.cpp Source/Source/Urho3D/DotNet/
rm -Rf bindings
ls -ld Source/DotNet/Bindings
ls -la Source/Source/Urho3D/DotNet/binding.cpp
- name: build and install Linux urho.Net libs
run : ./Source/script/build_install_urhonet_linux.sh
- name: Create artifact directory
run: mkdir -p build-Linux/template/libs
- name: Copy files to artifact directory
run: cp -R template/libs/linux build-Linux/template/libs
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: build-Linux
retention-days: 1
path: |
build-Linux
build-Windows:
name: build install urho.Net Windows
runs-on: windows-latest
if: contains(github.event.head_commit.message, 'build-artifacts') || github.event_name == 'workflow_dispatch'
needs: [generate-bindings]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Dotnet setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Install and Configure Mono
run: pwsh -File ./Source/script/install_mono.ps1
- name: Install Visual Studio 2019 Build Tools
run: |
choco install visualstudio2019buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional"
choco install visualstudio2019-workload-vctools --package-parameters "--includeRecommended --includeOptional"
- name: Download Bindings artifacts
uses: actions/download-artifact@v3
with:
name: bindings
path: bindings
- name: Copy Bindings to the destination path
run: |
Remove-Item -Path 'Source\DotNet\Bindings\Portable' -Recurse -Force
Copy-Item -Path bindings\Source\DotNet\Bindings\Portable -Destination Source\DotNet\Bindings -Recurse -Force
Copy-Item -Path bindings\Source\Source\Urho3D\DotNet\binding.cpp -Destination Source\Source\Urho3D\DotNet -Force
Remove-Item -Path 'bindings' -Recurse -Force
- name: build and install Windows urho.Net libs
run : pwsh -File ./Source/script/build_install_urhonet_windows.ps1
- name: Create artifact directory
run: mkdir -p build-Windows/template/libs
- name: Copy files to artifact directory
run: cp -R template/libs/windows build-Windows/template/libs
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: build-Windows
retention-days: 1
path: build-Windows
build-android-linux:
name: build install Android Urho.Net on Linux
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'build-artifacts') || github.event_name == 'workflow_dispatch'
needs: [generate-bindings]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Print Java version
run: echo $JAVA_HOME
- name: Setup Android SDK and NDK
run : ./Source/script/setup_android_linux.sh
- name: Install CMake
run: sudo apt-get install cmake
- name: Use cmake
run: cmake --version
- name: Download Bindings artifacts
uses: actions/download-artifact@v3
with:
name: bindings
path: bindings
- name: Copy Bindings to the destination path
run: |
ls -ld Source/DotNet/Bindings
ls -la Source/Source/Urho3D/DotNet/binding.cpp
rm -Rf Source/DotNet/Bindings/Portable
cp -R bindings/Source/DotNet/Bindings/Portable Source/DotNet/Bindings
cp -f bindings/Source/Source/Urho3D/DotNet/binding.cpp Source/Source/Urho3D/DotNet/
rm -Rf bindings
ls -ld Source/DotNet/Bindings
ls -la Source/Source/Urho3D/DotNet/binding.cpp
- name: build and install Android urho.Net libs
run : ./Source/script/build_install_urhonet_android_libs.sh
- name: Create artifact directories
run: |
mkdir -p build-android-linux/template/libs/dotnet/urho/mobile/android
mkdir -p build-android-linux/template/libs/android/arm64-v8a
mkdir -p build-android-linux/template/libs/android/armeabi-v7a
mkdir -p build-android-linux/template/libs/android/x86
mkdir -p build-android-linux/template/libs/android/x86_64
mkdir -p build-android-linux/template/Android/classes
- name: Copy Android artifacts
run: |
cp -R template/libs/dotnet/urho/mobile/android build-android-linux/template/libs/dotnet/urho/mobile/
cp -R template/libs/android/arm64-v8a build-android-linux/template/libs/android/
cp -R template/libs/android/armeabi-v7a build-android-linux/template/libs/android/
cp -R template/libs/android/x86 build-android-linux/template/libs/android/
cp -R template/libs/android/x86_64 build-android-linux/template/libs/android/
cp -R template/Android/classes build-android-linux/template/Android/
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: build-android-linux
retention-days: 1
path: build-android-linux
build-ios:
name: build install urho.Net iOS
runs-on: macos-latest
if: contains(github.event.head_commit.message, 'build-artifacts') || github.event_name == 'workflow_dispatch'
needs: [generate-bindings]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Dotnet setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Select xcode
run: sudo xcode-select --switch /Applications/Xcode_14.0.1.app
- name: Download Bindings artifacts
uses: actions/download-artifact@v3
with:
name: bindings
path: bindings
- name: Copy Bindings to the destination path
run: |
ls -ld Source/DotNet/Bindings
ls -la Source/Source/Urho3D/DotNet/binding.cpp
rm -Rf Source/DotNet/Bindings/Portable
cp -R bindings/Source/DotNet/Bindings/Portable Source/DotNet/Bindings
cp -f bindings/Source/Source/Urho3D/DotNet/binding.cpp Source/Source/Urho3D/DotNet/
rm -Rf bindings
ls -ld Source/DotNet/Bindings
ls -la Source/Source/Urho3D/DotNet/binding.cpp
- name: build and install iOS urho.Net libs
run : ./Source/script/build_install_urhonet_ios.sh
- name: Create artifact directories
run: |
mkdir -p build-ios/template/IOS
mkdir -p build-ios/template/libs/ios/urho3d/gles/release
mkdir -p build-ios/template/libs/ios/urho3d/gles/debug
mkdir -p build-ios/template/libs/ios/urho3d/metal/release
mkdir -p build-ios/template/libs/ios/urho3d/metal/debug
mkdir -p build-ios/template/libs/dotnet/urho/mobile/ios
- name: Copy iOS artifacts
run: |
cp -R template/IOS build-ios/template
cp -R template/libs/ios/urho3d/gles/release build-ios/template/libs/ios/urho3d/gles/
cp -R template/libs/ios/urho3d/gles/debug build-ios/template/libs/ios/urho3d/gles/
cp -R template/libs/ios/urho3d/metal/release build-ios/template/libs/ios/urho3d/metal/
cp -R template/libs/ios/urho3d/metal/debug build-ios/template/libs/ios/urho3d/metal/
cp -R template/libs/dotnet/urho/mobile/ios build-ios/template/libs/dotnet/urho/mobile/
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: build-ios
retention-days: 1
path: build-ios
create-artifacts:
name: Create combined artifacts
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'build-artifacts') || github.event_name == 'workflow_dispatch'
needs: [build-macos, build-Linux , build-Windows , build-android-linux , build-ios]
steps:
- name: Create artifacts directory
run: mkdir artifacts
- name: Download macOS artifacts
uses: actions/download-artifact@v3
with:
name: build-macos
path: artifacts
- name: Download Linux artifacts
uses: actions/download-artifact@v3
with:
name: build-Linux
path: artifacts
- name: Download Windows artifacts
uses: actions/download-artifact@v3
with:
name: build-Windows
path: artifacts
- name: Download Android artifacts
uses: actions/download-artifact@v3
with:
name: build-android-linux
path: artifacts
- name: Download iOS artifacts
uses: actions/download-artifact@v3
with:
name: build-ios
path: artifacts
- name: Upload combined artifacts
uses: actions/upload-artifact@v3
with:
name: combined-artifacts
retention-days: 1
path: artifacts