Skip to content
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

Ability to exclude specific examples in a matrix build #129

Closed
3 tasks done
tfry-git opened this issue Apr 2, 2023 · 3 comments
Closed
3 tasks done

Ability to exclude specific examples in a matrix build #129

tfry-git opened this issue Apr 2, 2023 · 3 comments
Assignees
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@tfry-git
Copy link

tfry-git commented Apr 2, 2023

Describe the request

Almost all of the (many) examples in my library are meant to work on all supported boards. However, there are a few exceptions that are specific to a certain platform.

I am aware that I can define a "positive" matrix to the effect of "sketches A and B should be compiled for all platforms, but sketch C should only be compiled for AVR". However, this approach is a) pretty verbose, where dozens of examples are involved, and b) just waiting to get outdated as new examples are added/removed.

What I would like to be able to do, therefore, is to exclude certain sketches from a path, i.e. "all sketches should be compiled for all platforms, except sketch C should be excluded on RP2040". I'm thinking of perhaps a "exclude-sketch-paths" to be applied after "sketch-paths".

Describe the current behavior

sketch-paths input allows to define a (recursive) positive whitelist of examples to compile, but there does not seem to be an exclude-sketch-paths counterpart.

'arduino/compile-sketches' version

v1.1.0

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details
@tfry-git tfry-git added the type: enhancement Proposed improvement label Apr 2, 2023
@per1234 per1234 self-assigned this Apr 2, 2023
@per1234 per1234 added the topic: code Related to content of the project itself label Apr 2, 2023
@per1234
Copy link
Collaborator

per1234 commented Apr 2, 2023

Hi @tfry-git. This capability is already provided by the GitHub Actions workflow framework:

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixexclude

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2023
@per1234 per1234 added the conclusion: declined Will not be worked on label Apr 2, 2023
@tfry-git
Copy link
Author

tfry-git commented Apr 3, 2023

I admit that I wasn't aware of matrix exclude, but I don't think that helps (or I am too dense, which would turn this into a request for an added example in the documentation):

The problem is that sketch directories are matched recursively (for a good reason!), but I want to exclude only a sub-path (i.e. not something that can be had on the level of the matrix). I.e., I want to write:

   sketch-paths: |
      - examples
   exclude-sketch-paths: |
      - examples/Just_this_one

(Which, coming to think about it, is even independent from matrix builds, in the first place).

@TheNitek
Copy link

@per1234 any chance to un-decline this? I am in the same situation as the poster and it would come very handy to exclude a specific example for some of the platforms!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

3 participants