Skip to content

Commit

Permalink
ci/macOS: debug macOS13 dependency issue
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Stanea <[email protected]>
  • Loading branch information
Adrian-Stanea committed Nov 20, 2023
1 parent 9c09ca8 commit b56385f
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 133 deletions.
13 changes: 10 additions & 3 deletions CI/macOS/install_deps
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
TOP_DIR=$(pwd)
LIBIIO_VERSION=libiio-v0

set -x
set -ex

# Note: not installing 'mono', it comes with Azure images,
# but it doesn't look it's installed with Homebrew
brew install cmake doxygen libusb libxml2 swig curl python
# if [[ $VMIMAGE == "macOS-13" ]]; then
# brew install python-tk
# brew install python-gdbm
# fi

# libiio deps
brew install doxygen libusb libxml2 ncurses cdk libserialport sphinx-doc pkg-config
brew install doxygen libusb libxml2 ncurses cdk libserialport sphinx-doc pkg-config zstd

brew install cmake doxygen libusb libxml2 swig curl # python

pip3 install sphinx

pip3 install wheel twine build virtualenv
Expand Down
265 changes: 135 additions & 130 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,65 +33,65 @@ parameters:
- 3.7

jobs:
- job: LinuxBuilds
strategy:
matrix:
ubuntu_20_04:
imageName: 'ubuntu-20.04'
OS_TYPE: 'ubuntu_docker'
OS_VERSION: focal
artifactName: 'Linux-Ubuntu-20.04'
PACKAGE_TO_INSTALL: 'build/*.deb'
ubuntu_22_04:
imageName: 'ubuntu-22.04'
OS_TYPE: 'ubuntu_docker'
OS_VERSION: jammy
artifactName: 'Linux-Ubuntu-22.04'
PACKAGE_TO_INSTALL: 'build/*.deb'
deploy_doxygen:
imageName: 'ubuntu-20.04'
OS_TYPE: 'doxygen'
OS_VERSION: focal
artifactName: 'Linux-Ubuntu-20.04'
PACKAGE_TO_INSTALL: 'build/*.deb'
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 1
clean: true
persistCredentials: true
- script: ./CI/ubuntu/install_deps
displayName: "Install Dependencies"
- script: ./CI/ubuntu/make_linux
displayName: "Build"
- task: CopyFiles@2
condition: ne(variables['System.JobName'], 'deploy_doxygen')
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/build/'
contents: '$(Agent.BuildDirectory)/s/build/?(*.deb|*.rpm)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'), ne(variables['System.JobName'], 'deploy_doxygen'))
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(artifactName)'
# - job: LinuxBuilds
# strategy:
# matrix:
# ubuntu_20_04:
# imageName: 'ubuntu-20.04'
# OS_TYPE: 'ubuntu_docker'
# OS_VERSION: focal
# artifactName: 'Linux-Ubuntu-20.04'
# PACKAGE_TO_INSTALL: 'build/*.deb'
# ubuntu_22_04:
# imageName: 'ubuntu-22.04'
# OS_TYPE: 'ubuntu_docker'
# OS_VERSION: jammy
# artifactName: 'Linux-Ubuntu-22.04'
# PACKAGE_TO_INSTALL: 'build/*.deb'
# deploy_doxygen:
# imageName: 'ubuntu-20.04'
# OS_TYPE: 'doxygen'
# OS_VERSION: focal
# artifactName: 'Linux-Ubuntu-20.04'
# PACKAGE_TO_INSTALL: 'build/*.deb'
# pool:
# vmImage: $(imageName)
# steps:
# - checkout: self
# fetchDepth: 1
# clean: true
# persistCredentials: true
# - script: ./CI/ubuntu/install_deps
# displayName: "Install Dependencies"
# - script: ./CI/ubuntu/make_linux
# displayName: "Build"
# - task: CopyFiles@2
# condition: ne(variables['System.JobName'], 'deploy_doxygen')
# inputs:
# sourceFolder: '$(Agent.BuildDirectory)/s/build/'
# contents: '$(Agent.BuildDirectory)/s/build/?(*.deb|*.rpm)'
# targetFolder: '$(Build.ArtifactStagingDirectory)'
# - task: PublishPipelineArtifact@1
# condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'), ne(variables['System.JobName'], 'deploy_doxygen'))
# inputs:
# targetPath: '$(Build.ArtifactStagingDirectory)'
# artifactName: '$(artifactName)'

- job: macOSBuilds
workspace:
clean: all
strategy:
matrix:
macOS_11:
poolName: 'Azure Pipelines'
vmImage: 'macOS-11'
agentName: 'Azure Pipelines 4'
artifactName: 'macOS-11'
macOS_12:
poolName: 'Azure Pipelines'
vmImage: 'macOS-12'
agentName: 'Azure Pipelines 3'
artifactName: 'macOS-12'
# macOS_11:
# poolName: 'Azure Pipelines'
# vmImage: 'macOS-11'
# agentName: 'Azure Pipelines 4'
# artifactName: 'macOS-11'
# macOS_12:
# poolName: 'Azure Pipelines'
# vmImage: 'macOS-12'
# agentName: 'Azure Pipelines 3'
# artifactName: 'macOS-12'
macOS_13_x64:
poolName: 'Azure Pipelines'
vmImage: 'macOS-13'
Expand All @@ -114,6 +114,11 @@ jobs:
- checkout: self
fetchDepth: 1
clean: true
- task: UsePythonVersion@0
# condition: ne(variables['agentName'],'miniMAC_arm64') # take from libiio
inputs:
versionSpec: '3.x'
addToPath: true
- script: ./CI/macOS/install_deps
displayName: "Install Dependencies"
condition: ne(variables['agentName'],'macOS_arm64')
Expand Down Expand Up @@ -164,85 +169,85 @@ jobs:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: $(TWINE_PASSWORD)
- job: WindowsBuilds
workspace:
clean: all
strategy:
matrix:
VS_2022:
poolName: 'Azure Pipelines'
vmImage: 'windows-2022'
COMPILER: 'Visual Studio 17 2022'
ARCH: 'x64'
PLATFORM: 'win64'
artifactName: 'Windows-VS-2022-x64'
VS_2019:
poolName: 'Azure Pipelines'
vmImage: 'windows-2019'
COMPILER: 'Visual Studio 16 2019'
ARCH: 'x64'
PLATFORM: 'win64'
artifactName: 'Windows-VS-2019-x64'
pool:
vmImage: $[ variables['vmImage'] ]
steps:
- checkout: self
fetchDepth: 1
clean: true
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- task: PowerShell@2
displayName: 'Install Dependencies'
inputs:
targetType: filePath
filePath: ./CI/windows/install_deps.ps1
- task: PowerShell@2
displayName: "Build libm2k"
inputs:
targetType: 'filePath'
filePath: ./CI/windows/make_windows.ps1
- ${{ each pyVersion in parameters.pythonVersions }}:
- task: UsePythonVersion@0
displayName: Use Python ${{ pyVersion }}
inputs:
versionSpec: '${{ pyVersion }}'
- powershell: |
$SRC_DIR = Get-Item -Path $env:BUILD_SOURCESDIRECTORY
$OUTSIDE_BUILD = $SRC_DIR.Parent.FullName
# - job: WindowsBuilds
# workspace:
# clean: all
# strategy:
# matrix:
# VS_2022:
# poolName: 'Azure Pipelines'
# vmImage: 'windows-2022'
# COMPILER: 'Visual Studio 17 2022'
# ARCH: 'x64'
# PLATFORM: 'win64'
# artifactName: 'Windows-VS-2022-x64'
# VS_2019:
# poolName: 'Azure Pipelines'
# vmImage: 'windows-2019'
# COMPILER: 'Visual Studio 16 2019'
# ARCH: 'x64'
# PLATFORM: 'win64'
# artifactName: 'Windows-VS-2019-x64'
# pool:
# vmImage: $[ variables['vmImage'] ]
# steps:
# - checkout: self
# fetchDepth: 1
# clean: true
# - task: UsePythonVersion@0
# inputs:
# versionSpec: '3.11'
# - task: PowerShell@2
# displayName: 'Install Dependencies'
# inputs:
# targetType: filePath
# filePath: ./CI/windows/install_deps.ps1
# - task: PowerShell@2
# displayName: "Build libm2k"
# inputs:
# targetType: 'filePath'
# filePath: ./CI/windows/make_windows.ps1
# - ${{ each pyVersion in parameters.pythonVersions }}:
# - task: UsePythonVersion@0
# displayName: Use Python ${{ pyVersion }}
# inputs:
# versionSpec: '${{ pyVersion }}'
# - powershell: |
# $SRC_DIR = Get-Item -Path $env:BUILD_SOURCESDIRECTORY
# $OUTSIDE_BUILD = $SRC_DIR.Parent.FullName

