GH: Perform unit tests in the test build
This commit is contained in:
parent
476c4fd497
commit
bdb158ff27
|
@ -26,32 +26,41 @@ on:
|
||||||
env:
|
env:
|
||||||
SCONS_CACHE_MSVC_CONFIG: true
|
SCONS_CACHE_MSVC_CONFIG: true
|
||||||
SCONS_CACHE_LIMIT: 4096
|
SCONS_CACHE_LIMIT: 4096
|
||||||
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
|
SCONSFLAGS: verbose=yes warnings=extra werror=yes
|
||||||
DOTNET_NOLOGO: true
|
DOTNET_NOLOGO: true
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux-test-build:
|
linux-test-builds:
|
||||||
runs-on: "ubuntu-20.04"
|
runs-on: "ubuntu-20.04"
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- name: 🐧 Editor (x86_64, debug) + Tests
|
||||||
|
target: editor
|
||||||
|
arch: x86_64
|
||||||
|
tests: true
|
||||||
|
sconsflags: devbuild=yes debug_symbols=yes
|
||||||
|
|
||||||
- name: 🐧 Editor (x86_64, release)
|
- name: 🐧 Editor (x86_64, release)
|
||||||
target: editor
|
target: editor
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
build-mono: false
|
tests: false
|
||||||
|
sconsflags: production=yes
|
||||||
|
|
||||||
- name: 🐧 Template (x86_64, release)
|
- name: 🐧 Template (x86_64, release)
|
||||||
target: template_release
|
target: template_release
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
build-mono: false
|
tests: false
|
||||||
|
sconsflags: production=yes
|
||||||
|
|
||||||
- name: 🐧 Template (x86_64, debug)
|
- name: 🐧 Template (x86_64, debug)
|
||||||
target: template_debug
|
target: template_debug
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
build-mono: false
|
tests: false
|
||||||
|
sconsflags: production=yes
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BIN: godot.linuxbsd.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
BIN: godot.linuxbsd.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
||||||
|
@ -109,7 +118,7 @@ jobs:
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
||||||
run: |
|
run: |
|
||||||
PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH
|
PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH
|
||||||
scons platform=linuxbsd target=${{matrix.target}} arch=${{matrix.arch}} module_mono_enabled=${{matrix.build-mono}} ${{env.SCONSFLAGS}}
|
scons platform=linuxbsd target=${{matrix.target}} arch=${{matrix.arch}} tests=${{matrix.tests}} ${{matrix.sconsflags}} ${{env.SCONSFLAGS}}
|
||||||
|
|
||||||
- name: Prepare artifact
|
- name: Prepare artifact
|
||||||
env:
|
env:
|
||||||
|
@ -129,6 +138,13 @@ jobs:
|
||||||
name: ${{ startsWith(matrix.target, 'template') && env.NAME_TEMPLATES || env.NAME_EDITOR }}
|
name: ${{ startsWith(matrix.target, 'template') && env.NAME_TEMPLATES || env.NAME_EDITOR }}
|
||||||
path: out/*
|
path: out/*
|
||||||
|
|
||||||
|
- name: Unit Tests
|
||||||
|
if: ${{ matrix.tests }}
|
||||||
|
run: |
|
||||||
|
./out/${{ env.BIN }} --version
|
||||||
|
./out/${{ env.BIN }} --help
|
||||||
|
./out/${{ env.BIN }} --headless --test --test-case="*[LimboAI]*"
|
||||||
|
|
||||||
windows-dot-net:
|
windows-dot-net:
|
||||||
runs-on: "windows-latest"
|
runs-on: "windows-latest"
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
|
@ -140,11 +156,13 @@ jobs:
|
||||||
target: editor
|
target: editor
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
build-mono: true
|
build-mono: true
|
||||||
|
sconsflags: production=yes
|
||||||
|
|
||||||
- name: 🪟 Template .NET (x86_64, release)
|
- name: 🪟 Template .NET (x86_64, release)
|
||||||
target: template_release
|
target: template_release
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
build-mono: true
|
build-mono: true
|
||||||
|
sconsflags: production=yes
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BIN: godot.windows.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
BIN: godot.windows.${{matrix.target}}.${{matrix.arch}}${{ matrix.build-mono == true && '.mono' || '' }}
|
||||||
|
@ -195,7 +213,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
||||||
run: |
|
run: |
|
||||||
scons -j2 platform=windows target=${{matrix.target}} arch=${{matrix.arch}} module_mono_enabled=${{matrix.build-mono}} ${{env.SCONSFLAGS}}
|
scons -j2 platform=windows target=${{matrix.target}} arch=${{matrix.arch}} module_mono_enabled=${{matrix.build-mono}} ${{matrix.sconsflags}} ${{env.SCONSFLAGS}}
|
||||||
|
|
||||||
- name: Generate C# glue
|
- name: Generate C# glue
|
||||||
if: matrix.build-mono && matrix.target == 'editor'
|
if: matrix.build-mono && matrix.target == 'editor'
|
||||||
|
|
Loading…
Reference in New Issue