CI: Add MinGW/GCC build to Windows GHA
This commit is contained in:
parent
76a135926a
commit
d715e3806a
|
@ -30,7 +30,7 @@ jobs:
|
||||||
# Skip debug symbols, they're way too big with MSVC.
|
# Skip debug symbols, they're way too big with MSVC.
|
||||||
sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console
|
sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console
|
||||||
bin: ./bin/godot.windows.editor.x86_64.exe
|
bin: ./bin/godot.windows.editor.x86_64.exe
|
||||||
artifact: true
|
compiler: msvc
|
||||||
|
|
||||||
- name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes)
|
- name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes)
|
||||||
cache-name: windows-editor-clang
|
cache-name: windows-editor-clang
|
||||||
|
@ -38,6 +38,7 @@ jobs:
|
||||||
tests: true
|
tests: true
|
||||||
sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes
|
sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes
|
||||||
bin: ./bin/godot.windows.editor.x86_64.llvm.exe
|
bin: ./bin/godot.windows.editor.x86_64.llvm.exe
|
||||||
|
compiler: clang
|
||||||
|
|
||||||
- name: Template (target=template_release, tests=yes)
|
- name: Template (target=template_release, tests=yes)
|
||||||
cache-name: windows-template
|
cache-name: windows-template
|
||||||
|
@ -45,7 +46,16 @@ jobs:
|
||||||
tests: true
|
tests: true
|
||||||
sconsflags: debug_symbols=no
|
sconsflags: debug_symbols=no
|
||||||
bin: ./bin/godot.windows.template_release.x86_64.console.exe
|
bin: ./bin/godot.windows.template_release.x86_64.console.exe
|
||||||
artifact: true
|
compiler: msvc
|
||||||
|
|
||||||
|
- name: Template w/ GCC (target=template_release, tests=yes, use_mingw=yes)
|
||||||
|
cache-name: windows-template-gcc
|
||||||
|
# MinGW takes MUCH longer to compile; save time by only targeting Template.
|
||||||
|
target: template_release
|
||||||
|
tests: true
|
||||||
|
sconsflags: debug_symbols=no use_mingw=yes
|
||||||
|
bin: ./bin/godot.windows.template_release.x86_64.console.exe
|
||||||
|
compiler: gcc
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -69,16 +79,21 @@ jobs:
|
||||||
uses: dsaltares/fetch-gh-release-asset@1.1.2
|
uses: dsaltares/fetch-gh-release-asset@1.1.2
|
||||||
with:
|
with:
|
||||||
repo: godotengine/godot-angle-static
|
repo: godotengine/godot-angle-static
|
||||||
version: tags/chromium/6029
|
version: tags/chromium/6601.2
|
||||||
file: Windows.6029-1.MSVC_17.x86_64.x86_32.zip
|
file: godot-angle-static-x86_64-${{ matrix.compiler == 'gcc' && 'gcc' || 'msvc' }}-release.zip
|
||||||
target: angle/angle.zip
|
target: angle/angle.zip
|
||||||
|
|
||||||
- name: Extract pre-built ANGLE static libraries
|
- name: Extract pre-built ANGLE static libraries
|
||||||
run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/
|
run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/
|
||||||
|
|
||||||
- name: Setup MSVC problem matcher
|
- name: Setup MSVC problem matcher
|
||||||
|
if: matrix.compiler == 'msvc'
|
||||||
uses: ammaraskar/msvc-problem-matcher@master
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
|
|
||||||
|
- name: Setup GCC problem matcher
|
||||||
|
if: matrix.compiler != 'msvc'
|
||||||
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
- name: Compilation
|
- name: Compilation
|
||||||
uses: ./.github/actions/godot-build
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
|
@ -94,12 +109,12 @@ jobs:
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Prepare artifact
|
- name: Prepare artifact
|
||||||
if: ${{ matrix.artifact }}
|
if: matrix.compiler == 'msvc'
|
||||||
run: |
|
run: |
|
||||||
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
if: ${{ matrix.artifact }}
|
if: matrix.compiler == 'msvc'
|
||||||
uses: ./.github/actions/upload-artifact
|
uses: ./.github/actions/upload-artifact
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.cache-name }}
|
name: ${{ matrix.cache-name }}
|
||||||
|
|
|
@ -4,6 +4,8 @@ from misc.utility.scons_hints import *
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
import methods
|
||||||
|
|
||||||
Import("env")
|
Import("env")
|
||||||
|
|
||||||
env_d3d12_rdd = env.Clone()
|
env_d3d12_rdd = env.Clone()
|
||||||
|
@ -139,6 +141,10 @@ else:
|
||||||
extra_defines += [
|
extra_defines += [
|
||||||
"HAVE_STRUCT_TIMESPEC",
|
"HAVE_STRUCT_TIMESPEC",
|
||||||
]
|
]
|
||||||
|
if methods.using_gcc(env) and methods.get_compiler_version(env)["major"] < 13:
|
||||||
|
# `region` & `endregion` not recognized as valid pragmas.
|
||||||
|
env_d3d12_rdd.Append(CCFLAGS=["-Wno-unknown-pragmas"])
|
||||||
|
env.Append(CCFLAGS=["-Wno-unknown-pragmas"])
|
||||||
|
|
||||||
# This is needed since rendering_device_d3d12.cpp needs to include some Mesa internals.
|
# This is needed since rendering_device_d3d12.cpp needs to include some Mesa internals.
|
||||||
env_d3d12_rdd.Prepend(CPPPATH=mesa_private_inc_paths)
|
env_d3d12_rdd.Prepend(CPPPATH=mesa_private_inc_paths)
|
||||||
|
|
|
@ -96,7 +96,7 @@ void compute_dxil_hash(const BYTE *pData, UINT byteCount, BYTE *pOutHash) {
|
||||||
UINT NextEndState = bTwoRowsPadding ? N - 2 : N - 1;
|
UINT NextEndState = bTwoRowsPadding ? N - 2 : N - 1;
|
||||||
const BYTE *pCurrData = pData;
|
const BYTE *pCurrData = pData;
|
||||||
for (UINT i = 0; i < N; i++, offset += 64, pCurrData += 64) {
|
for (UINT i = 0; i < N; i++, offset += 64, pCurrData += 64) {
|
||||||
UINT x[16];
|
UINT x[16] = {};
|
||||||
const UINT *pX;
|
const UINT *pX;
|
||||||
if (i == NextEndState) {
|
if (i == NextEndState) {
|
||||||
if (!bTwoRowsPadding && i == N - 1) {
|
if (!bTwoRowsPadding && i == N - 1) {
|
||||||
|
|
|
@ -1415,7 +1415,14 @@ RDD::TextureID RenderingDeviceDriverD3D12::texture_create(const TextureFormat &p
|
||||||
}
|
}
|
||||||
tex_info->states_ptr = &tex_info->owner_info.states;
|
tex_info->states_ptr = &tex_info->owner_info.states;
|
||||||
tex_info->format = p_format.format;
|
tex_info->format = p_format.format;
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif
|
||||||
tex_info->desc = *(CD3DX12_RESOURCE_DESC *)&resource_desc;
|
tex_info->desc = *(CD3DX12_RESOURCE_DESC *)&resource_desc;
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
tex_info->base_layer = 0;
|
tex_info->base_layer = 0;
|
||||||
tex_info->layers = resource_desc.ArraySize();
|
tex_info->layers = resource_desc.ArraySize();
|
||||||
tex_info->base_mip = 0;
|
tex_info->base_mip = 0;
|
||||||
|
@ -6645,8 +6652,6 @@ static Error create_command_signature(ID3D12Device *device, D3D12_INDIRECT_ARGUM
|
||||||
|
|
||||||
Error RenderingDeviceDriverD3D12::_initialize_frames(uint32_t p_frame_count) {
|
Error RenderingDeviceDriverD3D12::_initialize_frames(uint32_t p_frame_count) {
|
||||||
Error err;
|
Error err;
|
||||||
D3D12MA::ALLOCATION_DESC allocation_desc = {};
|
|
||||||
allocation_desc.HeapType = D3D12_HEAP_TYPE_DEFAULT;
|
|
||||||
|
|
||||||
//CD3DX12_RESOURCE_DESC resource_desc = CD3DX12_RESOURCE_DESC::Buffer(D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT);
|
//CD3DX12_RESOURCE_DESC resource_desc = CD3DX12_RESOURCE_DESC::Buffer(D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT);
|
||||||
uint32_t resource_descriptors_per_frame = GLOBAL_GET("rendering/rendering_device/d3d12/max_resource_descriptors_per_frame");
|
uint32_t resource_descriptors_per_frame = GLOBAL_GET("rendering/rendering_device/d3d12/max_resource_descriptors_per_frame");
|
||||||
|
|
|
@ -789,6 +789,7 @@ def configure_mingw(env: "SConsEnvironment"):
|
||||||
if try_cmd("as --version", env["mingw_prefix"], env["arch"]):
|
if try_cmd("as --version", env["mingw_prefix"], env["arch"]):
|
||||||
env["AS"] = mingw_bin_prefix + "as"
|
env["AS"] = mingw_bin_prefix + "as"
|
||||||
if try_cmd("gcc-ar --version", env["mingw_prefix"], env["arch"]):
|
if try_cmd("gcc-ar --version", env["mingw_prefix"], env["arch"]):
|
||||||
|
if os.name != "nt": # Don't affect cross-compilation.
|
||||||
env["AR"] = mingw_bin_prefix + "gcc-ar"
|
env["AR"] = mingw_bin_prefix + "gcc-ar"
|
||||||
if try_cmd("gcc-ranlib --version", env["mingw_prefix"], env["arch"]):
|
if try_cmd("gcc-ranlib --version", env["mingw_prefix"], env["arch"]):
|
||||||
env["RANLIB"] = mingw_bin_prefix + "gcc-ranlib"
|
env["RANLIB"] = mingw_bin_prefix + "gcc-ranlib"
|
||||||
|
|
Loading…
Reference in New Issue