Skip to content

[FREEZED Until V1 Migration is Done] Setup azure resource trigger - #39

Open
liviutomoiaga wants to merge 2 commits into
mainfrom
setup-azure-resource-trigger
Open

[FREEZED Until V1 Migration is Done] Setup azure resource trigger#39
liviutomoiaga wants to merge 2 commits into
mainfrom
setup-azure-resource-trigger

Conversation

@liviutomoiaga

@liviutomoiaga liviutomoiaga commented Sep 5, 2025

Copy link
Copy Markdown

PR Description

This PR updates the CI/CD flow to introduce pipeline dependency management between libiio and libad9166.

Details:

  • Restructured azure-pipelines.yml from a job-based model to a stage-based one.
  • Added a resources block to declare pipeline dependencies.
  • Introduced a dedicated notification stage for propagating build results.

Workflow

  1. A push to libiio main branch → azure pipeline is triggered.
  2. Azure pipeline builds and generates artifacts (binaries of libiio).
  3. Upon successful completion, libad9166 is automatically triggered, consuming the artifacts produced by libiio.
  4. Build and test results from both pipelines are reported back and displayed in the GitHub checks of libiio, ensuring end-to-end visibility.

NOTE: To enable communication of the libad build status to the upper build layer (libiio), the token must include the following permission:

  • Commit statuses repository permission (write).

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have followed the coding standards and guidelines
  • I have conducted a self-review of my own code changes
  • I have commented new code, particulary complex or unclear areas
  • I have built libad9166-iio and check no new warnings/errors were introduced
  • I have checked that my changes did not broke components that use libad9361-iio as dependency
  • I have updated the documentation accordingly (GitHub Pages, READMEs, etc)

@liviutomoiaga
liviutomoiaga marked this pull request as ready for review September 8, 2025 11:13
@liviutomoiaga
liviutomoiaga force-pushed the setup-azure-resource-trigger branch 7 times, most recently from f993cdd to ea3ce96 Compare September 8, 2025 13:41
@liviutomoiaga
liviutomoiaga marked this pull request as draft September 8, 2025 13:55
@liviutomoiaga
liviutomoiaga force-pushed the setup-azure-resource-trigger branch from ea3ce96 to bf55665 Compare September 8, 2025 14:04
Comment thread azure-pipelines.yml
strategy:
matrix:
ubuntu_20_04_x86_64:
image: 'tfcollins/libiio_ubuntu_20_04-ci:latest'

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.

Doesn't this container (tfcollins/libiio_ubuntu_20_04-ci:latest) already have installed libiio? If not, what does it contain extra compared with ubuntu-latest ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It doesn't have libiio installed, because we install the latest version of libiio to check compatibility.
I has the libiio and libad9166/libad9163 dependencies already installed, which are not found in the ubuntu image

Comment thread azure-pipelines.yml
Comment on lines +155 to +160
ls -al
cd dist
ls -al

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.

Probably you'll want to remove these debug commands.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This are not related with this PR, they appear as changes just because a indentation was added in order to separate them in two stages

Comment thread azure-pipelines.yml
set -e
sudo apt-get update
sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
sudo apt-get install -y g++-arm-linux-gnueabihf

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.

Why do you need so many compilers: gcc-arm-linux-gnueabihf , g++-arm-linux-gnueabihf , g++-aarch64-linux-gnu ? Are you building with all ?

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 here

Comment thread azure-pipelines.yml
displayName: "Setup"
- script: |
set -e
sudo docker run --platform "linux/$(arch)" --rm -t --privileged -e ARTIFACTNAME=$(artifactName) -v "$(Agent.BuildDirectory)/s":"/ci" -v "/usr/bin/qemu-$(arch)-static":"/usr/bin/qemu-$(arch)-static" "$(image)" /bin/bash -c "cd /ci/ && chmod +x ./CI/travis/$(build_script) && ./CI/travis/$(build_script)"

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 suppose we can push execution rights to the repo, so we won't need to change it every time. Please check if something like next script is possible:

git add ci-ubuntu.sh
git commit -m "ci-ubuntu.sh: make script executable"
git push```
If it works, it can be applied to all scripts from `CI/travis` folder.

Comment thread azure-pipelines.yml
macOS_15_x64:
poolName: 'Azure Pipelines'
vmImage: 'macOS-15'
agentName: 'Azure Pipelines 11'

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.

Please document the 'magic numbers' (in this example 11, 3, 2 ... ).
A comment with a short explanation is enough.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Because we use a hosted agent for two other builds, an agent name had to specified for the other two also, and Azure Pipelines 11 is the name of the cloud agent from Azure

Comment thread azure-pipelines.yml Outdated
Comment on lines +414 to +415
echo "Owner=$OWNER"
echo "Repo=$REPO"

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.

Are these echo's really necessary? or they were used for debugging and can be deleted?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Those were used for debug purpose. Those 2 echos are removed now

Comment thread azure-pipelines.yml Outdated
@liviutomoiaga
liviutomoiaga force-pushed the setup-azure-resource-trigger branch 11 times, most recently from 586e1f2 to 9564b31 Compare September 10, 2025 08:51
@liviutomoiaga
liviutomoiaga marked this pull request as ready for review September 10, 2025 10:31
…tion stage

Signed-off-by: Liviu Tomoiaga <Liviu.Tomoiaga@analog.com>
@liviutomoiaga
liviutomoiaga force-pushed the setup-azure-resource-trigger branch from 9564b31 to 740035f Compare September 10, 2025 10:34
@AAndrisa

Copy link
Copy Markdown

For some of the comments a new PR should be opened, that focuses on refactoring

@liviutomoiaga liviutomoiaga changed the title Setup azure resource trigger [FREEZED Until V1 Migration is Done] Setup azure resource trigger Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants