Check Mac silicon package name (#14898)

### Description
1. add comments 
2. check Mac silicon package name 

### Motivation and Context
There isn't Mac silicon Agent in ADO.
We couldn't add smoking test to test the wheel can be installed.
But We can check whether the package name is correct to avoid the
mistake in 1.14 release.

Test run

https://dev.azure.com/aiinfra/Lotus/_build/results?buildId=283100&view=logs&j=fe710151-df7c-5aa4-0cea-cf5331faa499&t=3182cefe-2612-53c6-4445-e5b3e0c4ac57
This commit is contained in:
Yi Zhang 2023-03-03 18:27:54 +08:00 committed by GitHub
parent a997bb46b6
commit 8c454a76e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -397,6 +397,9 @@ stages:
system_profiler SPSoftwareDataType SPHardwareDataType
displayName: 'Mac machine info'
# Don't remove _PYTHON_HOST_PLATFORM, it's used to generate correct package name
# Setting _PYTHON_HOST_PLATFORM overwrites the value return by get_platform()
# Ref: https://wiki.debian.org/Python/MultiArch
- script: |
set -e -x
pushd .
@ -415,8 +418,14 @@ stages:
displayName: 'Command Line Script'
- script: |
set -ex
python -m pip install --upgrade delocate
cd '$(Build.BinariesDirectory)/Release/dist'
ls
for file in *.whl
do
[[ "$file" == *arm64* ]] || ( echo "Mac Silicon package name is NOT correct" && exit 1)
done
for file in *.whl
do
delocate-listdeps "$file"
@ -487,4 +496,4 @@ stages:
arch: 'x86_64'
machine_pool: 'Linux-CPU'
${{ if contains(parameters.build_py_parameters, '--use_azure') }}:
device: '-d AZURE'
device: '-d AZURE'