Skip to content

[DNM] Release/test mac m1 #1146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,32 @@ jobs:
pythonVersion: '$(pythonVersion)'
workerPath: '$(workerPath)'
artifactName: '$(pythonVersion)_OSX_X64'
- job: Build_OSX_ARM64
pool:
vmImage: 'macOS-12'
strategy:
matrix:
Python37V4:
pythonVersion: '3.7'
workerPath: $(PROD_V4_WORKER_PY)
Python38V4:
pythonVersion: '3.8'
workerPath: $(PROD_V4_WORKER_PY)
Python39V4:
pythonVersion: '3.9'
workerPath: $(PROD_V4_WORKER_PY)
Python310V4:
pythonVersion: '3.10'
workerPath: $(PROD_V4_WORKER_PY)
steps:
- template: pack/templates/mac_m1_env_gen.yml
parameters:
pythonVersion: '$(pythonVersion)'
workerPath: '$(workerPath)'
artifactName: '$(pythonVersion)_OSX_ARM64'

- job: PackageWorkers
dependsOn: ['Build_WINDOWS_X64', 'Build_WINDOWS_X86', 'Build_LINUX_X64', 'Build_OSX_X64']
dependsOn: ['Build_WINDOWS_X64', 'Build_WINDOWS_X86', 'Build_LINUX_X64', 'Build_OSX_X64', 'Build_OSX_ARM64']
condition: or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/dev'))
pool:
name: '1ES-Hosted-AzFunc'
Expand Down
13 changes: 13 additions & 0 deletions pack/scripts/mac_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

python -m venv .env
source .env/bin/activate
python -m pip install --upgrade pip

#python -m pip install .

python -m pip install . \
--platform manylinux_2_17_aarch64 \
--platform macosx_10_9_universal2 \
--only-binary=:all: \
--target "$BUILD_SOURCESDIRECTORY/deps" \
32 changes: 32 additions & 0 deletions pack/templates/mac_m1_env_gen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
parameters:
pythonVersion: ''
artifactName: ''
workerPath: ''

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.pythonVersion }}
addToPath: true
- task: ShellScript@2
inputs:
disableAutoCwd: true
scriptPath: 'pack/scripts/mac_deps.sh'
- task: CopyFiles@2
inputs:
contents: |
${{ parameters.workerPath }}
targetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)/deps'
contents: |
**
!grpc_tools/**/*
!grpcio_tools*/*
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: ${{ parameters.artifactName }}