[build] Fix Linux CI
This changes the Gnumake build to CMake + Ninja builds in order to fix linker issues in the CI.
This commit is contained in:
parent
08537f0a80
commit
00202f938d
|
@ -71,7 +71,7 @@ jobs:
|
|||
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
||||
sudo apt-add-repository "deb http://apt.llvm.org/${UBUNTU_BASE}/ llvm-toolchain-${UBUNTU_BASE}-$LLVM_VERSION main"
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install mesa-vulkan-drivers valgrind libc++-dev libc++abi-dev libgtk-3-dev libsdl2-dev libvulkan-dev libx11-dev libx11-xcb-dev clang-$LLVM_VERSION clang-format-$LLVM_VERSION llvm-$LLVM_VERSION
|
||||
sudo apt-get -y install mesa-vulkan-drivers valgrind libc++-dev libc++abi-dev libgtk-3-dev libsdl2-dev libvulkan-dev libx11-dev libx11-xcb-dev clang-$LLVM_VERSION clang-format-$LLVM_VERSION llvm-$LLVM_VERSION ninja-build cmake
|
||||
./xb setup
|
||||
- name: Build
|
||||
run: ./xb build --config=Release
|
||||
|
|
31
xenia-build
31
xenia-build
|
@ -533,7 +533,7 @@ def run_platform_premake(target_os_override=None, cc='clang', devenv=None):
|
|||
elif target_os == 'android':
|
||||
devenv = 'androidndk'
|
||||
else:
|
||||
devenv = 'gmake2'
|
||||
devenv = 'cmake'
|
||||
if target_os != 'linux':
|
||||
cc = None
|
||||
return run_premake(target_os=target_os, action=devenv, cc=cc)
|
||||
|
@ -850,15 +850,26 @@ class BaseBuildCommand(Command):
|
|||
] + scheme_args + pass_args, shell=False, env=dict(os.environ))
|
||||
else:
|
||||
result = subprocess.call([
|
||||
'make',
|
||||
'-j' if threads == 0 else '-j%d' % threads,
|
||||
'-Cbuild/',
|
||||
'config=%s_linux' % (args['config']),
|
||||
] + pass_args + args['target'], shell=False, env=dict(os.environ))
|
||||
print('')
|
||||
if result != 0:
|
||||
print('ERROR: build failed with one or more errors.')
|
||||
return result
|
||||
'cmake',
|
||||
'-S build/',
|
||||
'-B build/build_%s' % (args['config']),
|
||||
'-DCMAKE_BUILD_TYPE=%s' % (args['config'].title()),
|
||||
'-DCMAKE_C_COMPILER=clang',
|
||||
'-DCMAKE_CXX_COMPILER=clang++',
|
||||
'-G Ninja'
|
||||
] + pass_args, shell=False, env=dict(os.environ))
|
||||
print('')
|
||||
if result != 0:
|
||||
print('ERROR: cmake failed with one or more errors.')
|
||||
return result
|
||||
result = subprocess.call([
|
||||
'ninja',
|
||||
'-C./build/build_%s' % (args['config']),
|
||||
'-j' if threads == 0 else '-j%d' % threads,
|
||||
] + pass_args, shell=False, env=dict(os.environ))
|
||||
if result != 0:
|
||||
print('ERROR: ninja failed with one or more errors.')
|
||||
return result
|
||||
return 0
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue