diff --git a/CI/travis/ci-centos.sh b/CI/travis/ci-centos.sh new file mode 100644 index 0000000..b3a0042 --- /dev/null +++ b/CI/travis/ci-centos.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +set -x + +yum -y install yum-utils gcc +yum config-manager --set-enabled powertools + +cd /opt +wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz +tar xzf Python-3.5.1.tgz +cd Python-3.5.1 +./configure +make altinstall +cd /ci + +yum -y install epel-release bzip2 gzip + +yum localinstall -y /ci/build/*.rpm + +python3.5 -m pip install pylibiio --no-binary :all: + +# Build project +sudo ln -fs /usr/bin/python3.5 /usr/bin/python +python3.5 -m ensurepip +mkdir -p build +cd build +cmake -DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON .. +sudo make && sudo make package && make test +sudo make install +ldconfig +cd .. +cd bindings/python +pip install -r requirements_dev.txt +export LD_LIBRARY_PATH=/usr/local/lib/ +python3.5 -m pip install pytest +python3.5 -m pytest -vs --skip-scan diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8c3fe75..4a80814 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,7 +8,7 @@ variables: ${{ elseif eq(variables['Build.Reason'], 'PullRequest') }}: downloadBranch: $[ format('refs/heads/{0}',replace(replace(variables['System.PullRequest.TargetBranch'], 'libad9361-iio-v0', 'libiio-v0'), 'master', 'main')) ] ${{ else }}: - downloadBranch: 'refs/heads/main' + downloadBranch: 'refs/heads/libiio-v0' trigger: branches: @@ -34,8 +34,14 @@ pr: jobs: - job: LinuxBuilds + pool: + vmImage: 'ubuntu-latest' strategy: matrix: + ubuntu_18_04_x86_64: + image: 'tfcollins/libiio_ubuntu_18_04-ci:latest' + artifactName: 'Linux-Ubuntu-18.04' + build_script: ci-debian.sh ubuntu_20_04_x86_64: image: 'tfcollins/libiio_ubuntu_20_04-ci:latest' artifactName: 'Linux-Ubuntu-20.04' @@ -48,8 +54,22 @@ jobs: image: 'tfcollins/libiio_debian_bullseye-ci:latest' artifactName: 'Linux-Debian-11' build_script: ci-debian.sh - pool: - vmImage: 'ubuntu-latest' + centos_7: + image: 'tfcollins/libiio_centos_7-ci:latest' + artifactName: 'Linux-CentOS-7' + build_script: ci-centos.sh + fedora28: + image: 'tfcollins/libiio_fedora_28-ci:latest' + artifactName: 'Linux-Fedora-28' + build_script: ci-centos.sh + fedora34: + image: 'tfcollins/libiio_fedora_34-ci:latest' + artifactName: 'Linux-Fedora-34' + build_script: ci-centos.sh + opensuse_15_4: + image: 'tfcollins/libiio_opensuse_15_4-ci:latest' + artifactName: 'Linux-openSUSE-15.4' + build_script: ci-centos.sh steps: - checkout: self fetchDepth: 1 @@ -184,16 +204,35 @@ jobs: artifactName: '$(artifactName)' - job: macOSBuilds + workspace: + clean: all strategy: matrix: macOS_11: - imageName: 'macOS-11' + poolName: 'Azure Pipelines' + vmImage: 'macOS-11' + agentName: 'Azure Pipelines 4' artifactName: 'macOS-11' macOS_12: - imageName: 'macOS-12' + poolName: 'Azure Pipelines' + vmImage: 'macOS-12' + agentName: 'Azure Pipelines 3' artifactName: 'macOS-12' + macOS_13_x64: + poolName: 'Azure Pipelines' + vmImage: 'macOS-13' + agentName: 'Azure Pipelines 2' + artifactName: 'macOS-13-x64' + macOS_13_arm64: + poolName: 'Default' + vmImage: + agentName: 'miniMAC_arm64' + artifactName: 'macOS-13-arm64' pool: - vmImage: $(imageName) + name: $(poolName) + vmImage: $(vmImage) + demands: + - agent.name -equals $(agentName) variables: PACKAGE_TO_INSTALL: 'build/*.pkg' steps: