Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 72 additions & 66 deletions .github/workflows/_arm-builds.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2026 Analog Devices, Inc.
#
# SPDX-License-Identifier: MIT

name: ARM Builds

on:
Expand All @@ -20,78 +24,81 @@ jobs:
- image: ubuntu:22.04
platform-flag: ''
artifact-name: Ubuntu-22.04-arm64v8
distro-version: +Ubuntu22
- image: arm32v7/ubuntu:22.04
platform-flag: '--platform linux/arm/v7'
artifact-name: Ubuntu-22.04-arm32v7
distro-version: +Ubuntu22

# Ubuntu 26.04
- image: ubuntu:26.04
platform-flag: ''
artifact-name: Ubuntu-26.04-arm64v8
distro-version: +Ubuntu26
- image: arm32v7/ubuntu:26.04
platform-flag: '--platform linux/arm/v7'
artifact-name: Ubuntu-26.04-arm32v7
distro-version: +Ubuntu26

# Debian 12 (bookworm)
- image: debian:bookworm
platform-flag: ''
artifact-name: Debian-12-arm64
distro-version: +Debian12
- image: arm32v7/debian:bookworm
platform-flag: '--platform linux/arm/v7'
artifact-name: Debian-12-armhf
distro-version: +Debian12

# Debian 13 (trixie)
- image: debian:trixie
platform-flag: ''
artifact-name: Debian-13-arm64
distro-version: +Debian13
- image: arm32v7/debian:trixie
platform-flag: '--platform linux/arm/v7'
artifact-name: Debian-13-armhf
env:
ARTIFACTNAME: ${{ matrix.artifact-name }}
CMAKE_BUILD_TYPE: ${{ inputs.build-type }}
distro-version: +Debian13
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 1

- name: Build
- uses: actions/checkout@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget about fixed ref sha

with:
repository: analogdevicesinc/shared-actions
ref: 242aa00e8eed98e2bd0ee663a9a0597ebec69d89
path: shared-actions
fetch-depth: 1

- name: Get version
id: version
run: |
version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
echo "version=${version}" >> "${GITHUB_OUTPUT}"

- name: Build deb
run: |
set -e
docker run \
${{ matrix.platform-flag }} \
--rm -t --privileged \
-e ARTIFACTNAME=${{ matrix.artifact-name }} \
-e CMAKE_BUILD_TYPE=${{ inputs.build-type }} \
-v "${{ github.workspace }}":"/ci" \
"${{ matrix.image }}" \
/bin/bash -c "
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y build-essential git cmake libxml2-dev bison flex \
libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \
libserialport-dev libavahi-client-dev \
python3 python3-pip python3-setuptools

git clone --depth 1 https://github.com/pcercuei/libini.git
cd libini && mkdir build && cd build && cmake .. && make && make install && ldconfig
cd /ci

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE:-RelWithDebInfo} -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DWITH_SERIAL_BACKEND=ON -DWITH_EMU_BACKEND=ON -DWITH_EXAMPLES=ON -DPYTHON_BINDINGS=ON -DCPP_BINDINGS=ON -DENABLE_PACKAGING=ON -DCPACK_SYSTEM_NAME=\${ARTIFACTNAME}
make
make package
make required2tar
"
docker run -d --name builder \
${{ matrix.platform-flag }} --privileged \
-v "${{ github.workspace }}:${{ github.workspace }}" \
-w "${{ github.workspace }}" \
-e DEBIAN_FRONTEND=noninteractive \
-e GITHUB_WORKSPACE="${{ github.workspace }}" \
-e VERSION="${{ steps.version.outputs.version }}" \
-e VERSION_SUFFIX="${{ matrix.distro-version }}" \
-e WORKING_DIRECTORY="${{ github.workspace }}" \
-e IGNORE_PATH="shared-actions" \
"${{ matrix.image }}" sleep infinity
docker exec builder bash -c "apt-get update && apt-get install -y curl"
docker exec builder bash shared-actions/deb-generator-action/build-deb.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is strange here. In the logs, the linter have a lot of errors: https://github.com/analogdevicesinc/libiio/actions/runs/41023411654/job/123955851613?pr=1610#step:7:1763. Can you take a look at those to see why ? I am more concerned about custom-library-search-path RUNPATH but the other error should also be investigated. (Please check the other runs)


- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact-name }}
path: |
build/*.deb
build/*.tar.gz
path: artifacts

cross-arch:
name: ${{ matrix.artifact-name }}
Expand All @@ -104,60 +111,59 @@ jobs:
- image: ubuntu:22.04
arch: ppc64le
artifact-name: Ubuntu-22.04-ppc64le
distro-version: +Ubuntu22
- image: ubuntu:22.04
arch: s390x
artifact-name: Ubuntu-22.04-s390x
distro-version: +Ubuntu22
- image: ubuntu:26.04
arch: ppc64le
artifact-name: Ubuntu-26.04-ppc64le
distro-version: +Ubuntu26
- image: ubuntu:26.04
arch: s390x
artifact-name: Ubuntu-26.04-s390x
env:
ARTIFACTNAME: ${{ matrix.artifact-name }}
CMAKE_BUILD_TYPE: ${{ inputs.build-type }}
distro-version: +Ubuntu26
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 1

- uses: actions/checkout@v7
with:
repository: analogdevicesinc/shared-actions
ref: 242aa00e8eed98e2bd0ee663a9a0597ebec69d89
path: shared-actions
fetch-depth: 1

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Build
- name: Get version
id: version
run: |
version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
echo "version=${version}" >> "${GITHUB_OUTPUT}"

- name: Build deb
run: |
set -e
sudo docker run \
--platform "linux/${{ matrix.arch }}" \
--rm -t --privileged \
-e ARTIFACTNAME=${{ matrix.artifact-name }} \
-e CMAKE_BUILD_TYPE=${{ inputs.build-type }} \
-v "${{ github.workspace }}":"/ci" \
"${{ matrix.image }}" \
/bin/bash -c "
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y build-essential git cmake libxml2-dev bison flex \
libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \
libserialport-dev libavahi-client-dev \
python3 python3-pip python3-setuptools

git clone --depth 1 https://github.com/pcercuei/libini.git
cd libini && mkdir build && cd build && cmake .. && make && make install && ldconfig
cd /ci

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE:-RelWithDebInfo} -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DWITH_SERIAL_BACKEND=ON -DWITH_EMU_BACKEND=ON -DWITH_EXAMPLES=ON -DPYTHON_BINDINGS=ON -DCPP_BINDINGS=ON -DENABLE_PACKAGING=ON -DCPACK_SYSTEM_NAME=\${ARTIFACTNAME}
make
make package
make required2tar
"
docker run -d --name builder \
--platform "linux/${{ matrix.arch }}" --privileged \
-v "${{ github.workspace }}:${{ github.workspace }}" \
-w "${{ github.workspace }}" \
-e DEBIAN_FRONTEND=noninteractive \
-e GITHUB_WORKSPACE="${{ github.workspace }}" \
-e VERSION="${{ steps.version.outputs.version }}" \
-e VERSION_SUFFIX="${{ matrix.distro-version }}" \
-e WORKING_DIRECTORY="${{ github.workspace }}" \
-e IGNORE_PATH="shared-actions" \
"${{ matrix.image }}" sleep infinity
docker exec builder bash -c "apt-get update && apt-get install -y curl"
docker exec builder bash shared-actions/deb-generator-action/build-deb.sh

- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact-name }}
path: |
build/*.deb
build/*.tar.gz
path: artifacts
50 changes: 46 additions & 4 deletions .github/workflows/_linux-builds.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2026 Analog Devices, Inc.
#
# SPDX-License-Identifier: MIT

name: Linux Builds

on:
Expand All @@ -18,24 +22,36 @@ jobs:
include:
- image: ubuntu:22.04
artifact-name: Linux-Ubuntu-22.04
deb: true
distro-version: +Ubuntu22
- image: ubuntu:24.04
artifact-name: Linux-Ubuntu-24.04
deb: true
distro-version: +Ubuntu24
- image: ubuntu:26.04
artifact-name: Linux-Ubuntu-26.04
deb: true
distro-version: +Ubuntu26
- image: fedora:42
artifact-name: Linux-Fedora-42
- image: fedora:44
artifact-name: Linux-Fedora-44
- image: debian:bookworm
artifact-name: Linux-Debian-12
deb: true
distro-version: +Debian12
- image: debian:trixie
artifact-name: Linux-Debian-13
deb: true
distro-version: +Debian13
- image: opensuse/leap:15.6
artifact-name: Linux-openSUSE-15.6
- image: opensuse/leap:16.0
artifact-name: Linux-openSUSE-16.0
container:
image: ${{ matrix.image }}
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install dependencies
run: |
Expand All @@ -48,7 +64,7 @@ jobs:
apt-get install -y build-essential git cmake libxml2-dev bison flex \
libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \
libserialport-dev libavahi-client-dev doxygen graphviz man2html \
python3 python3-pip python3-setuptools wget
python3 python3-pip python3-setuptools wget curl
pip3 install sphinx --break-system-packages 2>/dev/null || pip3 install sphinx

# Fedora
Expand Down Expand Up @@ -84,8 +100,26 @@ jobs:
make VERBOSE=1
cmake .. -DLICENSE_CHECK=ON
export QA_RPATHS=$(( 0x0001|0x0002 ))
make package
make required2tar
if [ "${{ matrix.deb }}" != "true" ]; then
make package
make required2tar
fi

- name: Get version
if: matrix.deb
id: version
run: |
version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
echo "version=${version}" >> "${GITHUB_OUTPUT}"

- uses: analogdevicesinc/shared-actions/deb-generator-action@242aa00e8eed98e2bd0ee663a9a0597ebec69d89
if: matrix.deb
id: deb
with:
version: ${{ steps.version.outputs.version }}
version-suffix: ${{ matrix.distro-version }}
ignore-path: |
build

- name: Build with Examples
if: matrix.artifact-name == 'Linux-Ubuntu-24.04'
Expand All @@ -104,10 +138,18 @@ jobs:
run: ./CI/scripts/check_README_BUILD.sh

- name: Upload artifacts
if: "!matrix.deb"
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact-name }}
path: |
build/*.deb
build/*.rpm
build/*.tar.gz

- name: Upload artifacts
if: matrix.deb
uses: actions/upload-artifact@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same. fixed ref sha

with:
name: ${{ matrix.artifact-name }}
path: |
${{ steps.deb.outputs.artifact-dir }}
51 changes: 17 additions & 34 deletions artifact_manifest.txt.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,15 @@ Linux-Fedora-42/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-42.tar.gz
Linux-Fedora-44/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-44.rpm
Linux-Fedora-44/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-44.tar.gz

Linux-Debian-12/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-12.deb
Linux-Debian-12/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-12.tar.gz
Linux-Debian-12/libiio_@VERSION@-1_amd64.deb

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't exactly know what this is used for, but I saw that the .tar.gz was also here (the sources), shouldn't also the .orig.tar.gz and .dsc be here ?


Linux-Debian-13/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-13.deb
Linux-Debian-13/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-13.tar.gz
Linux-Debian-13/libiio_@VERSION@-1_amd64.deb

Linux-Ubuntu-22.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-22.04.deb
Linux-Ubuntu-22.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-22.04.tar.gz
Linux-Ubuntu-22.04/libiio_@VERSION@-1_amd64.deb

Linux-Ubuntu-24.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-24.04.deb
Linux-Ubuntu-24.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-24.04.tar.gz
Linux-Ubuntu-24.04/libiio_@VERSION@-1_amd64.deb

Linux-Ubuntu-26.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-26.04.deb
Linux-Ubuntu-26.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-26.04.tar.gz
Linux-Ubuntu-26.04/libiio_@VERSION@-1_amd64.deb

Linux-openSUSE-15.6/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-openSUSE-15.6.rpm
Linux-openSUSE-15.6/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-openSUSE-15.6.tar.gz
Expand All @@ -42,41 +37,29 @@ macOS-26-x64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@.pkg
macOS-27-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-macOS-27-arm64.tar.gz
macOS-27-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@.pkg

Ubuntu-22.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm32v7.deb
Ubuntu-22.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm32v7.tar.gz
Ubuntu-22.04-arm32v7/libiio_@VERSION@-1_armhf.deb

Ubuntu-22.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm64v8.deb
Ubuntu-22.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm64v8.tar.gz
Ubuntu-22.04-arm64v8/libiio_@VERSION@-1_arm64.deb

Ubuntu-22.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-ppc64le.deb
Ubuntu-22.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-ppc64le.tar.gz
Ubuntu-22.04-ppc64le/libiio_@VERSION@-1_ppc64el.deb

Ubuntu-22.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-s390x.deb
Ubuntu-22.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-s390x.tar.gz
Ubuntu-22.04-s390x/libiio_@VERSION@-1_s390x.deb

Ubuntu-26.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm32v7.deb
Ubuntu-26.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm32v7.tar.gz
Ubuntu-26.04-arm32v7/libiio_@VERSION@-1_armhf.deb

Ubuntu-26.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm64v8.deb
Ubuntu-26.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm64v8.tar.gz
Ubuntu-26.04-arm64v8/libiio_@VERSION@-1_arm64.deb

Ubuntu-26.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-ppc64le.deb
Ubuntu-26.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-ppc64le.tar.gz
Ubuntu-26.04-ppc64le/libiio_@VERSION@-1_ppc64el.deb

Ubuntu-26.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-s390x.deb
Ubuntu-26.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-s390x.tar.gz
Ubuntu-26.04-s390x/libiio_@VERSION@-1_s390x.deb

Debian-12-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-arm64.deb
Debian-12-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-arm64.tar.gz
Debian-12-arm64/libiio_@VERSION@-1_arm64.deb

Debian-12-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-armhf.deb
Debian-12-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-armhf.tar.gz
Debian-12-armhf/libiio_@VERSION@-1_armhf.deb

Debian-13-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-arm64.deb
Debian-13-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-arm64.tar.gz
Debian-13-arm64/libiio_@VERSION@-1_arm64.deb

Debian-13-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-armhf.deb
Debian-13-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-armhf.tar.gz
Debian-13-armhf/libiio_@VERSION@-1_armhf.deb

Windows-VS-2022-x64/Windows-msvc-deps.zip
Windows-VS-2022-x64/iio/iio.h
Expand Down
Loading
Loading