GHA: Add action to build .NET assemblies

This commit is contained in:
Serhii Snitsaruk 2024-08-22 11:58:47 +02:00
parent 338c9c8ccb
commit bd0dcb3184
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
4 changed files with 43 additions and 39 deletions

View File

@ -0,0 +1,30 @@
name: Build .NET assemblies
inputs:
platform:
required: true
type: choice
options:
- linuxbsd
- windows
- macos
runs:
using: "composite"
steps:
- name: Override GODOT_VERSION_STATUS for NuGet packages
shell: bash
run: |
GODOT_VERSION_STATUS=$(echo "${GODOT_VERSION_STATUS}" | sed "s|+|-|").gha
echo "GODOT_VERSION_STATUS=${GODOT_VERSION_STATUS}" >> "$GITHUB_ENV"
echo "GODOT_VERSION_STATUS: ${GODOT_VERSION_STATUS}"
- name: Generate C# glue
shell: bash
run: |
./bin/${BIN} --headless --generate-mono-glue ./modules/mono/glue || true
- name: Build .NET assemblies
shell: bash
run: |
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=${{ inputs.platform }}

View File

@ -243,19 +243,11 @@ jobs:
PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH
scons platform=linuxbsd target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}} scons platform=linuxbsd target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}}
- name: Generate C# glue - name: Build .NET assemblies
if: matrix.opts.dotnet && matrix.opts.target == 'editor' if: matrix.opts.dotnet && matrix.opts.target == 'editor'
run: | uses: ./modules/limboai/.github/actions/build-dotnet-assemblies
GODOT_VERSION_STATUS=$(echo "${GODOT_VERSION_STATUS}" | sed "s|+|-|") with:
echo "GODOT_VERSION_STATUS: ${GODOT_VERSION_STATUS}" platform: linuxbsd
./bin/$BIN --headless --generate-mono-glue ./modules/mono/glue || true
- name: Build .NET solutions
if: matrix.opts.dotnet && matrix.opts.target == 'editor'
run: |
GODOT_VERSION_STATUS=$(echo "${GODOT_VERSION_STATUS}" | sed "s|+|-|")
echo "GODOT_VERSION_STATUS: ${GODOT_VERSION_STATUS}"
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
- name: Prepare artifact - name: Prepare artifact
env: env:

View File

@ -183,19 +183,11 @@ jobs:
run: | run: |
scons -j2 platform=macos target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}} scons -j2 platform=macos target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}}
- name: Generate C# glue - name: Build .NET assemblies
if: matrix.opts.dotnet && matrix.opts.target == 'editor' && matrix.opts.arch == 'x86_64' if: matrix.opts.dotnet && matrix.opts.target == 'editor'
run: | uses: ./modules/limboai/.github/actions/build-dotnet-assemblies
GODOT_VERSION_STATUS=$(echo "${GODOT_VERSION_STATUS}" | sed "s|+|-|") with:
echo "GODOT_VERSION_STATUS: ${GODOT_VERSION_STATUS}" platform: macos
./bin/$BIN --headless --generate-mono-glue ./modules/mono/glue || true
- name: Build .NET solutions
if: matrix.opts.dotnet && matrix.opts.target == 'editor' && matrix.opts.arch == 'x86_64'
run: |
GODOT_VERSION_STATUS=$(echo "${GODOT_VERSION_STATUS}" | sed "s|+|-|")
echo "GODOT_VERSION_STATUS: ${GODOT_VERSION_STATUS}"
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=macos
- name: Prepare artifact - name: Prepare artifact
run: | run: |

View File

@ -220,21 +220,11 @@ jobs:
run: | run: |
scons -j2 platform=windows target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}} scons -j2 platform=windows target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}}
- name: Generate C# glue - name: Build .NET assemblies
if: matrix.opts.dotnet && matrix.opts.target == 'editor' if: matrix.opts.dotnet && matrix.opts.target == 'editor'
shell: bash uses: ./modules/limboai/.github/actions/build-dotnet-assemblies
run: | with:
GODOT_VERSION_STATUS=$(echo "${GODOT_VERSION_STATUS}" | sed "s|+|-|") platform: windows
echo "GODOT_VERSION_STATUS: ${GODOT_VERSION_STATUS}"
./bin/${{ env.BIN }} --headless --generate-mono-glue ./modules/mono/glue || true
- name: Build .NET solutions
if: matrix.opts.dotnet && matrix.opts.target == 'editor'
shell: bash
run: |
GODOT_VERSION_STATUS=$(echo "${GODOT_VERSION_STATUS}" | sed "s|+|-|")
echo "GODOT_VERSION_STATUS: ${GODOT_VERSION_STATUS}"
python ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
- name: Prepare artifact - name: Prepare artifact
shell: bash shell: bash