@@ -41,6 +41,12 @@ def literal_unicode_representer(dumper, data):
4141export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
4242.scripts/build_osx.sh""" )
4343
44+ azure_osx_arm64_script = literal_unicode (r"""\
45+ export CI=azure
46+ export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
47+ export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
48+ .scripts/build_osx_arm64.sh""" )
49+
4450azure_win_preconfig_script = literal_unicode ("""\
4551 set "CI=azure"
4652call %CONDA%\\ condabin\\ conda_hook.bat
@@ -346,11 +352,6 @@ def main():
346352 stages = []
347353 requirements = []
348354
349- azure_template = {"pool" : {"vmImage" : "ubuntu-16.04" }}
350-
351- azure_stages = []
352-
353- stage_names = []
354355
355356 # filter out packages that we are not actually building
356357 filtered_stages = []
@@ -362,6 +363,12 @@ def main():
362363 stages = batch_stages (filtered_stages )
363364 print (stages )
364365
366+ # Build Linux pipeline
367+ azure_template = {"pool" : {"vmImage" : "ubuntu-16.04" }}
368+
369+ azure_stages = []
370+
371+ stage_names = []
365372 for i , s in enumerate (stages ):
366373 stage_name = f"stage_{ i } "
367374 stage = {"stage" : stage_name , "jobs" : []}
@@ -399,6 +406,7 @@ def main():
399406 with open ("linux.yml" , "w" ) as fo :
400407 fo .write (yaml .dump (azure_template , sort_keys = False ))
401408
409+ # Build OSX pipeline
402410 azure_template = {"pool" : {"vmImage" : "macOS-10.15" }}
403411
404412 azure_stages = []
@@ -436,10 +444,52 @@ def main():
436444 if azure_stages :
437445 azure_template ["stages" ] = azure_stages
438446
439- if args .platform . startswith ( "osx" ) and len (azure_stages ):
447+ if args .platform == "osx-64" and len (azure_stages ):
440448 with open ("osx.yml" , "w" ) as fo :
441449 fo .write (yaml .dump (azure_template , sort_keys = False ))
442450
451+ # Build OSX-arm64 pipeline
452+ azure_template = {"pool" : {"vmImage" : "macOS-10.15" }}
453+
454+ azure_stages = []
455+
456+ stage_names = []
457+ for i , s in enumerate (stages ):
458+ stage_name = f"stage_{ i } "
459+ stage = {"stage" : stage_name , "jobs" : []}
460+ stage_names .append (stage_name )
461+
462+ for batch in s :
463+ pkg_jobname = '_' .join ([normalize_name (pkg ) for pkg in batch ])
464+ stage ["jobs" ].append (
465+ {
466+ "job" : pkg_jobname ,
467+ "steps" : [
468+ {
469+ "script" : azure_osx_arm64_script ,
470+ "env" : {
471+ "ANACONDA_API_TOKEN" : "$(ANACONDA_API_TOKEN)" ,
472+ "CURRENT_RECIPES" : f"{ ' ' .join ([pkg for pkg in batch ])} "
473+ },
474+ "displayName" : f"Build { ' ' .join ([pkg for pkg in batch ])} " ,
475+ }
476+ ],
477+ }
478+ )
479+
480+ if len (stage ["jobs" ]) != 0 :
481+ # all packages skipped ...
482+ azure_stages .append (stage )
483+
484+ azure_template ["trigger" ] = [args .trigger_branch ]
485+ azure_template ["pr" ] = "none"
486+ if azure_stages :
487+ azure_template ["stages" ] = azure_stages
488+
489+ if args .platform == "osx-arm64" and len (azure_stages ):
490+ with open ("osx-arm64.yml" , "w" ) as fo :
491+ fo .write (yaml .dump (azure_template , sort_keys = False ))
492+
443493 # Build aarch64 pipeline
444494 azure_template = {
445495 "pool" : {
0 commit comments