builds godot
bendn 2025-02-09
parent 0d1164e · commit 7710f0c
-rw-r--r--.github/actions/build-godot/action.yml12
-rw-r--r--.github/actions/build-upload-image/action.yml14
-rw-r--r--.github/actions/release/action.yml12
-rw-r--r--.github/actions/upload-artifact/action.yml4
-rw-r--r--.github/workflows/reusable-build.yml31
5 files changed, 46 insertions, 27 deletions
diff --git a/.github/actions/build-godot/action.yml b/.github/actions/build-godot/action.yml
index e99bed5..88ec767 100644
--- a/.github/actions/build-godot/action.yml
+++ b/.github/actions/build-godot/action.yml
@@ -11,6 +11,9 @@ inputs:
target:
description: Target (template_release, template_debug, editor)
required: true
+ tools:
+ description: Tools!
+ default: "no"
runs:
using: "composite"
@@ -48,12 +51,11 @@ runs:
run: |
echo ::group::Compilation
cd godot
- scons_flags=${{ env.flags }}
+ scons_flags="${{ env.flags }} ${{ inputs.flags }} tools=${{ inputs.tools }}"
cores=$(nproc) || cores=$(sysctl -n hw.ncpu)
- [[ -n "${{ inputs.flags }}" ]] && scons_flags="${{ inputs.flags }}"
- [[ ${{ inputs.target }} == "editor" ]] && scons_flags="${scons_flags//disable_3d=yes/}" # remove disable_3d=yes if editor
- [[ ${{ inputs.target }} == "editor" ]] && scons_flags="$scons_flags debug_symbols=no tools=yes"
- [[ ${{ inputs.target }} != "editor" ]] && scons_flags="$scons_flags deprecated=no tools=no"
+ [[ ${{ inputs.tools }} == "yes" ]] && scons_flags="${scons_flags//disable_3d=yes/}" # remove disable_3d=yes if editor
+ [[ ${{ inputs.tools }} == "yes" ]] && scons_flags="$scons_flags debug_symbols=no"
+ [[ ${{ inputs.target }} ]] && scons_flags="$scons_flags deprecated=no"
scons -j$((cores+2)) p=${{ inputs.platform }} target=${{ inputs.target }} verbose=yes udev=yes dev_build=no lto=auto $scons_flags
echo "compile done"
[[ ${{ inputs.target}} != "editor" ]] && strip -v bin/* || true
diff --git a/.github/actions/build-upload-image/action.yml b/.github/actions/build-upload-image/action.yml
index dcdae3d..aff9222 100644
--- a/.github/actions/build-upload-image/action.yml
+++ b/.github/actions/build-upload-image/action.yml
@@ -19,16 +19,20 @@ runs:
uses: bend-n/godot-builds/.github/actions/get-version@main
- name: Get templates
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: templates
- - name: Get editor
- uses: actions/download-artifact@v3
+ - name: Get headless editor
+ uses: actions/download-artifact@v4
with:
- name: linuxbsd-editor-release
+ name: server-editor-release
- - run: mv godot.x11.opt.64 godot && chmod -v +x godot
+ - name: List all downloaded files
+ run: ls -R
+ shell: bash
+
+ - run: mv godot_server.x11.opt.tools.64 godot && chmod -v +x godot
shell: bash
- name: Login to GitHub Container Registry
diff --git a/.github/actions/release/action.yml b/.github/actions/release/action.yml
index 2928b25..c5e8fca 100644
--- a/.github/actions/release/action.yml
+++ b/.github/actions/release/action.yml
@@ -17,19 +17,23 @@ runs:
uses: bend-n/godot-builds/.github/actions/get-version@main
- name: Get templates
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: templates
- name: Get editor
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: linuxbsd-editor-release
+ - name: List all downloaded files
+ run: ls -R
+ shell: bash
+
- name: Compress
run: |
- strip godot.x11.opt.64 -v || true
- mv godot.x11.opt.64 ${{ env.fstart }}_linux.x86_64
+ strip godot.x11.opt.tools.64 -v || true
+ mv godot.x11.opt.tools.64 ${{ env.fstart }}_linux.x86_64
mv templates.tpz ${{ env.fstart }}_export_templates.tpz
shell: bash
env:
diff --git a/.github/actions/upload-artifact/action.yml b/.github/actions/upload-artifact/action.yml
index 84bc56f..40b442b 100644
--- a/.github/actions/upload-artifact/action.yml
+++ b/.github/actions/upload-artifact/action.yml
@@ -5,7 +5,7 @@ description: Uploads the artifact
inputs:
name:
description: The artifact name.
- default: "${{ github.job }}"
+ default: "${{ github.job }}-${{ matrix.target }}"
required: true
path:
description: The path to upload.
@@ -16,7 +16,7 @@ runs:
using: "composite"
steps:
- name: Upload Godot Artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml
index 16153b3..b8b09f2 100644
--- a/.github/workflows/reusable-build.yml
+++ b/.github/workflows/reusable-build.yml
@@ -179,6 +179,7 @@ jobs:
uses: bend-n/godot-builds/.github/actions/upload-artifact@main
with:
path: godot/bin/*.zip
+ name: ${{ inputs.name }}-${{ matrix.target }}-${{ matrix.flags }}
templates:
needs: [web, macos, windows, linux, android]
@@ -188,11 +189,14 @@ jobs:
tmps: "templates"
steps:
- name: Download all artifacts
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
- name: List all downloaded files
run: ls -R
+ - name: flatten
+ run: find . -mindepth 2 -type f -exec mv -t . -i '{}' +
+
- name: Getdot
uses: actions/checkout@v3
with:
@@ -207,31 +211,31 @@ jobs:
mkdir -vp "$tmps"
echo "Preparing linux"
linux="godot.x11.opt"
- mv "linux/$linux.64" "$tmps/linux_x11_debug.x86_64"
- mv "linux/$linux.debug.64" "$tmps/linux_x11_release.x86_64"
+ mv "$linux.64" "$tmps/linux_x11_debug.x86_64"
+ mv "$linux.debug.64" "$tmps/linux_x11_release.x86_64"
echo "Preparing windows"
windows="godot.windows.opt"
# mv "windows/$windows.debug.64.exe" "$tmps/windows_debug_x86_64.exe"
- mv "windows/$windows.64.exe" "$tmps/windows_release_x86_64.exe"
+ mv "$windows.64.exe" "$tmps/windows_release_x86_64.exe"
echo "Preparing android"
# mv "android/android_debug.apk" "$tmps/android_debug.apk"
- mv "android/android_release.apk" "$tmps/android_release.apk"
+ mv "android_release.apk" "$tmps/android_release.apk"
echo "Preparing macos"
mac="godot.osx.opt"
cp -r "godot-repo/misc/dist/osx_template.app" "."
mkdir -p "osx_template.app/Contents/MacOS"
- cp "macos/$mac.universal" "osx_template.app/Contents/MacOS/godot_osx_release.64"
+ cp "$mac.universal" "osx_template.app/Contents/MacOS/godot_osx_release.64"
# cp "macos/$mac.debug.universal" "osx_template.app/Contents/MacOS/godot_osx_debug.64"
chmod +x osx_template.app/Contents/MacOS/*.64
zip -q -9 -r "$tmps/osz.zip" "osx_template.app"
echo "Preparing web"
web="godot.javascript.opt"
- mv "web/$web.zip" "$tmps/webassembly_release.zip"
- mv "web/$web.gdnative.zip" "$tmps/webassembly_gdnative_release.zip"
+ mv "$web.zip" "$tmps/webassembly_release.zip"
+ mv "$web.gdnative.zip" "$tmps/webassembly_gdnative_release.zip"
- name: Prepare bundle
run: cd "${tmps}" && zip -qr9 templates.tpz ./*
@@ -240,21 +244,26 @@ jobs:
uses: bend-n/godot-builds/.github/actions/upload-artifact@main
with:
path: ${{ env.tmps }}/templates.tpz
+ name: templates
editor:
+ strategy:
+ matrix:
+ platform: [server, linuxbsd]
name: Linux editor
runs-on: ubuntu-20.04
steps:
- name: Compilation
uses: bend-n/godot-builds/.github/actions/build-godot@main
with:
- platform: linuxbsd
- target: release
+ platform: ${{ matrix.platform }}
+ target: release_debug
+ tools: "yes"
- name: Upload artifact
uses: bend-n/godot-builds/.github/actions/upload-artifact@main
with:
- name: linuxbsd-editor-release
+ name: ${{ matrix.platform }}-editor-release
path: godot/bin/*.64
image: