Skip to content

Commit

Permalink
try add ARM path for MacOS
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Mar 27, 2022
1 parent 3828130 commit a9a8432
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion scripts/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ variables:
Minor: '8'
Patch: '16'
NightlyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId)-$(Build.DefinitionName)
MacFlags: 'CXXFLAGS="-arch arm64 -arch x86_64" LINK_EXTRA_FLAGS="-arch arm64 -arch x86_64" SLINK_EXTRA_FLAGS="-arch arm64 -arch x86_64" FPMATH_ENABLED=False'
MacFlags: 'CXXFLAGS="-arch x86_64" LINK_EXTRA_FLAGS="-arch x86_64" SLINK_EXTRA_FLAGS="-arch x86_64"
MacArmFlags: 'CXXFLAGS="-arch arm64" LINK_EXTRA_FLAGS="-arch arm64" SLINK_EXTRA_FLAGS="-arch arm64" FPMATH_ENABLED=False'

stages:
- stage: Build
Expand All @@ -24,6 +25,20 @@ stages:
artifactName: 'Mac'
targetPath: $(Build.ArtifactStagingDirectory)

- job: MacArm
displayName: "Mac Build"
pool:
vmImage: "macOS-latest"
steps:
- script: $(MacArmFlags) python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
- script: git clone https://github.com/z3prover/z3test z3test
- script: python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
- script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
- task: PublishPipelineArtifact@1
inputs:
artifactName: 'MacArm'
targetPath: $(Build.ArtifactStagingDirectory)

- job: Ubuntu
displayName: "Ubuntu build"
pool:
Expand Down Expand Up @@ -165,6 +180,11 @@ stages:
inputs:
artifact: 'Mac'
path: $(Agent.TempDirectory)\package
- task: DownloadPipelineArtifact@2
displayName: 'Download macOS ARM Build'
inputs:
artifact: 'MacArm'
path: $(Agent.TempDirectory)\package
- task: NuGetToolInstaller@0
inputs:
versionSpec: 5.x
Expand Down Expand Up @@ -392,6 +412,24 @@ stages:
artifactName: 'Python packages'
targetPath: src/api/python/dist

- job: PythonArm
displayName: "Python Arm packaging"
pool:
vmImage: "ubuntu-latest"
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'MacArm'
targetPath: $(Agent.TempDirectory)
- script: cd $(Agent.TempDirectory); mkdir osx-arm-bin; cd osx-arm-bin; unzip ../*osx*.zip
- script: python3 -m pip install --user -U setuptools wheel
- script: cd src/api/python; python3 setup.py sdist
- script: cd src/api/python; echo $(Agent.TempDirectory)/osx-arm-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Python Arm packages'
targetPath: src/api/python/dist

- stage: Deployment
jobs:
- job: Deploy
Expand Down Expand Up @@ -430,6 +468,11 @@ stages:
inputs:
artifactName: 'Python packages'
targetPath: tmp
- task: DownloadPipelineArtifact@2
displayName: "Download Python Arm"
inputs:
artifactName: 'Python Arm packages'
targetPath: tmp
- task: DownloadPipelineArtifact@2
displayName: "Download NuGet"
inputs:
Expand Down

0 comments on commit a9a8432

Please sign in to comment.