Assume everyone has the ability to run a makefile
This commit is contained in:
1 parent
781c9ee3b2
commit
1351d1eda8
2 files changed
+15
-16
No files matched your search
+9
-10
@@ -90,12 +90,12 @@ def getCompilationSettings(server):
|
|||||||
for compiler in compilers:
|
for compiler in compilers:
|
||||||
|
|
||||||
# Compilers may require a specific version
|
# Compilers may require a specific version
|
||||||
if '>=' in compiler: command, version = compiler.split('>=')
|
if '>=' in compiler: compiler, version = compiler.split('>=')
|
||||||
else: command = compiler; version = (0, 0, 0)
|
else: compiler = compiler; version = (0, 0, 0)
|
||||||
|
|
||||||
# Try to execute the compiler from the command line
|
# Try to execute the compiler from the command line
|
||||||
try: stdout, stderr = subprocess.Popen(
|
try: stdout, stderr = subprocess.Popen(
|
||||||
[command, '--version'],
|
[compiler, '--version'],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
).communicate()
|
).communicate()
|
||||||
@@ -111,14 +111,14 @@ def getCompilationSettings(server):
|
|||||||
|
|
||||||
# Compiler was sufficient
|
# Compiler was sufficient
|
||||||
COMPILERS[engine] = {
|
COMPILERS[engine] = {
|
||||||
'command' : command, 'version' : match,
|
'compiler' : compiler, 'version' : match,
|
||||||
'default' : compiler == compilers[0]
|
'default' : compiler == compilers[0]
|
||||||
}; break
|
}; break
|
||||||
|
|
||||||
# Report each engine configuration we can build for
|
# Report each engine configuration we can build for
|
||||||
for engine in [engine for engine in data.keys() if engine in COMPILERS]:
|
for engine in [engine for engine in data.keys() if engine in COMPILERS]:
|
||||||
command, version = COMPILERS[engine]['command'], COMPILERS[engine]['version']
|
compiler, version = COMPILERS[engine]['compiler'], COMPILERS[engine]['version']
|
||||||
print("Found {0} {1} for {2}".format(command, version, engine))
|
print("Found {0} {1} for {2}".format(compiler, version, engine))
|
||||||
|
|
||||||
# Report each engine configuration we cannot build for
|
# Report each engine configuration we cannot build for
|
||||||
for engine in [engine for engine in data.keys() if engine not in COMPILERS]:
|
for engine in [engine for engine in data.keys() if engine not in COMPILERS]:
|
||||||
@@ -195,13 +195,12 @@ def getEngine(data, engine):
|
|||||||
getAndUnzipFile(engine['source'], '{0}.zip'.format(engine['name']), 'tmp')
|
getAndUnzipFile(engine['source'], '{0}.zip'.format(engine['name']), 'tmp')
|
||||||
pathway = pathjoin('tmp/{0}/'.format(unzipname), data['test']['build']['path'])
|
pathway = pathjoin('tmp/{0}/'.format(unzipname), data['test']['build']['path'])
|
||||||
|
|
||||||
# Use base command and an EXE= hook
|
# Basic make assumption and an EXE= hook
|
||||||
command = [data['test']['build']['command']]
|
command = ['make', 'EXE={0}'.format(engine['name'])]
|
||||||
command.append('EXE={0}'.format(engine['name']))
|
|
||||||
|
|
||||||
# Use a CC= hook if we are using the non-default compiler
|
# Use a CC= hook if we are using the non-default compiler
|
||||||
if not COMPILERS[data['test']['engine']]['default']:
|
if not COMPILERS[data['test']['engine']]['default']:
|
||||||
command.append('CC={0}'.format(COMPILERS[data['test']['engine']]['command']))
|
command.append('CC={0}'.format(COMPILERS[data['test']['engine']]['compiler']))
|
||||||
|
|
||||||
# Add any other custom compilation options if we have them
|
# Add any other custom compilation options if we have them
|
||||||
if data['test']['engine'] in CUSTOM_SETTINGS:
|
if data['test']['engine'] in CUSTOM_SETTINGS:
|
||||||
|
|||||||
+6
-6
@@ -80,7 +80,7 @@ OPENBENCH_CONFIG = {
|
|||||||
|
|
||||||
'proto' : 'uci',
|
'proto' : 'uci',
|
||||||
'nps' : 1275000,
|
'nps' : 1275000,
|
||||||
'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['gcc'] },
|
'build' : { 'path' : '/src/', 'compilers' : ['gcc'] },
|
||||||
'source' : 'https://github.com/AndyGrant/Ethereal',
|
'source' : 'https://github.com/AndyGrant/Ethereal',
|
||||||
|
|
||||||
'testmodes' : {
|
'testmodes' : {
|
||||||
@@ -95,7 +95,7 @@ OPENBENCH_CONFIG = {
|
|||||||
|
|
||||||
'proto' : 'uci',
|
'proto' : 'uci',
|
||||||
'nps' : 710000,
|
'nps' : 710000,
|
||||||
'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['g++'] },
|
'build' : { 'path' : '/src/', 'compilers' : ['g++'] },
|
||||||
'source' : 'https://github.com/jeffreyan11/uci-chess-engine',
|
'source' : 'https://github.com/jeffreyan11/uci-chess-engine',
|
||||||
|
|
||||||
'testmodes' : {
|
'testmodes' : {
|
||||||
@@ -110,7 +110,7 @@ OPENBENCH_CONFIG = {
|
|||||||
|
|
||||||
'proto' : 'uci',
|
'proto' : 'uci',
|
||||||
'nps' : 2675000,
|
'nps' : 2675000,
|
||||||
'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['gcc'] },
|
'build' : { 'path' : '/src/', 'compilers' : ['gcc'] },
|
||||||
'source' : 'https://github.com/TerjeKir/weiss',
|
'source' : 'https://github.com/TerjeKir/weiss',
|
||||||
|
|
||||||
'testmodes' : {
|
'testmodes' : {
|
||||||
@@ -125,7 +125,7 @@ OPENBENCH_CONFIG = {
|
|||||||
|
|
||||||
'proto' : 'uci',
|
'proto' : 'uci',
|
||||||
'nps' : 1250000,
|
'nps' : 1250000,
|
||||||
'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['gcc', 'clang'] },
|
'build' : { 'path' : '/src/', 'compilers' : ['gcc', 'clang'] },
|
||||||
'source' : 'https://github.com/lucasart/Demolito',
|
'source' : 'https://github.com/lucasart/Demolito',
|
||||||
|
|
||||||
'testmodes' : {
|
'testmodes' : {
|
||||||
@@ -140,7 +140,7 @@ OPENBENCH_CONFIG = {
|
|||||||
|
|
||||||
'proto' : 'uci',
|
'proto' : 'uci',
|
||||||
'nps' : 1000000,
|
'nps' : 1000000,
|
||||||
'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['g++'] },
|
'build' : { 'path' : '/src/', 'compilers' : ['g++'] },
|
||||||
'source' : 'https://github.com/Matthies/RubiChess',
|
'source' : 'https://github.com/Matthies/RubiChess',
|
||||||
|
|
||||||
'testmodes' : {
|
'testmodes' : {
|
||||||
@@ -155,7 +155,7 @@ OPENBENCH_CONFIG = {
|
|||||||
|
|
||||||
'proto' : 'uci',
|
'proto' : 'uci',
|
||||||
'nps' : 1000000,
|
'nps' : 1000000,
|
||||||
'build' : { 'path' : '/src/', 'command' : 'make', 'compilers' : ['cargo>=1.43.0'] },
|
'build' : { 'path' : '/src/', 'compilers' : ['cargo>=1.43.0'] },
|
||||||
'source' : 'https://github.com/fabianvdW/FabChess',
|
'source' : 'https://github.com/fabianvdW/FabChess',
|
||||||
|
|
||||||
'testmodes' : {
|
'testmodes' : {
|
||||||
|
|||||||
Reference in new issue
Block a user