2 Commits

Author SHA1 Message Date
Ralph Lange
393a470d05 appveyor: add CMP doc to README 2020-04-22 10:25:18 +02:00
Ralph Lange
519b75aef2 appveyor: use pre-installed strawberry perl on vs2019 image 2020-04-22 10:25:18 +02:00
3 changed files with 13 additions and 25 deletions

View File

@@ -377,7 +377,7 @@ class TestSetupForBuild(unittest.TestCase):
def test_StrawberryInPath(self): def test_StrawberryInPath(self):
os.environ['CMP'] = 'vs2019' os.environ['CMP'] = 'vs2019'
do.setup_for_build(self.args) do.setup_for_build(self.args)
self.assertTrue(re.search('strawberry', os.environ['PATH']), self.assertTrue(re.search('strawberry', os.environ['PATH'], flags=re.IGNORECASE),
'Strawberry Perl location not in PATH for vs2019') 'Strawberry Perl location not in PATH for vs2019')

View File

@@ -38,10 +38,12 @@
Select 32bit or 64bit processor architecture. Select 32bit or 64bit processor architecture.
3. `environment: / matrix:` \ 3. `environment: / matrix:` \
List of environment variable settings. Each list element (starting with List of environment variable settings. Each list element (starting with
a dash) is one step on the axis of the build matrix. a dash) is one step on the axis of the build matrix. \
Set `CMP` to select the compiler: `mingw` for the native
Your builds will take long. [MinGW](http://mingw-w64.org/) GNU compiler, `vs2008` ...`vs2019`
(options listed above) for the Microsoft Visual Studio compilers.
Your builds will take long. \
AppVeyor only grants a single worker VM - all jobs of the matrix are AppVeyor only grants a single worker VM - all jobs of the matrix are
executed sequentially. Each job will take around 10 minutes. executed sequentially. Each job will take around 10 minutes.

View File

@@ -355,9 +355,9 @@ def setup_for_build(args):
os.environ['EPICS_HOST_ARCH'] = 'windows-x64' + hostarchsuffix os.environ['EPICS_HOST_ARCH'] = 'windows-x64' + hostarchsuffix
if os.environ['CMP'] == 'vs2019': if os.environ['CMP'] == 'vs2019':
# put our strawberry 'perl' in the PATH # put strawberry perl in the PATH
os.environ['PATH'] = os.pathsep.join([os.path.join(toolsdir, 'strawberry', 'perl', 'site', 'bin'), os.environ['PATH'] = os.pathsep.join([os.path.join(r'C:\Strawberry\perl\site\bin'),
os.path.join(toolsdir, 'strawberry', 'perl', 'bin'), os.path.join(r'C:\Strawberry\perl\bin'),
os.environ['PATH']]) os.environ['PATH']])
if os.environ['CMP'] == 'mingw': if os.environ['CMP'] == 'mingw':
if 'INCLUDE' not in os.environ: if 'INCLUDE' not in os.environ:
@@ -468,20 +468,6 @@ def prepare(args):
sp.check_call([zip7, 'e', 'make-{0}.zip'.format(makever)], cwd=toolsdir) sp.check_call([zip7, 'e', 'make-{0}.zip'.format(makever)], cwd=toolsdir)
os.remove(os.path.join(toolsdir, 'make-{0}.zip'.format(makever))) os.remove(os.path.join(toolsdir, 'make-{0}.zip'.format(makever)))
perlver = '5.30.0.1'
if os.environ['CMP'] == 'vs2019':
if not os.path.isdir(os.path.join(toolsdir, 'strawberry')):
print('Installing Strawberry Perl {0}'.format(perlver))
sys.stdout.flush()
sp.check_call(['curl', '-fsS', '--retry', '3', '-o', 'perl-{0}.zip'.format(perlver),
'http://strawberryperl.com/download/{0}/strawberry-perl-{0}-64bit.zip'.format(perlver)],
cwd=toolsdir)
sp.check_call([zip7, 'x', 'perl-{0}.zip'.format(perlver), '-ostrawberry'], cwd=toolsdir)
os.remove(os.path.join(toolsdir, 'perl-{0}.zip'.format(perlver)))
with open(os.devnull, 'w') as devnull:
sp.check_call('relocation.pl.bat', shell=True, stdout=devnull,
cwd=os.path.join(toolsdir, 'strawberry'))
setup_for_build(args) setup_for_build(args)
print('{0}EPICS_HOST_ARCH = {1}{2}'.format(ANSI_CYAN, os.environ['EPICS_HOST_ARCH'], ANSI_RESET)) print('{0}EPICS_HOST_ARCH = {1}{2}'.format(ANSI_CYAN, os.environ['EPICS_HOST_ARCH'], ANSI_RESET))