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

Add matrix strategy for targets #81

Open
xmnlab opened this issue Jan 11, 2024 · 0 comments
Open

Add matrix strategy for targets #81

xmnlab opened this issue Jan 11, 2024 · 0 comments
Labels
psf-grant-proposal Issues used for a PSF grant proposal size:large >16h

Comments

@xmnlab
Copy link
Member

xmnlab commented Jan 11, 2024

In some cases we would like to run a same command for multiples parameters. Currently it is possible using a "for loop" (in bash, or xonsh, etc) or using jinja2 "for loop".

it would be nice to do that using a matrix strategy, similar to what github actions does (for a entire job).

Example:

version: 1.0.0
groups:
  main:
    env-file: .env
    targets:
      print:
        help: print the values from a matrix strategy
        matrix:
          mytext: 
            - text1
            - text2
            - text3
        run: echo {{ matrix.mytext }}

when the command makim main.print is executed, it will run "echo" for each value in mytext list.
if more variables is defined in the matrix, it will run the run section for all the combination of variables.
the values for each variable in the matrix, should be a list

@xmnlab xmnlab added psf-grant-proposal Issues used for a PSF grant proposal size:large >16h labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
psf-grant-proposal Issues used for a PSF grant proposal size:large >16h
Projects
None yet
Development

No branches or pull requests

1 participant