From 8c465d71ec88dc80e5c1e37b50e43ce51d1fffa4 Mon Sep 17 00:00:00 2001 From: Adrian Stanea Date: Mon, 9 Oct 2023 18:35:55 +0300 Subject: [PATCH] CI: fix builds for libiio-v0 dependencies - build libiio from sources based on old API for libiio-v0 Signed-off-by: Adrian Stanea --- CI/travis/before_install_darwin | 4 ++-- CI/travis/lib.sh | 4 ++-- azure-pipelines.yml | 38 ++++++++++++++++----------------- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/CI/travis/before_install_darwin b/CI/travis/before_install_darwin index 8244b43e..e1880637 100755 --- a/CI/travis/before_install_darwin +++ b/CI/travis/before_install_darwin @@ -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 @@ -23,4 +23,4 @@ cmake .. make sudo make install -pip3 install wheel twine build virtualenv +pip3 install wheel twine build virtualenv sphinx diff --git a/CI/travis/lib.sh b/CI/travis/lib.sh index 7fea98d6..da2a6db1 100644 --- a/CI/travis/lib.sh +++ b/CI/travis/lib.sh @@ -2,7 +2,7 @@ TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-'./'} -LIBIIO_BRANCH=master +LIBIIO_BRANCH=libiio-v0 command_exists() { local cmd=$1 @@ -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 } diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1980ebed..b70c83ca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -59,18 +59,17 @@ 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: | + 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 @@ -121,19 +120,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 }}: