From 75a78831840200b633a163fdc767c250c7f0f819 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 13 Sep 2023 12:24:44 +0200 Subject: [PATCH 1/3] GH: Fix test workflow issues - Fix dev build errors - Don't strip dev binaries - Perform only LimboAI unit tests for now --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c4f84e..59ecfdf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: 🔧 Test builds +name: 🔧 Test Builds on: workflow_dispatch: @@ -22,7 +22,7 @@ on: env: GODOT_TREEISH: 4.1.1-stable SCONS_CACHE_MSVC_CONFIG: true - SCONS_CACHE_LIMIT: 4096 + SCONS_CACHE_LIMIT: 7168 SCONSFLAGS: verbose=yes warnings=extra werror=yes DOTNET_NOLOGO: true DOTNET_CLI_TELEMETRY_OPTOUT: true @@ -38,29 +38,33 @@ jobs: - name: 🐧 Editor (x86_64, debug) + Tests target: editor arch: x86_64 + production: false + dev_build: true tests: true - sconsflags: devbuild=yes debug_symbols=yes - name: 🐧 Editor (x86_64, release) target: editor arch: x86_64 + production: true + dev_build: false tests: false - sconsflags: production=yes - name: 🐧 Template (x86_64, release) target: template_release arch: x86_64 + production: true + dev_build: false tests: false - sconsflags: production=yes - name: 🐧 Template (x86_64, debug) target: template_debug arch: x86_64 + production: true + dev_build: false tests: false - sconsflags: production=yes env: - BIN: godot.linuxbsd.${{matrix.target}}.${{matrix.arch}} + BIN: godot.linuxbsd.${{matrix.target}}${{ matrix.dev_build == true && '.dev' || '' }}.${{matrix.arch}} steps: - name: Clone Godot @@ -108,19 +112,24 @@ jobs: ${{env.BIN}}-${{env.GODOT_TREEISH}}-${{github.ref}}-${{github.sha}} ${{env.BIN}}-${{env.GODOT_TREEISH}}-${{github.ref}} ${{env.BIN}}-${{env.GODOT_TREEISH}} + continue-on-error: true - name: Compilation env: SCONS_CACHE: ${{github.workspace}}/.scons_cache/ run: | PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH - scons platform=linuxbsd target=${{matrix.target}} arch=${{matrix.arch}} tests=${{matrix.tests}} ${{matrix.sconsflags}} ${{env.SCONSFLAGS}} + scons platform=linuxbsd target=${{matrix.target}} arch=${{matrix.arch}} production=${{matrix.production}} dev_build=${{matrix.dev_build}} tests=${{matrix.tests}} ${{env.SCONSFLAGS}} + ls -l bin/ + + - name: Strip binaries + if: matrix.dev_build == false + run: strip ./bin/godot.* - name: Prepare artifact env: OUTDIR: ${{ startsWith(matrix.target, 'template') && 'out/templates' || 'out/' }} run: | - strip ./bin/godot.* chmod +x ./bin/godot.* mkdir -p ${{env.OUTDIR}} mv ./bin/godot.* ${{env.OUTDIR}} @@ -128,7 +137,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 env: - NAME_EDITOR: ${{env.NAME_PREFIX}}.${{matrix.target}}.linux.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} + NAME_EDITOR: ${{env.NAME_PREFIX}}.${{matrix.target}}${{matrix.dev_build == true && '.dev' || ''}}.linux.${{matrix.arch}}${{matrix.build-mono == true && '.mono' || ''}} NAME_TEMPLATES: ${{env.NAME_PREFIX}}.export-templates${{ matrix.build-mono == true && '.mono' || '' }} with: name: ${{ startsWith(matrix.target, 'template') && env.NAME_TEMPLATES || env.NAME_EDITOR }} @@ -137,9 +146,11 @@ jobs: - name: Unit Tests if: ${{ matrix.tests }} run: | + echo "Disk usage before tests:" && df -h + ls out/ ./out/${{ env.BIN }} --version ./out/${{ env.BIN }} --help - ./out/${{ env.BIN }} --headless --test + ./out/${{ env.BIN }} --headless --test --test-case="*[LimboAI]*" windows-dot-net: runs-on: "windows-latest" @@ -151,14 +162,14 @@ jobs: - name: 🪟 Editor .NET (x86_64, release) target: editor arch: x86_64 + production: true build-mono: true - sconsflags: production=yes - name: 🪟 Template .NET (x86_64, release) target: template_release arch: x86_64 + production: true build-mono: true - sconsflags: production=yes env: BIN: godot.windows.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} @@ -208,7 +219,7 @@ jobs: env: SCONS_CACHE: ${{github.workspace}}/.scons_cache/ run: | - scons -j2 platform=windows target=${{matrix.target}} arch=${{matrix.arch}} module_mono_enabled=${{matrix.build-mono}} ${{matrix.sconsflags}} ${{env.SCONSFLAGS}} + scons -j2 platform=windows target=${{matrix.target}} arch=${{matrix.arch}} production=${{matrix.production}} module_mono_enabled=${{matrix.build-mono}} ${{env.SCONSFLAGS}} - name: Generate C# glue if: matrix.build-mono && matrix.target == 'editor' @@ -236,7 +247,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 env: - NAME_EDITOR: ${{env.NAME_PREFIX}}.${{matrix.target}}.windows.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }} + NAME_EDITOR: ${{env.NAME_PREFIX}}.${{matrix.target}}${{matrix.dev_build == true && '.dev' || ''}}.linux.${{matrix.arch}}${{matrix.build-mono == true && '.mono' || ''}} NAME_TEMPLATES: ${{env.NAME_PREFIX}}.export-templates${{ matrix.build-mono == true && '.mono' || '' }} with: name: ${{ startsWith(matrix.target, 'template') && env.NAME_TEMPLATES || env.NAME_EDITOR }} From 5d0d2660f7d7bf395251c91fbad32ef83c67e3b4 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 14 Sep 2023 09:36:36 +0200 Subject: [PATCH 2/3] GH: Rename Linux & Windows templates before uploading artifact --- .github/workflows/linux.yml | 9 +++++++++ .github/workflows/windows.yml | 13 ++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index bbb4e43..b6591ee 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -177,6 +177,15 @@ jobs: chmod +x ./bin/godot.* mkdir -p ${{env.OUTDIR}} mv ./bin/godot.* ${{env.OUTDIR}} + ls -R out/ + + - name: Rename templates + if: startsWith(matrix.target, 'template') + env: + BUILD_TYPE: ${{ endsWith(matrix.target, 'release') && 'release' || 'debug' }} + run: | + mv out/templates/${BIN} out/templates/linux_${BUILD_TYPE}.${{matrix.arch}} + ls -R out/ - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d3aeb07..77382c7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -169,8 +169,19 @@ jobs: OUTDIR: ${{ startsWith(matrix.target, 'template') && 'out/templates' || 'out/' }} run: | rm -f bin/*.{exp,lib,pdb} - mkdir -p out/templates/ + mkdir -p ${{env.OUTDIR}} mv bin/* ${{env.OUTDIR}} + ls -R out/ + + - name: Rename templates + if: startsWith(matrix.target, 'template') + shell: bash + env: + BUILD_TYPE: ${{ endsWith(matrix.target, 'release') && 'release' || 'debug' }} + run: | + mv out/templates/${BIN}.exe out/templates/windows_${BUILD_TYPE}_${{matrix.arch}}.exe + mv out/templates/${BIN}.console.exe out/templates/windows_${BUILD_TYPE}_${{matrix.arch}}_console.exe + ls -R out/ - name: Upload artifact uses: actions/upload-artifact@v3 From 1753301753301d308983e05babb183f71f66161a Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 14 Sep 2023 13:14:57 +0200 Subject: [PATCH 3/3] GHA: Fix Windows x64_32 release template .NET not built --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 77382c7..ec3112d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -90,7 +90,7 @@ jobs: - name: Template .NET (x86_32, release) target: template_release - arch: x86_64 + arch: x86_32 build-mono: true - name: Template .NET (x86_32, debug)