diff --git a/CI/travis/ci-debian.sh b/CI/travis/ci-debian.sh new file mode 100644 index 0000000..68e9d2f --- /dev/null +++ b/CI/travis/ci-debian.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -x + +DEBIAN_FRONTEND=noninteractive apt-get install -y rpm + +sudo dpkg -i /ci/build/*.deb + +python3 -m pip install pylibiio --no-binary :all: + +# Build project +mkdir -p build +cd build +sudo cmake -DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON .. +sudo make && make package && make test +sudo make install +ldconfig +cd .. +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 0a87e81..54d18a4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,19 +24,19 @@ jobs: strategy: matrix: ubuntu_20_04_x86_64: - imageName: 'ubuntu-20.04' - OS_TYPE: 'ubuntu_docker' - OS_VERSION: focal + image: 'tfcollins/libiio_ubuntu_20_04-ci:latest' artifactName: 'Linux-Ubuntu-20.04' - PACKAGE_TO_INSTALL: 'build/*.deb' + build_script: ci-debian.sh ubuntu_22_04_x86_64: - imageName: 'ubuntu-22.04' - OS_TYPE: 'ubuntu_docker' - OS_VERSION: jammy + image: 'tfcollins/libiio_ubuntu_22_04-ci:latest' artifactName: 'Linux-Ubuntu-22.04' - PACKAGE_TO_INSTALL: 'build/*.deb' + build_script: ci-debian.sh + debian_bullseye: + image: 'tfcollins/libiio_debian_bullseye-ci:latest' + artifactName: 'Linux-Debian-11' + build_script: ci-debian.sh pool: - vmImage: $(imageName) + vmImage: 'ubuntu-latest' steps: - checkout: self fetchDepth: 1 @@ -50,9 +50,9 @@ 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 docker run --rm -t --privileged -e ARTIFACTNAME=$(artifactName) -v "$(Agent.BuildDirectory)/s":"/ci" "$(image)" /bin/bash -c "cd /ci/ && chmod +x ./CI/travis/$(build_script) && ./CI/travis/$(build_script)" displayName: "Build" - task: CopyFiles@2 inputs: