You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for_each is useful for enumerating a list of targets. I use it to loop over multiple Debian and Ubuntu releases, say ["buster", "bullseye", "bionic", "focal"]. So I have a distros/ folder with one yaml file in it per target distribution, each with the tag names and other details that are necessary for building for that distro.
I'd like to add target architectures to that, but it does not seem possible. I want to add a second loop over the target architecutres, say ["aarch64", "powerpc64", "x86_64"], which works the same way: an arches/ folder with one yaml file in it per target architecture, each with the details necessary for building for that architecture.
The desired result would be a nested pair of for-loops, one for distro, one for architecture. Like this pseudo-code:
This would produce the cartesian product of files in distros/ and files in arches/; with one merged output file for each pairing. This syntax is not limited to 2 dimensions, but my current use case is 2-dimensional.
One possible aviator.yml syntax might look like this:
I can kinda get functionality similar to this now, by generating a third directory full of pre-merged pairings like "focal_aarch64.yaml", "bullseye_x86_64.yaml", etc, and using for_each to loop over those. But to accomplish this, I'm doing ugly shell loops in a Makefile... it would be nice if the tool could automate this.
The text was updated successfully, but these errors were encountered:
for_each
is useful for enumerating a list of targets. I use it to loop over multiple Debian and Ubuntu releases, say["buster", "bullseye", "bionic", "focal"]
. So I have adistros/
folder with one yaml file in it per target distribution, each with the tag names and other details that are necessary for building for that distro.I'd like to add target architectures to that, but it does not seem possible. I want to add a second loop over the target architecutres, say
["aarch64", "powerpc64", "x86_64"]
, which works the same way: anarches/
folder with one yaml file in it per target architecture, each with the details necessary for building for that architecture.The desired result would be a nested pair of for-loops, one for distro, one for architecture. Like this pseudo-code:
This would produce the cartesian product of files in
distros/
and files inarches/
; with one merged output file for each pairing. This syntax is not limited to 2 dimensions, but my current use case is 2-dimensional.One possible
aviator.yml
syntax might look like this:I can kinda get functionality similar to this now, by generating a third directory full of pre-merged pairings like "focal_aarch64.yaml", "bullseye_x86_64.yaml", etc, and using
for_each
to loop over those. But to accomplish this, I'm doing ugly shell loops in a Makefile... it would be nice if the tool could automate this.The text was updated successfully, but these errors were encountered: