Add nMigen to docker & chroot images.

* New: In bootsrap/docker:
    * install python3/nMigen tool in all environment.
    * Add a new image on top of the coriolis one to have a shell
      (with X11 connexion to the host system).
    * Upgrade Yosys to 0.9.
    * Correct integration of allianceInstaller.sh in socInstaller.py.
    * Add a chroot mode to socInstaler.py (for Debian 9 chrooted).
    * Allow benchs to be run separately.
This commit is contained in:
Jean-Paul Chaput 2020-02-20 00:45:52 +01:00
parent 1d05f1278e
commit 5d968b0997
21 changed files with 267 additions and 105 deletions

View File

@ -0,0 +1,6 @@
FROM debian9.coriolis
COPY root/dot.bashrc /root/.bashrc
CMD [ "/bin/bash", "-i" ]

View File

@ -2,6 +2,9 @@
FROM debian9.system FROM debian9.system
COPY root/socInstaller.py /root/socInstaller.py COPY root/socInstaller.py /root/socInstaller.py
COPY root/allianceInstaller.sh /root/allianceInstaller.sh RUN mkdir -p coriolis-2.x/src \
CMD /root/socInstaller.py --docker --profile=Debian9 --do-alliance --do-coriolis --benchs && git clone https://github.com/m-labs/nmigen.git \
&& cd nmigen \
&& python3 setup.py develop \
&& /root/socInstaller.py --docker --profile=Debian9 --do-alliance --do-coriolis --benchs

View File

@ -9,6 +9,7 @@ RUN apt-get update \
libboost-all-dev libboost-python-dev \ libboost-all-dev libboost-python-dev \
zlib1g-dev libxml2-dev rapidjson-dev libbz2-dev \ zlib1g-dev libxml2-dev rapidjson-dev libbz2-dev \
qt4-dev-tools libqwt-dev python-qt4 \ qt4-dev-tools libqwt-dev python-qt4 \
python3-setuptools \
\ \
autotools-dev automake \ autotools-dev automake \
libxt-dev libxpm-dev libmotif-dev \ libxt-dev libxpm-dev libmotif-dev \

View File

@ -1,3 +1,4 @@
systemImage="debian9.system" systemImage="debian9.system"
coriolisImage="debian9.coriolis" coriolisImage="debian9.coriolis"
bashImage="debian9.bash"

View File

@ -0,0 +1,14 @@
echo "Running /root/.bashrc"
for archDir in `ls /root/coriolis-2.x/`; do
if [ "$archDir" = "src" ]; then continue; fi
break
done
echo "Found Coriolis architecture directory \"${archDir}\"."
installDir="/root/coriolis-2.x/${archDir}/Release.Shared/install"
. ${installDir}/etc/profile.d/alc_env.sh
eval `${installDir}/etc/coriolis2/coriolisEnv.py`
export QT_X11_NO_MITSHM=1

View File

@ -205,9 +205,8 @@ class CommandArg ( object ):
class AllianceCommand ( CommandArg ): class AllianceCommand ( CommandArg ):
def __init__ ( self, fdLog=None ): def __init__ ( self, alcBin, fdLog=None ):
CommandArg.__init__ ( self, [ '/root/allianceInstaller.sh' ] CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog )
, fdLog=fdLog )
return return
@ -281,13 +280,13 @@ class Configuration ( object ):
[ 'sender' , 'receivers' [ 'sender' , 'receivers'
, 'coriolisRepo', 'benchsRepo' , 'supportRepos' , 'coriolisRepo', 'benchsRepo' , 'supportRepos'
, 'homeDir' , 'masterHost' , 'homeDir' , 'masterHost'
, 'debugArg' , 'nightlyMode', 'dockerMode' , 'debugArg' , 'nightlyMode', 'dockerMode', 'chrootMode'
, 'rmSource' , 'rmBuild' , 'rmSource' , 'rmBuild'
, 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport' , 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport'
, 'success' , 'rcode' , 'success' , 'rcode'
] ]
SecondaryNames = \ SecondaryNames = \
[ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'ccbBin', 'benchsDir' [ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'alcBin', 'ccbBin', 'benchsDir'
] ]
def __init__ ( self ): def __init__ ( self ):
@ -308,6 +307,7 @@ class Configuration ( object ):
self._doSendReport = False self._doSendReport = False
self._nightlyMode = False self._nightlyMode = False
self._dockerMode = False self._dockerMode = False
self._chrootMode = False
self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None } self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None } self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._ccbBin = None self._ccbBin = None
@ -355,11 +355,14 @@ class Configuration ( object ):
self._rootDir = self._homeDir + '/coriolis-2.x' self._rootDir = self._homeDir + '/coriolis-2.x'
self._srcDir = self._rootDir + '/src' self._srcDir = self._rootDir + '/src'
self._logDir = self._srcDir + '/logs' self._logDir = self._srcDir + '/logs'
self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py' self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs'
return return
def _detectMasterHost ( self ): def _detectMasterHost ( self ):
if self._chrootMode: return 'chrooted-host'
masterHost = 'unknown' masterHost = 'unknown'
hostname = socket.gethostname() hostname = socket.gethostname()
hostAddr = socket.gethostbyname(hostname) hostAddr = socket.gethostbyname(hostname)
@ -411,7 +414,11 @@ class Configuration ( object ):
commands = [] commands = []
if self.doAlliance: if self.doAlliance:
commands.append( AllianceCommand( fdLog=self.fds['alliance'] ) ) if not os.path.isfile( self.alcBin ):
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
, ' <%s>' % self.alcBin
] )
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) )
if self.doCoriolis: if self.doCoriolis:
if not os.path.isfile( self.ccbBin ): if not os.path.isfile( self.ccbBin ):
@ -426,20 +433,17 @@ class Configuration ( object ):
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand ( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'SL6_64' or target == 'SL6': elif target == 'SL6_64' or target == 'SL6':
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
otherArgs.append( '--devtoolset=8' ) otherArgs.append( '--devtoolset=8' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'Ubuntu18' or target == 'Debian9': elif target == 'Ubuntu18' or target == 'Debian9':
if target == 'Ubuntu18': otherArgs.append( '--qt5' ) if target == 'Ubuntu18': otherArgs.append( '--qt5' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) ) if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
return commands return commands
@ -523,6 +527,7 @@ parser.add_option ( "--do-coriolis" , action="store_true" , dest=
parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." ) parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." )
parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." ) parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." )
parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." ) parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." )
parser.add_option ( "--chroot" , action="store_true" , dest="chroot" , help="Perform a build inside a chrooted environment." )
parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." ) parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." )
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." ) parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." )
parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." ) parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." )
@ -537,6 +542,7 @@ try:
if options.debug: conf.debugArg = '--debug' if options.debug: conf.debugArg = '--debug'
if options.nightly: conf.nightlyMode = True if options.nightly: conf.nightlyMode = True
if options.docker: conf.dockerMode = True if options.docker: conf.dockerMode = True
if options.chroot: conf.chrootMode = True
if options.noGit: conf.doGit = False if options.noGit: conf.doGit = False
if options.doCoriolis: conf.doCoriolis = True if options.doCoriolis: conf.doCoriolis = True
if options.doAlliance: conf.doAlliance = True if options.doAlliance: conf.doAlliance = True

View File

@ -0,0 +1,6 @@
FROM sl7.coriolis
COPY root/dot.bashrc /root/.bashrc
CMD [ "/bin/bash", "-i" ]

View File

@ -2,6 +2,5 @@
FROM sl7.system FROM sl7.system
COPY root/socInstaller.py /root/socInstaller.py COPY root/socInstaller.py /root/socInstaller.py
COPY root/allianceInstaller.sh /root/allianceInstaller.sh RUN /root/socInstaller.py --docker --profile=SL7_64 --do-alliance --do-coriolis --benchs
CMD /root/socInstaller.py --docker --profile=SL7_64 --do-alliance --do-coriolis --benchs

View File

@ -2,6 +2,7 @@
FROM scientificlinux/sl:latest FROM scientificlinux/sl:latest
RUN yum -y update \ RUN yum -y update \
&& yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum -y install git cmake bison flex gcc-c++ libstdc++-devel \ && yum -y install git cmake bison flex gcc-c++ libstdc++-devel \
make binutils-devel \ make binutils-devel \
boost-devel boost-python boost-filesystem \ boost-devel boost-python boost-filesystem \
@ -13,9 +14,12 @@ RUN yum -y update \
libX11-devel libXt-devel libXpm-devel \ libX11-devel libXt-devel libXpm-devel \
motif motif-devel \ motif motif-devel \
\ \
python36-six \
vim-x11 \ vim-x11 \
&& yum -y install http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/qwt-6.1.2-4.fc23.x86_64.rpm \ && yum -y install http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/qwt-6.1.2-4.fc23.x86_64.rpm \
http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/qwt-devel-6.1.2-4.fc23.x86_64.rpm \ http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/qwt-devel-6.1.2-4.fc23.x86_64.rpm \
http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/yosys-0.7-1.el7.soc.x86_64.rpm \ http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/yosys-0.9-1.el7.soc.x86_64.rpm \
http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/python3-pyvcd-0.1.7-git2302c99.1.el7.soc.x86_64.rpm \
http://ftp.lip6.fr/pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS/python3-nmigen-0.1-git57d95b7.1.el7.soc.x86_64.rpm \
&& yum clean all && yum clean all

View File

@ -1,3 +1,4 @@
systemImage="sl7.system" systemImage="sl7.system"
coriolisImage="sl7.coriolis" coriolisImage="sl7.coriolis"
bashImage="sl7.bash"

View File

@ -0,0 +1,14 @@
echo "Running /root/.bashrc"
for archDir in `ls /root/coriolis-2.x/`; do
if [ "$archDir" = "src" ]; then continue; fi
break
done
echo "Found Coriolis architecture directory \"${archDir}\"."
installDir="/root/coriolis-2.x/${archDir}/Release.Shared/install"
. ${installDir}/etc/profile.d/alc_env.sh
eval `${installDir}/etc/coriolis2/coriolisEnv.py`
export QT_X11_NO_MITSHM=1

View File

@ -205,9 +205,8 @@ class CommandArg ( object ):
class AllianceCommand ( CommandArg ): class AllianceCommand ( CommandArg ):
def __init__ ( self, fdLog=None ): def __init__ ( self, alcBin, fdLog=None ):
CommandArg.__init__ ( self, [ '/root/allianceInstaller.sh' ] CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog )
, fdLog=fdLog )
return return
@ -281,13 +280,13 @@ class Configuration ( object ):
[ 'sender' , 'receivers' [ 'sender' , 'receivers'
, 'coriolisRepo', 'benchsRepo' , 'supportRepos' , 'coriolisRepo', 'benchsRepo' , 'supportRepos'
, 'homeDir' , 'masterHost' , 'homeDir' , 'masterHost'
, 'debugArg' , 'nightlyMode', 'dockerMode' , 'debugArg' , 'nightlyMode', 'dockerMode', 'chrootMode'
, 'rmSource' , 'rmBuild' , 'rmSource' , 'rmBuild'
, 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport' , 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport'
, 'success' , 'rcode' , 'success' , 'rcode'
] ]
SecondaryNames = \ SecondaryNames = \
[ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'ccbBin', 'benchsDir' [ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'alcBin', 'ccbBin', 'benchsDir'
] ]
def __init__ ( self ): def __init__ ( self ):
@ -308,6 +307,7 @@ class Configuration ( object ):
self._doSendReport = False self._doSendReport = False
self._nightlyMode = False self._nightlyMode = False
self._dockerMode = False self._dockerMode = False
self._chrootMode = None
self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None } self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None } self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._ccbBin = None self._ccbBin = None
@ -352,14 +352,19 @@ class Configuration ( object ):
if self._nightlyMode: if self._nightlyMode:
self._rootDir = self._homeDir + '/nightly/coriolis-2.x' self._rootDir = self._homeDir + '/nightly/coriolis-2.x'
else: else:
self._rootDir = self._homeDir + '/coriolis-2.x' self._rootDir = self._homeDir + '/coriolis-2.x'
self._srcDir = self._rootDir + '/src' self._srcDir = self._rootDir + '/src'
self._logDir = self._srcDir + '/logs' self._logDir = self._srcDir + '/logs'
self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py' self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs'
self._masterHost = self._detectMasterHost()
return return
def _detectMasterHost ( self ): def _detectMasterHost ( self ):
if self._chrootMode is None: return 'unknown'
if self._chrootMode: return 'chrooted-host'
masterHost = 'unknown' masterHost = 'unknown'
hostname = socket.gethostname() hostname = socket.gethostname()
hostAddr = socket.gethostbyname(hostname) hostAddr = socket.gethostbyname(hostname)
@ -411,7 +416,11 @@ class Configuration ( object ):
commands = [] commands = []
if self.doAlliance: if self.doAlliance:
commands.append( AllianceCommand( fdLog=self.fds['alliance'] ) ) if not os.path.isfile( self.alcBin ):
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
, ' <%s>' % self.alcBin
] )
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) )
if self.doCoriolis: if self.doCoriolis:
if not os.path.isfile( self.ccbBin ): if not os.path.isfile( self.ccbBin ):
@ -426,19 +435,17 @@ class Configuration ( object ):
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand ( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'SL6_64' or target == 'SL6': elif target == 'SL6_64' or target == 'SL6':
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
otherArgs.append( '--devtoolset=8' ) otherArgs.append( '--devtoolset=8' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'Ubuntu18' or target == 'Debian9': elif target == 'Ubuntu18' or target == 'Debian9':
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) if target == 'Ubuntu18': otherArgs.append( '--qt5' )
if self.doBenchs: commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
return commands return commands
@ -522,6 +529,7 @@ parser.add_option ( "--do-coriolis" , action="store_true" , dest=
parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." ) parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." )
parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." ) parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." )
parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." ) parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." )
parser.add_option ( "--chroot" , action="store_true" , dest="chroot" , help="Perform a build inside a chrooted environment." )
parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." ) parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." )
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." ) parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." )
parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." ) parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." )
@ -530,12 +538,14 @@ parser.add_option ( "--root" , action="store" , type="string", dest=
parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." ) parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." )
(options, args) = parser.parse_args () (options, args) = parser.parse_args ()
conf = Configuration() conf = Configuration()
try: try:
if options.debug: conf.debugArg = '--debug' if options.debug: conf.debugArg = '--debug'
if options.nightly: conf.nightlyMode = True if options.nightly: conf.nightlyMode = True
if options.docker: conf.dockerMode = True if options.docker: conf.dockerMode = True
if options.chroot: conf.chrootMode = True
if options.noGit: conf.doGit = False if options.noGit: conf.doGit = False
if options.doCoriolis: conf.doCoriolis = True if options.doCoriolis: conf.doCoriolis = True
if options.doAlliance: conf.doAlliance = True if options.doAlliance: conf.doAlliance = True
@ -544,6 +554,7 @@ try:
if options.rmSource or options.rmAll: conf.rmSource = True if options.rmSource or options.rmAll: conf.rmSource = True
if options.rmBuild or options.rmAll: conf.rmBuild = True if options.rmBuild or options.rmAll: conf.rmBuild = True
if conf.doAlliance: conf.openLog( 'alliance' ) if conf.doAlliance: conf.openLog( 'alliance' )
if conf.doCoriolis: conf.openLog( 'coriolis' ) if conf.doCoriolis: conf.openLog( 'coriolis' )
if conf.doBenchs: conf.openLog( 'benchs' ) if conf.doBenchs: conf.openLog( 'benchs' )

View File

@ -0,0 +1,6 @@
FROM ununtu18.coriolis
COPY root/dot.bashrc /root/.bashrc
CMD [ "/bin/bash", "-i" ]

View File

@ -2,6 +2,9 @@
FROM ubuntu18.system FROM ubuntu18.system
COPY root/socInstaller.py /root/socInstaller.py COPY root/socInstaller.py /root/socInstaller.py
COPY root/allianceInstaller.sh /root/allianceInstaller.sh RUN mkdir -p coriolis-2.x/src \
CMD /root/socInstaller.py --docker --profile=Ubuntu18 --do-alliance --do-coriolis --benchs && git clone https://github.com/m-labs/nmigen.git \
&& cd nmigen \
&& python3 setup.py develop \
&& /root/socInstaller.py --docker --profile=Ubuntu18 --do-alliance --do-coriolis --benchs

View File

@ -15,8 +15,12 @@ RUN apt-get update \
libxt-dev libxpm-dev libmotif-dev \ libxt-dev libxpm-dev libmotif-dev \
\ \
yosys \ yosys \
python3-setuptools python3-pip python3-six \
python3-wheel \
\ \
vim \ vim \
&& apt-get clean && apt-get clean \
&& pip3 install git+https://github.com/m-labs/nmigen.git
# For building with Qt 4 instead of Qt 5.
# qt4-dev-tools libqwt-dev python-qt4 \ # qt4-dev-tools libqwt-dev python-qt4 \

View File

@ -1,3 +1,4 @@
systemImage="ubuntu18.system" systemImage="ubuntu18.system"
coriolisImage="ubuntu18.coriolis" coriolisImage="ubuntu18.coriolis"
bashImage="ubuntu18.bash"

View File

@ -0,0 +1,14 @@
echo "Running /root/.bashrc"
for archDir in `ls /root/coriolis-2.x/`; do
if [ "$archDir" = "src" ]; then continue; fi
break
done
echo "Found Coriolis architecture directory \"${archDir}\"."
installDir="/root/coriolis-2.x/${archDir}/Release.Shared/install"
. ${installDir}/etc/profile.d/alc_env.sh
eval `${installDir}/etc/coriolis2/coriolisEnv.py`
export QT_X11_NO_MITSHM=1

View File

@ -205,9 +205,8 @@ class CommandArg ( object ):
class AllianceCommand ( CommandArg ): class AllianceCommand ( CommandArg ):
def __init__ ( self, fdLog=None ): def __init__ ( self, alcBin, fdLog=None ):
CommandArg.__init__ ( self, [ '/root/allianceInstaller.sh' ] CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog )
, fdLog=fdLog )
return return
@ -281,13 +280,13 @@ class Configuration ( object ):
[ 'sender' , 'receivers' [ 'sender' , 'receivers'
, 'coriolisRepo', 'benchsRepo' , 'supportRepos' , 'coriolisRepo', 'benchsRepo' , 'supportRepos'
, 'homeDir' , 'masterHost' , 'homeDir' , 'masterHost'
, 'debugArg' , 'nightlyMode', 'dockerMode' , 'debugArg' , 'nightlyMode', 'dockerMode', 'chrootMode'
, 'rmSource' , 'rmBuild' , 'rmSource' , 'rmBuild'
, 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport' , 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport'
, 'success' , 'rcode' , 'success' , 'rcode'
] ]
SecondaryNames = \ SecondaryNames = \
[ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'ccbBin', 'benchsDir' [ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'alcBin', 'ccbBin', 'benchsDir'
] ]
def __init__ ( self ): def __init__ ( self ):
@ -308,6 +307,7 @@ class Configuration ( object ):
self._doSendReport = False self._doSendReport = False
self._nightlyMode = False self._nightlyMode = False
self._dockerMode = False self._dockerMode = False
self._chrootMode = None
self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None } self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None } self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._ccbBin = None self._ccbBin = None
@ -352,14 +352,19 @@ class Configuration ( object ):
if self._nightlyMode: if self._nightlyMode:
self._rootDir = self._homeDir + '/nightly/coriolis-2.x' self._rootDir = self._homeDir + '/nightly/coriolis-2.x'
else: else:
self._rootDir = self._homeDir + '/coriolis-2.x' self._rootDir = self._homeDir + '/coriolis-2.x'
self._srcDir = self._rootDir + '/src' self._srcDir = self._rootDir + '/src'
self._logDir = self._srcDir + '/logs' self._logDir = self._srcDir + '/logs'
self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py' self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs'
self._masterHost = self._detectMasterHost()
return return
def _detectMasterHost ( self ): def _detectMasterHost ( self ):
if self._chrootMode is None: return 'unknown'
if self._chrootMode: return 'chrooted-host'
masterHost = 'unknown' masterHost = 'unknown'
hostname = socket.gethostname() hostname = socket.gethostname()
hostAddr = socket.gethostbyname(hostname) hostAddr = socket.gethostbyname(hostname)
@ -411,7 +416,11 @@ class Configuration ( object ):
commands = [] commands = []
if self.doAlliance: if self.doAlliance:
commands.append( AllianceCommand( fdLog=self.fds['alliance'] ) ) if not os.path.isfile( self.alcBin ):
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
, ' <%s>' % self.alcBin
] )
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) )
if self.doCoriolis: if self.doCoriolis:
if not os.path.isfile( self.ccbBin ): if not os.path.isfile( self.ccbBin ):
@ -426,20 +435,17 @@ class Configuration ( object ):
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand ( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'SL6_64' or target == 'SL6': elif target == 'SL6_64' or target == 'SL6':
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
otherArgs.append( '--devtoolset=8' ) otherArgs.append( '--devtoolset=8' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'Ubuntu18' or target == 'Debian9': elif target == 'Ubuntu18' or target == 'Debian9':
if target == 'Ubuntu18': otherArgs.append( '--qt5' ) if target == 'Ubuntu18': otherArgs.append( '--qt5' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) ) if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
return commands return commands
@ -523,6 +529,7 @@ parser.add_option ( "--do-coriolis" , action="store_true" , dest=
parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." ) parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." )
parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." ) parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." )
parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." ) parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." )
parser.add_option ( "--chroot" , action="store_true" , dest="chroot" , help="Perform a build inside a chrooted environment." )
parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." ) parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." )
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." ) parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." )
parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." ) parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." )
@ -531,12 +538,14 @@ parser.add_option ( "--root" , action="store" , type="string", dest=
parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." ) parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." )
(options, args) = parser.parse_args () (options, args) = parser.parse_args ()
conf = Configuration() conf = Configuration()
try: try:
if options.debug: conf.debugArg = '--debug' if options.debug: conf.debugArg = '--debug'
if options.nightly: conf.nightlyMode = True if options.nightly: conf.nightlyMode = True
if options.docker: conf.dockerMode = True if options.docker: conf.dockerMode = True
if options.chroot: conf.chrootMode = True
if options.noGit: conf.doGit = False if options.noGit: conf.doGit = False
if options.doCoriolis: conf.doCoriolis = True if options.doCoriolis: conf.doCoriolis = True
if options.doAlliance: conf.doAlliance = True if options.doAlliance: conf.doAlliance = True
@ -545,6 +554,7 @@ try:
if options.rmSource or options.rmAll: conf.rmSource = True if options.rmSource or options.rmAll: conf.rmSource = True
if options.rmBuild or options.rmAll: conf.rmBuild = True if options.rmBuild or options.rmAll: conf.rmBuild = True
if conf.doAlliance: conf.openLog( 'alliance' ) if conf.doAlliance: conf.openLog( 'alliance' )
if conf.doCoriolis: conf.openLog( 'coriolis' ) if conf.doCoriolis: conf.openLog( 'coriolis' )
if conf.doBenchs: conf.openLog( 'benchs' ) if conf.doBenchs: conf.openLog( 'benchs' )

View File

@ -1,12 +1,14 @@
#!/bin/bash #!/bin/bash
showHelp=0 showHelp=0
showError=0 showError=0
doBuildSystem=0 doBuildSystem=0
doBuild=0 doBuildCoriolis=0
doRun=0 doBuildBash=0
doClean=0 doBuild=0
doRun=0
doRemove=0
if [ ! -f "./docker-conf.sh" ]; then if [ ! -f "./docker-conf.sh" ]; then
@ -15,24 +17,25 @@
exit 1 exit 1
fi fi
. "./docker-conf.sh" . "./docker-conf.sh"
dockerImages="${systemImage},${coriolisImage}" dockerImages="${systemImage},${coriolisImage},${bashImage}"
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case $1 in case $1 in
--help) showHelp=1;; --help) showHelp=1;;
--system) doBuildSystem=1;; --build-system) doBuildSystem=1;;
--build) doBuild=1;; --build-coriolis) doBuildCoriolis=1;;
--run) doRun=1;; --build-bash) doBuildBash=1;;
--clean) doClean=1;; --run) doRun=1;;
--remove) doRemove=1;;
-*) NB=2; CH=`echo $1 | cut -c$NB` -*) NB=2; CH=`echo $1 | cut -c$NB`
while [ "$CH" != "" ]; do while [ "$CH" != "" ]; do
case $CH in case $CH in
h) showHelp=1;; h) showHelp=1;;
S) doBuildSystem=1;; s) doBuildSystem=1;;
b) doBuild=1;; c) doBuildCoriolis=1;;
b) doBuildBash=1;;
r) doRun=1;; r) doRun=1;;
C) doClean=1;;
*) showError=1; badOption="$1";; *) showError=1; badOption="$1";;
esac esac
NB=`expr $NB + 1` NB=`expr $NB + 1`
@ -51,25 +54,49 @@
if [ ${showHelp} -ne 0 ]; then if [ ${showHelp} -ne 0 ]; then
echo "Usage: ./manager.sh [options]" echo "Usage: ./manager.sh [options]"
echo "Options:" echo "Options:"
echo " * [-h|--help]: Print this help." echo " * [-h|--help]: Print this help."
echo " * [-S|--system]: Rebuild the whole OS image." echo " * [-s|--build-system]: Rebuild the whole OS image."
echo " * [-b|--build]: Rebuild the Coriolis image. It will remove the previous" echo " * [-c|--build-coriolis]: Rebuild the Coriolis image. It will remove the previous"
echo " images (${dockerImages})." echo " images (${dockerImages})."
echo " * [-r|--run]: Recompile Alliance, Coriolis & perform benchs." echo " * [-b|--build-bash]: Rebuild the Bash (shell) image. It will remove the previous"
echo " * [-C|--clean]: Remove container(s) & image(s)." echo " image (${bashImage})."
echo " * [-r|--run]: Recompile Alliance, Coriolis & perform benchs."
echo " * [--remove]: Remove container(s) & image(s)."
exit 0 exit 0
fi fi
if [ ${doBuild} -ne 0 ] || [ ${doBuildSytem} -ne 0 ]; then if [ ${doBuildSystem} -ne 0 ]; then
doClean=1 doBuildBash=1
doBuildCoriolis=1
doBuild=1
doRemove=1
fi
if [ ${doBuildCoriolis} -ne 0 ]; then
doBuildBash=1
doBuild=1
doRemove=1
fi
if [ ${doBuildBash} -ne 0 ]; then
doBuild=1
doRemove=1
fi fi
if [ ${doClean} -ne 0 ]; then if [ ${doRemove} -ne 0 ]; then
echo "Removing \"${coriolisImage}\" docker container." if [ ${doBuildBash} -ne 0 ]; then
docker rm ${coriolisImage} echo "Removing \"${bashImage}\" docker container."
docker rmi ${coriolisImage} docker rm ${bashImage}
docker rmi ${bashImage}
fi
if [ ${doBuildCoriolis} -ne 0 ]; then
echo "Removing \"${coriolisImage}\" docker image."
docker rm ${coriolisImage}
docker rmi ${coriolisImage}
fi
if [ ${doBuildSystem} -ne 0 ]; then if [ ${doBuildSystem} -ne 0 ]; then
echo "Removing \"${systemImage}\" docker image." echo "Removing \"${systemImage}\" docker image."
@ -82,18 +109,25 @@
if [ ${doBuild} -ne 0 ]; then if [ ${doBuild} -ne 0 ]; then
echo "Synching Alliance & Coriolis builder scripts." echo "Synching Alliance & Coriolis builder scripts."
cp ../../socInstaller.py ./root cp ../../socInstaller.py ./root
cp ../../allianceInstaller.sh ./root cp ../../dot.bashrc ./root
if [ ${doBuildSystem} -ne 0 ]; then if [ ${doBuildSystem} -ne 0 ]; then
echo "Build \"${systemImage}\" docker image." echo "Build \"${systemImage}\" docker image."
docker build -f Dockerfile.system -t ${systemImage} . docker build -f Dockerfile.system -t ${systemImage} .
fi fi
echo "Build \"${coriolisImage}\" docker image." if [ ${doBuildCoriolis} -ne 0 ]; then
docker build -f Dockerfile.coriolis -t ${coriolisImage} . echo "Build \"${coriolisImage}\" docker image."
docker build -f Dockerfile.coriolis -t ${coriolisImage} .
fi
if [ ${doBuildCoriolis} -ne 0 ]; then
echo "Build \"${bashImage}\" docker image."
docker build -f Dockerfile.bash -t ${bashImage} .
fi
fi fi
if [ ${doRun} -ne 0 ]; then if [ ${doRun} -ne 0 ]; then
docker run --name ${coriolisImage} ${coriolisImage} docker run --rm --net=host -e DISPLAY=:0 -ti --name ${bashImage} ${bashImage}
fi fi

14
bootstrap/dot.bashrc Normal file
View File

@ -0,0 +1,14 @@
echo "Running /root/.bashrc"
for archDir in `ls /root/coriolis-2.x/`; do
if [ "$archDir" = "src" ]; then continue; fi
break
done
echo "Found Coriolis architecture directory \"${archDir}\"."
installDir="/root/coriolis-2.x/${archDir}/Release.Shared/install"
. ${installDir}/etc/profile.d/alc_env.sh
eval `${installDir}/etc/coriolis2/coriolisEnv.py`
export QT_X11_NO_MITSHM=1

View File

@ -205,9 +205,8 @@ class CommandArg ( object ):
class AllianceCommand ( CommandArg ): class AllianceCommand ( CommandArg ):
def __init__ ( self, fdLog=None ): def __init__ ( self, alcBin, fdLog=None ):
CommandArg.__init__ ( self, [ '/root/allianceInstaller.sh' ] CommandArg.__init__ ( self, [ alcBin ], fdLog=fdLog )
, fdLog=fdLog )
return return
@ -281,13 +280,13 @@ class Configuration ( object ):
[ 'sender' , 'receivers' [ 'sender' , 'receivers'
, 'coriolisRepo', 'benchsRepo' , 'supportRepos' , 'coriolisRepo', 'benchsRepo' , 'supportRepos'
, 'homeDir' , 'masterHost' , 'homeDir' , 'masterHost'
, 'debugArg' , 'nightlyMode', 'dockerMode' , 'debugArg' , 'nightlyMode', 'dockerMode', 'chrootMode'
, 'rmSource' , 'rmBuild' , 'rmSource' , 'rmBuild'
, 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport' , 'doGit' , 'doAlliance' , 'doCoriolis', 'doBenchs', 'doSendReport'
, 'success' , 'rcode' , 'success' , 'rcode'
] ]
SecondaryNames = \ SecondaryNames = \
[ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'ccbBin', 'benchsDir' [ 'rootDir', 'srcDir', 'logDir', 'logs', 'fds', 'alcBin', 'ccbBin', 'benchsDir'
] ]
def __init__ ( self ): def __init__ ( self ):
@ -308,6 +307,7 @@ class Configuration ( object ):
self._doSendReport = False self._doSendReport = False
self._nightlyMode = False self._nightlyMode = False
self._dockerMode = False self._dockerMode = False
self._chrootMode = None
self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None } self._logs = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None } self._fds = { 'alliance':None, 'coriolis':None, 'benchs':None }
self._ccbBin = None self._ccbBin = None
@ -352,14 +352,19 @@ class Configuration ( object ):
if self._nightlyMode: if self._nightlyMode:
self._rootDir = self._homeDir + '/nightly/coriolis-2.x' self._rootDir = self._homeDir + '/nightly/coriolis-2.x'
else: else:
self._rootDir = self._homeDir + '/coriolis-2.x' self._rootDir = self._homeDir + '/coriolis-2.x'
self._srcDir = self._rootDir + '/src' self._srcDir = self._rootDir + '/src'
self._logDir = self._srcDir + '/logs' self._logDir = self._srcDir + '/logs'
self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py' self._alcBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/allianceInstaller.sh'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs' self._ccbBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/ccb.py'
self._benchsDir = self._srcDir + '/' + GitRepository.getLocalRepository(self._benchsRepo ) + '/benchs'
self._masterHost = self._detectMasterHost()
return return
def _detectMasterHost ( self ): def _detectMasterHost ( self ):
if self._chrootMode is None: return 'unknown'
if self._chrootMode: return 'chrooted-host'
masterHost = 'unknown' masterHost = 'unknown'
hostname = socket.gethostname() hostname = socket.gethostname()
hostAddr = socket.gethostbyname(hostname) hostAddr = socket.gethostbyname(hostname)
@ -411,7 +416,11 @@ class Configuration ( object ):
commands = [] commands = []
if self.doAlliance: if self.doAlliance:
commands.append( AllianceCommand( fdLog=self.fds['alliance'] ) ) if not os.path.isfile( self.alcBin ):
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
, ' <%s>' % self.alcBin
] )
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) )
if self.doCoriolis: if self.doCoriolis:
if not os.path.isfile( self.ccbBin ): if not os.path.isfile( self.ccbBin ):
@ -426,20 +435,17 @@ class Configuration ( object ):
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand ( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'SL6_64' or target == 'SL6': elif target == 'SL6_64' or target == 'SL6':
otherArgs.append( '--project=support' ) otherArgs.append( '--project=support' )
otherArgs.append( '--devtoolset=8' ) otherArgs.append( '--devtoolset=8' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
elif target == 'Ubuntu18' or target == 'Debian9': elif target == 'Ubuntu18' or target == 'Debian9':
if target == 'Ubuntu18': otherArgs.append( '--qt5' ) if target == 'Ubuntu18': otherArgs.append( '--qt5' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) ) if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
return commands return commands
@ -523,6 +529,7 @@ parser.add_option ( "--do-coriolis" , action="store_true" , dest=
parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." ) parser.add_option ( "--do-report" , action="store_true" , dest="doReport" , help="Send a final report." )
parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." ) parser.add_option ( "--nightly" , action="store_true" , dest="nightly" , help="Perform a nighly build." )
parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." ) parser.add_option ( "--docker" , action="store_true" , dest="docker" , help="Perform a build inside a docker container." )
parser.add_option ( "--chroot" , action="store_true" , dest="chroot" , help="Perform a build inside a chrooted environment." )
parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." ) parser.add_option ( "--benchs" , action="store_true" , dest="benchs" , help="Run the <alliance-checker-toolkit> sanity benchs." )
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." ) parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove the build/install directories." )
parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." ) parser.add_option ( "--rm-source" , action="store_true" , dest="rmSource" , help="Remove the Git source repositories." )
@ -531,12 +538,14 @@ parser.add_option ( "--root" , action="store" , type="string", dest=
parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." ) parser.add_option ( "--profile" , action="store" , type="string", dest="profile" , help="The targeted OS for the build." )
(options, args) = parser.parse_args () (options, args) = parser.parse_args ()
conf = Configuration() conf = Configuration()
try: try:
if options.debug: conf.debugArg = '--debug' if options.debug: conf.debugArg = '--debug'
if options.nightly: conf.nightlyMode = True if options.nightly: conf.nightlyMode = True
if options.docker: conf.dockerMode = True if options.docker: conf.dockerMode = True
if options.chroot: conf.chrootMode = True
if options.noGit: conf.doGit = False if options.noGit: conf.doGit = False
if options.doCoriolis: conf.doCoriolis = True if options.doCoriolis: conf.doCoriolis = True
if options.doAlliance: conf.doAlliance = True if options.doAlliance: conf.doAlliance = True
@ -545,6 +554,7 @@ try:
if options.rmSource or options.rmAll: conf.rmSource = True if options.rmSource or options.rmAll: conf.rmSource = True
if options.rmBuild or options.rmAll: conf.rmBuild = True if options.rmBuild or options.rmAll: conf.rmBuild = True
if conf.doAlliance: conf.openLog( 'alliance' ) if conf.doAlliance: conf.openLog( 'alliance' )
if conf.doCoriolis: conf.openLog( 'coriolis' ) if conf.doCoriolis: conf.openLog( 'coriolis' )
if conf.doBenchs: conf.openLog( 'benchs' ) if conf.doBenchs: conf.openLog( 'benchs' )