UrhoCooker , monodis is failing if Mono sdk is not installed , causin… #40
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-Linux-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-linux-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-Linux-Artifacts: | |
name: build urho.Net Linux artifacts | |
runs-on: ubuntu-latest | |
if: contains(github.event.head_commit.message, 'build-linux-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 | |