$BUILD_DIR = Join-Path $OUTSIDE_BUILD "libm2k-$env:PLATFORM"
$TEMP_BUILD_DIR = Join-Path $SRC_DIR "tmp-build-$env:PLATFORM"
# $BUILD_DIR = Join-Path $OUTSIDE_BUILD "libm2k-$env:PLATFORM"
# $TEMP_BUILD_DIR = Join-Path $SRC_DIR "tmp-build-$env:PLATFORM"

Set-Location $TEMP_BUILD_DIR
python.exe -m pip install --user --upgrade pip setuptools wheel twine build virtualenv
$env:COMPILE_BINDINGS = $true
python.exe -m build
Remove-Item Env:COMPILE_BINDINGS
Copy-Item -Path "dist/libm2k*.whl" -Destination (Join-Path $BUILD_DIR "dist")
Set-Location $SRC_DIR
displayName: Wheel Python ${{ pyVersion }}
condition: eq('${{ pyVersion }}', '3.11')
- task: PowerShell@2
displayName: 'Create libm2k-system-setup installer'
condition: and(succeeded(), eq(variables['System.JobName'], 'VS_2022'))
inputs:
targetType: 'filePath'
filePath: ./CI/windows/create_installer.ps1
- task: PublishPipelineArtifact@1
condition: eq(variables['System.JobName'], 'VS_2022')
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/installer'
artifactName: 'Libm2k-System-Setup-Exe'
- task: PowerShell@2
displayName: "Create ZIPs"
inputs:
targetType: 'filePath'
filePath: ./CI/windows/create_zips.ps1
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/libm2k-$(PLATFORM)'
artifactName: '$(artifactName)'
# Set-Location $TEMP_BUILD_DIR
# python.exe -m pip install --user --upgrade pip setuptools wheel twine build virtualenv
# $env:COMPILE_BINDINGS = $true
# python.exe -m build
# Remove-Item Env:COMPILE_BINDINGS
# Copy-Item -Path "dist/libm2k*.whl" -Destination (Join-Path $BUILD_DIR "dist")
# Set-Location $SRC_DIR
# displayName: Wheel Python ${{ pyVersion }}
# condition: eq('${{ pyVersion }}', '3.11')
# - task: PowerShell@2
# displayName: 'Create libm2k-system-setup installer'
# condition: and(succeeded(), eq(variables['System.JobName'], 'VS_2022'))
# inputs:
# targetType: 'filePath'
# filePath: ./CI/windows/create_installer.ps1
# - task: PublishPipelineArtifact@1
# condition: eq(variables['System.JobName'], 'VS_2022')
# inputs:
# targetPath: '$(Build.ArtifactStagingDirectory)/installer'
# artifactName: 'Libm2k-System-Setup-Exe'
# - task: PowerShell@2
# displayName: "Create ZIPs"
# inputs:
# targetType: 'filePath'
# filePath: ./CI/windows/create_zips.ps1
# - task: PublishPipelineArtifact@1
# inputs:
# targetPath: '$(Build.ArtifactStagingDirectory)/libm2k-$(PLATFORM)'
# artifactName: '$(artifactName)'



Expand Down

0 comments on commit b56385f

Please sign in to comment.