Skip to content

Commit

Permalink
ci/macOS: export libiio .pkg from azure artifacts
Browse files Browse the repository at this point in the history
- latest libm2k version is only compatilbe with libiio-v0. The CI builds libiio-v0 and libm2k-v0 and exports them as .pkg files

Signed-off-by: Adrian Stanea <Adrian.Stanea@analog.com>
  • Loading branch information
Adrian-Stanea committed Dec 13, 2023
1 parent 68f5aed commit 61b7247
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
19 changes: 15 additions & 4 deletions CI/macOS/install_deps
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,19 @@ sudo make install
echo "Building libiio - version $LIBIIO_VERSION"
cd ${TOP_DIR}
git clone https://github.com/analogdevicesinc/libiio.git -b $LIBIIO_VERSION libiio
mkdir ./libiio/build && cd ./libiio/build
cmake ../
cd libiio
## build .pkg
mkdir build && cd build
cmake .. -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DOSX_PACKAGE=ON -DCPP_BINDINGS=ON -DPYTHON_BINDINGS=ON -DWITH_EXAMPLES=ON -DWITH_SERIAL_BACKEND=ON -DWITH_ZSTD=OFF
make
sudo make install

sudo make install
cd ..
## built tar
mkdir build_tar && cd build_tar
cmake .. -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DOSX_PACKAGE=OFF -DENABLE_PACKAGING=ON -DCPP_BINDINGS=ON -DPYTHON_BINDINGS=ON -DWITH_SERIAL_BACKEND=ON -DWITH_ZSTD=OFF -DCPACK_SYSTEM_NAME=${ARTIFACTNAME}
make
make package
mv ../CI/azure/macos_tar_fixup.sh .
chmod +x macos_tar_fixup.sh
./macos_tar_fixup.sh
cd ..
10 changes: 10 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ jobs:
- script: ./CI/macOS/install_deps
displayName: "Install Dependencies"
condition: ne(variables['agentName'],'macOS_arm64')
- task: CopyFiles@2
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/libiio/build/'
contents: '$(Agent.BuildDirectory)/s/libiio/build/?(*.pkg)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/libiio/build_tar/'
contents: '$(Agent.BuildDirectory)/s/libiio/build_tar/?(*.tar.gz)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- script: ./CI/macOS/make_macOS
displayName: "Build"
- ${{ each pyVersion in parameters.pythonVersions }}:
Expand Down

0 comments on commit 61b7247

Please sign in to comment.