Skip to content

Commit

Permalink
CI: fix builds for libiio-v0 dependencies
Browse files Browse the repository at this point in the history
- build libiio from sources based on old API for libiio-v0

Signed-off-by: Adrian Stanea <[email protected]>
  • Loading branch information
Adrian-Stanea committed Oct 9, 2023
1 parent b37eabb commit 8050c69
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
4 changes: 2 additions & 2 deletions CI/travis/before_install_darwin
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Note: not installing 'mono', it comes with Azure images,
# but it doesn't look it's installed with Homebrew

brew_install_if_not_exists cmake doxygen libusb libxml2 swig curl python
brew_install_if_not_exists cmake doxygen libusb libxml2 swig curl python ncurses cdk libserialport sphinx-doc pkg-config

if [ -n "$PACKAGE_TO_INSTALL" ] ; then
for file in $PACKAGE_TO_INSTALL ; do
Expand All @@ -23,4 +23,4 @@ cmake ..
make
sudo make install

pip3 install wheel twine build virtualenv
pip3 install wheel twine build virtualenv sphinx
4 changes: 2 additions & 2 deletions CI/travis/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-'./'}

LIBIIO_BRANCH=master
LIBIIO_BRANCH=libiio-v0

command_exists() {
local cmd=$1
Expand Down Expand Up @@ -35,7 +35,7 @@ ensure_command_exists sudo
# Get the common stuff from libiio
[ -f ${TRAVIS_BUILD_DIR}/build/lib.sh ] || {
mkdir -p ${TRAVIS_BUILD_DIR}/build
wget https://raw.githubusercontent.com/analogdevicesinc/libiio/master/CI/travis/lib.sh \
wget https://raw.githubusercontent.com/analogdevicesinc/libiio/$LIBIIO_BRANCH/CI/travis/lib.sh \
-O ${TRAVIS_BUILD_DIR}/build/lib.sh
}

Expand Down
41 changes: 21 additions & 20 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,20 @@ jobs:
fetchDepth: 1
clean: true
persistCredentials: true
- task: DownloadPipelineArtifact@2
displayName: 'Get libiio artifacts'
inputs:
source: 'specific'
project: '$(AnalogDevices_OpenSource_GUID)'
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
path: '$(Agent.BuildDirectory)/s/build/'
- script: ./CI/travis/before_install_linux
displayName: "Install Dependencies"
- script: |
pwd
export LIBIIO_BRANCH=libiio-v0
echo https://github.com/analogdevicesinc/libiio
git clone -b $LIBIIO_BRANCH https://github.com/analogdevicesinc/libiio
set -e
mkdir -p build && cd build
cmake .. -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DENABLE_PACKAGING=ON -DPYTHON_BINDINGS=ON -DWITH_DOC=ON -DWITH_MAN=ON -DCPACK_SYSTEM_NAME=${ARTIFACTNAME} -DWITH_USB_BACKEND=OFF -DWITH_IIOD_USBD=OFF -DWITH_LOCAL_MMAP_API=OFF
make
make package
make required2tar
displayName: 'Build libiio sources'
- script: ./CI/travis/make_linux
displayName: "Build"
- task: CopyFiles@2
Expand Down Expand Up @@ -121,19 +123,18 @@ jobs:
- checkout: self
fetchDepth: 1
clean: true
- task: DownloadPipelineArtifact@2
displayName: 'Get libiio artifacts'
inputs:
source: 'specific'
project: '$(AnalogDevices_OpenSource_GUID)'
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
path: '$(Agent.BuildDirectory)/s/build/'
- script: ./CI/travis/before_install_darwin
displayName: "Install Dependencies"
condition: ne(variables['agentName'],'macOS_arm64')
- script: |
git clone -b $LIBIIO_BRANCH https://github.com/analogdevicesinc/libiio
set -e
mkdir -p 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
cd ..
displayName: 'Build libiio sources'
- script: ./CI/travis/make_darwin
displayName: "Build"
- ${{ each pyVersion in parameters.pythonVersions }}:
Expand Down

0 comments on commit 8050c69

Please sign in to comment.