Skip to content

Commit

Permalink
ci/linux: fix artifacts
Browse files Browse the repository at this point in the history
- export both .dpkg needed to install libiio and libm2k with the latest compatible API's
- create wheels during azure-pipelines build

Signed-off-by: Adrian Stanea <[email protected]>
  • Loading branch information
Adrian-Stanea committed Dec 4, 2023
1 parent 170b313 commit c17a810
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 172 deletions.
36 changes: 24 additions & 12 deletions CI/ubuntu/install_deps
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ LIBIIO_VERSION=libiio-v0

set -x

handle_default() {
install_deps() {
echo "# INSTALLING DEPENDENCIES"

sudo apt-get -qq update
echo "libm2k packages"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y cmake doxygen graphviz \
Expand All @@ -15,32 +17,46 @@ handle_default() {
debhelper devscripts fakeroot libserialport-dev swig dh-python

# libiio dependencies
echo "libiio packages"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
libxml2-dev bison flex libcdk5-dev cmake \
libaio-dev libusb-1.0-0-dev \
libserialport-dev libavahi-client-dev man2html

libserialport-dev libavahi-client-dev man2html \
python3-sphinx
}

install_glog() {
echo "## Building glog"

#Install glog
cd ${TOP_DIR}
git clone --branch v0.4.0 --depth 1 https://github.com/google/glog
mkdir -p glog/build_0_4_0 && cd glog/build_0_4_0
cmake -DCMAKE_PREFIX_PATH=/usr ..
make
sudo make install
sudo pip3 install --upgrade pip stdeb argparse
}

# Install libiio
echo "Building libiio - version $LIBIIO_VERSION"
install_libiio() {
echo "## Building libiio - version $LIBIIO_VERSION"

cd ${TOP_DIR}
git clone https://github.com/analogdevicesinc/libiio.git -b $LIBIIO_VERSION libiio
mkdir ./libiio/build && cd ./libiio/build
cmake ../ -DCOMPILE_WARNING_AS_ERROR=ON -DENABLE_PACKAGING=ON -DPYTHON_BINDINGS=OFF -DWITH_DOC=ON -DWITH_MAN=ON -DWITH_USB_BACKEND=OFF -DWITH_IIOD_USBD=OFF -DWITH_LOCAL_MMAP_API=OFF
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
sudo apt install ./libiio-*.deb
# sudo make install
}

handle_default() {
install_deps
install_glog
install_libiio
}

handle_ubuntu_docker() {
handle_default
}

handle_doxygen() {
Expand Down Expand Up @@ -71,8 +87,4 @@ handle_doxygen() {
sudo pip3 install --upgrade sphinx_rtd_theme
}

handle_ubuntu_docker() {
handle_default
}

handle_${OS_TYPE}
4 changes: 2 additions & 2 deletions CI/ubuntu/make_linux
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ handle_default() {
cd build

#create deb for bindings
cmake -DENABLE_PYTHON=ON -DENABLE_TOOLS=ON -DENABLE_CSHARP=OFF -DENABLE_LOG=ON -DBUILD_EXAMPLES=ON .. && make
cmake -DENABLE_PYTHON=ON -DENABLE_TOOLS=ON -DENABLE_CSHARP=OFF -DENABLE_LOG=OFF -DBUILD_EXAMPLES=ON .. && make
sudo python3 setup.py --command-packages=stdeb.command sdist_dsc
cd "$(find . -type d -name "debian" | head -n 1)"
sudo env DEB_BUILD_OPTIONS=nocheck debuild -us -uc
Expand All @@ -20,7 +20,7 @@ handle_default() {
ls

#create simple .deb without Python bindings
cmake -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON -DENABLE_PYTHON=OFF -DENABLE_CSHARP=ON -DENABLE_TOOLS=ON -DENABLE_LOG=ON -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_EXAMPLES=ON ..
cmake -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON -DENABLE_PYTHON=OFF -DENABLE_CSHARP=ON -DENABLE_TOOLS=ON -DENABLE_LOG=OFF -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_EXAMPLES=ON ..
make && make package
ls
}
Expand Down
Loading

0 comments on commit c17a810

Please sign in to comment.