Skip to content

Compile example reusable wflow #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 19, 2025
Merged

Conversation

jaenrig-ifx
Copy link
Member

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

This is the proposal for reusable compile-examples workflow for libraries:

Open questions to @ederjc :

  • Unlike the cores, this workflow is only running on ubuntu. I don´t think is relevant to check multiple OS for libraries. Agree?
  • This is currently installing the cores (our cores arduino-core-psoc6 and xmc-for-arduino) through the arduino-cli. This means that we are consuming release assets downloads in ci, affecting the user download numbers. I expect that currently the libraries are not exhaustively running these workflows (we will run them monthly or so?), and we can live with that "adulteration" of downloads.
    We can implement that mechanism, but we can maybe reuse the flow we implement for release candidates check. What do you think?

I need to cleanup and document the scripts in "arduino-devops". Meanwhile I keep this as draft.

@jaenrig-ifx jaenrig-ifx requested a review from ederjc May 13, 2025 15:58
@ederjc ederjc requested a review from Copilot May 14, 2025 08:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces a reusable workflow for compiling library examples by integrating the "Compile library examples" workflow from arduino-devops and providing an optional configuration file (ci-matrix-config.yml) to extend the default fqbn matrix for libraries. Key changes include:

  • Adding a ci-matrix-config.yml file that includes an esp32 board, defines exclusions for certain sketches, and adds an additional URL for core installation.
  • Creating a compile_examples.yml workflow that reuses the compile-examples-lib workflow from the Infineon/arduino-devops repository.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
ci-matrix-config.yml Adds custom inclusion and exclusion rules for board fqbn configurations and additional URL for esp32 core setup
.github/workflows/compile_examples.yml Introduces a reusable workflow that leverages the compile-examples-lib workflow from the Infineon/arduino-devops repo
Files not reviewed (1)
  • .github/workflows/build-check.yml: Language not supported

@ederjc
Copy link
Member

ederjc commented May 14, 2025

Unlike the cores, this workflow is only running on ubuntu. I don´t think is relevant to check multiple OS for libraries. Agree?

I would say we start like this and see if it's sufficient. I assume yes.

This means that we are consuming release assets downloads in ci, affecting the user download numbers.

This is fine. Our main metric is based on repo views, not release download numbers.

Why are secrets needed for this workflow?

@jaenrig-ifx
Copy link
Member Author

Unlike the cores, this workflow is only running on ubuntu. I don´t think is relevant to check multiple OS for libraries. Agree?

I would say we start like this and see if it's sufficient. I assume yes.

This means that we are consuming release assets downloads in ci, affecting the user download numbers.

This is fine. Our main metric is based on repo views, not release download numbers.

Why are secrets needed for this workflow?

Let me check if that is needed :)

@jaenrig-ifx jaenrig-ifx force-pushed the compile-example-reusable-wflow branch from 7229dce to a0e2754 Compare May 16, 2025 08:14
@jaenrig-ifx jaenrig-ifx force-pushed the compile-example-reusable-wflow branch from a0e2754 to 1cde631 Compare May 16, 2025 08:14
@jaenrig-ifx jaenrig-ifx marked this pull request as ready for review May 16, 2025 08:23
@ederjc
Copy link
Member

ederjc commented May 16, 2025

Before merging this, can you please have a look at these workflow call conditions?
Please apply this also here or recommend a better approach.

Requirements:

  • a scheduled run
  • option to call manually (workflow_call:)
  • on certain actions like push, tag, PR -> here you know better what's best.

@jaenrig-ifx
Copy link
Member Author

Before merging this, can you please have a look at these workflow call conditions? Please apply this also here or recommend a better approach.

Requirements:

  • a scheduled run
  • option to call manually (workflow_call:)
  • on certain actions like push, tag, PR -> here you know better what's best.

I will add them, but directly to this wflow (as they are not meaningful or possible in the reusable wflow):

  • schedule run -> yes
  • I think you mean workflow_dispatch -> yes
  • We can do:
    • push on "master" and "tag"
    • PR to "master"
      That way we skip the wflow to run for every commit on a development branch. Which can be a bit abusive. Do you agree?

I think we can get rid of the "develop" branch or?

@ederjc
Copy link
Member

ederjc commented May 16, 2025

I think you mean workflow_dispatch -> yes

Yes, I do mean workflow_dispatch and apparently got this wrong in my reference.

PR to "master"
That way we skip the wflow to run for every commit on a development branch. Which can be a bit abusive. Do you agree?

Did you look into the reference file above? My recommendation from there:

  • push: only master/main
  • PR: all branches
  • tags: all

What's your recommendation?

I think we can get rid of the "develop" branch or?

Yes.

@ederjc
Copy link
Member

ederjc commented May 19, 2025

👍

@jaenrig-ifx jaenrig-ifx merged commit 84dcc2a into master May 19, 2025
15 checks passed
@jaenrig-ifx jaenrig-ifx deleted the compile-example-reusable-wflow branch May 19, 2025 07:19
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.

2 participants