@@ -41,6 +41,12 @@ def literal_unicode_representer(dumper, data):
41
41
export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
42
42
.scripts/build_osx.sh""" )
43
43
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
+
44
50
azure_win_preconfig_script = literal_unicode ("""\
45
51
set "CI=azure"
46
52
call %CONDA%\\ condabin\\ conda_hook.bat
@@ -346,11 +352,6 @@ def main():
346
352
stages = []
347
353
requirements = []
348
354
349
- azure_template = {"pool" : {"vmImage" : "ubuntu-16.04" }}
350
-
351
- azure_stages = []
352
-
353
- stage_names = []
354
355
355
356
# filter out packages that we are not actually building
356
357
filtered_stages = []
@@ -362,6 +363,12 @@ def main():
362
363
stages = batch_stages (filtered_stages )
363
364
print (stages )
364
365
366
+ # Build Linux pipeline
367
+ azure_template = {"pool" : {"vmImage" : "ubuntu-16.04" }}
368
+
369
+ azure_stages = []
370
+
371
+ stage_names = []
365
372
for i , s in enumerate (stages ):
366
373
stage_name = f"stage_{ i } "
367
374
stage = {"stage" : stage_name , "jobs" : []}
@@ -399,6 +406,7 @@ def main():
399
406
with open ("linux.yml" , "w" ) as fo :
400
407
fo .write (yaml .dump (azure_template , sort_keys = False ))
401
408
409
+ # Build OSX pipeline
402
410
azure_template = {"pool" : {"vmImage" : "macOS-10.15" }}
403
411
404
412
azure_stages = []
@@ -436,10 +444,52 @@ def main():
436
444
if azure_stages :
437
445
azure_template ["stages" ] = azure_stages
438
446
439
- if args .platform . startswith ( "osx" ) and len (azure_stages ):
447
+ if args .platform == "osx-64" and len (azure_stages ):
440
448
with open ("osx.yml" , "w" ) as fo :
441
449
fo .write (yaml .dump (azure_template , sort_keys = False ))
442
450
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
+
443
493
# Build aarch64 pipeline
444
494
azure_template = {
445
495
"pool" : {
0 commit comments