From 99bf3c9c9e362a88262220bab3fe019f0417e0a6 Mon Sep 17 00:00:00 2001 From: Raluca Chis Date: Mon, 4 Jul 2022 08:52:59 +0300 Subject: [PATCH 1/4] CI:fix ARM builds Signed-off-by: Raluca Chis --- CI/travis/ci-ubuntu.sh | 23 ++++++++++++++++++++++ azure-pipelines.yml | 43 +++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 17 deletions(-) create mode 100644 CI/travis/ci-ubuntu.sh diff --git a/CI/travis/ci-ubuntu.sh b/CI/travis/ci-ubuntu.sh new file mode 100644 index 0000000..9d1ec79 --- /dev/null +++ b/CI/travis/ci-ubuntu.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -x +uname -a +DEBIAN_FRONTEND=noninteractive apt install -y make graphviz libaio-dev \ + libavahi-client-dev libavahi-common-dev libusb-1.0-0-dev \ + rpm tar bzip2 gzip libserialport-dev python3-pip +dpkg -i /ci/build/*.deb +python3 -m pip install pylibiio --no-binary :all: +python3 -m pip install sphinx +python3 -m pip install sphinx-rtd-theme + +echo "$PWD" + +mkdir -p build +cd build +cmake -DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON .. +make && make package && make test +make install +ldconfig +cd ../bindings/python +pip3 install -r requirements_dev.txt +python3 -m pytest -vs --skip-scan diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c074cc2..7336fc3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -63,32 +63,32 @@ jobs: artifactName: '$(artifactName)' - job: ARMBuilds + # Host Box + pool: + vmImage: "ubuntu-latest" + # Docker Images strategy: matrix: ubuntu-ppc64le: - imageName: 'ubuntu-18.04' + image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest arch: ppc64le + build_script: ci-ubuntu.sh artifactName: 'Ubuntu-ppc64le' - PACKAGE_TO_INSTALL: 'build/*.deb' ubuntu-x390x: - imageName: 'ubuntu-18.04' + image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest arch: s390x + build_script: ci-ubuntu.sh artifactName: 'Ubuntu-x390x' - PACKAGE_TO_INSTALL: 'build/*.deb' debian_buster_arm32v7: - imageName: 'ubuntu-18.04' - OS_TYPE: 'arm32v7/debian_docker' - OS_VERSION: 'buster' + image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest + arch: arm + build_script: ci-ubuntu.sh artifactName: 'Ubuntu-arm32v7' - PACKAGE_TO_INSTALL: 'build/*.deb' debian_buster_arm64v8: - imageName: 'ubuntu-18.04' - OS_TYPE: 'arm64v8/debian_docker' - OS_VERSION: 'buster' + image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest + arch: aarch64 + build_script: ci-ubuntu.sh artifactName: 'Ubuntu-arm64v8' - PACKAGE_TO_INSTALL: 'build/*.deb' - pool: - vmImage: $(imageName) steps: - checkout: self fetchDepth: 1 @@ -102,9 +102,18 @@ jobs: runVersion: 'latestFromBranch' runBranch: 'refs/heads/master' path: '$(Agent.BuildDirectory)/s/build/' - - script: ./CI/travis/before_install_linux - displayName: "Install Dependencies" - - script: ./CI/travis/make_linux + - script: | + set -e + sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross + sudo apt-get install -y g++-arm-linux-gnueabihf + sudo apt-get install -y g++-aarch64-linux-gnu + sudo apt-get install -y qemu-system-ppc64 + sudo apt-get install qemu binfmt-support qemu-user-static + sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + displayName: "Setup" + - script: | + set -e + sudo docker run --platform "linux/$(arch)" --rm -t --privileged -e ARTIFACTNAME=$(artifactName) -v "$(Agent.BuildDirectory)/s":"/ci" -v "/usr/bin/qemu-$(arch)-static":"/usr/bin/qemu-$(arch)-static" "$(image)" /bin/bash -c "cd /ci/ && chmod +x ./CI/travis/$(build_script) && ./CI/travis/$(build_script)" displayName: "Build" - task: CopyFiles@2 inputs: From 747083c4c012b0f1bcd7c965bcc2254e6ef249de Mon Sep 17 00:00:00 2001 From: Raluca Chis Date: Fri, 8 Jul 2022 13:03:11 +0300 Subject: [PATCH 2/4] CI:add new YAML VM Images Signed-off-by: Raluca Chis --- azure-pipelines.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7336fc3..068cec1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,6 +32,12 @@ jobs: OS_VERSION: focal artifactName: 'Linux-Ubuntu-20.04' PACKAGE_TO_INSTALL: 'build/*.deb' + ubuntu_22_04_x86_64: + imageName: 'ubuntu-22.04' + OS_TYPE: 'ubuntu_docker' + OS_VERSION: focal + artifactName: 'Linux-Ubuntu-22.04' + PACKAGE_TO_INSTALL: 'build/*.deb' pool: vmImage: $(imageName) steps: @@ -135,6 +141,9 @@ jobs: macOS_11: imageName: 'macOS-11' artifactName: 'macOS-11' + macOS_12: + imageName: 'macOS-12' + artifactName: 'macOS-12' pool: vmImage: $(imageName) variables: From dff7345386cc3f7b05efb3d21bd136765663723a Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Mon, 11 Jul 2022 16:02:45 -0600 Subject: [PATCH 3/4] Update versions of python dependencies Signed-off-by: Travis F. Collins --- bindings/python/requirements_dev.txt | 2 +- bindings/python/setup.py.cmakein | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/requirements_dev.txt b/bindings/python/requirements_dev.txt index 78b4975..07d27f3 100644 --- a/bindings/python/requirements_dev.txt +++ b/bindings/python/requirements_dev.txt @@ -1,2 +1,2 @@ pytest -pytest-libiio \ No newline at end of file +pytest-libiio==0.0.13 \ No newline at end of file diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein index 4ca44a5..0330828 100644 --- a/bindings/python/setup.py.cmakein +++ b/bindings/python/setup.py.cmakein @@ -82,7 +82,7 @@ config.update( description=description, long_description=long_description, url="https://github.com/analogdevicesinc/libad9361", - install_requires=["pylibiio<=0.21.0"], + install_requires=["pylibiio==0.23.1"], py_modules=["ad9361"], packages=find_packages(exclude=["test*"]), python_requires=">=3.6", From 4c7945e7f74939460b2a2962628b4ac28053a9f2 Mon Sep 17 00:00:00 2001 From: Raluca Chis Date: Tue, 12 Jul 2022 11:33:58 +0300 Subject: [PATCH 4/4] CI:disable ubuntu-22.04 build until will be fixed Signed-off-by: Raluca Chis --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 068cec1..f2c81a4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,12 +32,12 @@ jobs: OS_VERSION: focal artifactName: 'Linux-Ubuntu-20.04' PACKAGE_TO_INSTALL: 'build/*.deb' - ubuntu_22_04_x86_64: - imageName: 'ubuntu-22.04' - OS_TYPE: 'ubuntu_docker' - OS_VERSION: focal - artifactName: 'Linux-Ubuntu-22.04' - PACKAGE_TO_INSTALL: 'build/*.deb' + #ubuntu_22_04_x86_64: + #imageName: 'ubuntu-22.04' + #OS_TYPE: 'ubuntu_docker' + #OS_VERSION: focal + #artifactName: 'Linux-Ubuntu-22.04' + #PACKAGE_TO_INSTALL: 'build/*.deb' pool: vmImage: $(imageName) steps: