Skip to content

Commit

Permalink
test script
Browse files Browse the repository at this point in the history
  • Loading branch information
AAndrisa committed Apr 15, 2024
1 parent 1cfe80f commit 5be7227
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 42 deletions.
26 changes: 0 additions & 26 deletions CI/travis/ci-centos.sh

This file was deleted.

42 changes: 42 additions & 0 deletions CI/travis/ci-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -x

handle_centos() {
local package=$1
yum -y install yum-utils gcc
yum config-manager --set-enabled powertools
yum localinstall -y $package
export CMAKE_OPTIONS="-DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON .."

}

handle_default() {
local package=$1
DEBIAN_FRONTEND=noninteractive apt-get install -y rpm
sudo dpkg -i $package
export CMAKE_OPTIONS="-DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON .."
}

handle_opensuse() {
local package=$1
zypper in -y --allow-unsigned-rpm $package
export CMAKE_OPTIONS="-DPYTHON_BINDINGS=ON -DENABLE_PACKAGING=ON .."
}

handle_"$1" "$2"

python3 -m pip install pylibiio --no-binary :all:
# Build project
mkdir -p build
cd build
cmake $CMAKE_OPTIONS
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 -m pip install pytest
python3 -m pytest -vs --skip-scan
40 changes: 24 additions & 16 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,30 @@ jobs:
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'
# build_script: ci-debian.sh
# ubuntu_22_04_x86_64:
# image: 'tfcollins/libiio_ubuntu_22_04-ci:latest'
# artifactName: 'Linux-Ubuntu-22.04'
# build_script: ci-debian.sh
# debian_bullseye:
# image: 'tfcollins/libiio_debian_bullseye-ci:latest'
# artifactName: 'Linux-Debian-11'
# build_script: ci-debian.sh
ubuntu_18_04_x86_64:
image: 'tfcollins/libiio_ubuntu_18_04-ci:latest'
artifactName: 'Linux-Ubuntu-18.04'
build_script: ci-linux.sh
OS_TYPE: default
PACKAGE_TO_INSTALL: '/ci/build/*.deb'
ubuntu_20_04_x86_64:
image: 'tfcollins/libiio_ubuntu_20_04-ci:latest'
artifactName: 'Linux-Ubuntu-20.04'
build_script: ci-linux.sh
OS_TYPE: default
PACKAGE_TO_INSTALL: '/ci/build/*.deb'
ubuntu_22_04_x86_64:
image: 'tfcollins/libiio_ubuntu_22_04-ci:latest'
artifactName: 'Linux-Ubuntu-22.04'
build_script: ci-linux.sh
OS_TYPE: default
PACKAGE_TO_INSTALL: '/ci/build/*.deb'
debian_bullseye:
image: 'tfcollins/libiio_debian_bullseye-ci:latest'
artifactName: 'Linux-Debian-11'
build_script: ci-linux.sh
OS_TYPE: default
PACKAGE_TO_INSTALL: '/ci/build/*.deb'
debian_bookworm:
image: 'tfcollins/libiio_debian_bookworm-ci:latest'
artifactName: 'Linux-Debian-12'
Expand Down

0 comments on commit 5be7227

Please sign in to comment.