From 92ab1855b890f6966233277f95ccfebfcc43e45e 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 | 49 +++++++++++++++++---------------- 3 files changed, 29 insertions(+), 28 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..141d35ea 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,19 +39,19 @@ jobs: OS_TYPE: 'ubuntu_docker' OS_VERSION: focal artifactName: 'Linux-Ubuntu-20.04' - PACKAGE_TO_INSTALL: 'build/*.deb' + # 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' + # 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' + # PACKAGE_TO_INSTALL: 'build/*.deb' pool: vmImage: $(imageName) steps: @@ -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_SERIAL_BACKEND=ON -DWITH_MAN=ON -DCPACK_SYSTEM_NAME=${ARTIFACTNAME} + make + make package + make required2tar + displayName: 'Build libiio sources' - script: ./CI/travis/make_linux displayName: "Build" - task: CopyFiles@2 @@ -116,24 +118,23 @@ jobs: demands: - agent.name -equals $(agentName) variables: - PACKAGE_TO_INSTALL: 'build/*.pkg' + # PACKAGE_TO_INSTALL: 'build/*.pkg' steps: - 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 }}: