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

Provide more information in the build matrix #52

Open
mmhat opened this issue Sep 2, 2024 · 2 comments
Open

Provide more information in the build matrix #52

mmhat opened this issue Sep 2, 2024 · 2 comments

Comments

@mmhat
Copy link
Contributor

mmhat commented Sep 2, 2024

In Kleidukos/print-api#16 (comment) and in Kleidukos/print-api#24 (comment) I expressed the need for more information in the build matrix generated by get-tested.
For example, given a stanza

tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.10.1

I think it was nice if get-tested indicates what the oldest and the newest GHC version in the tested-with field is.
The build matrix I envision could be something like:

matrix:
  include:
  - ghc: 8.10.7
    oldest: true
    newest: false
  - ghc: 9.2.8
    oldest: false
    newest: false
  - ghc: 9.10.1
    oldest: false
    newest: true

With those additional fields at hand it would be possible to run some jobs/steps only for the oldest or the newest version respectively.

Also, it was nice if get tested had options like --oldest-only (oldest-only: <true|false> in the GH action) and --newest-only (newest-only: <true|false> in the GH action) to generate a matrix containing only the oldest or newest version.

A potential usecase is Kleidukos/print-api#24.

@Kleidukos
Copy link
Owner

Kleidukos commented Sep 2, 2024

Regarding get-tested having --oldest-only or --newest-only, this is very reasonable.

Regarding how the action controls it, I'll have to think about the ergonomic and how to implement. But I'll get onto the flags today.

By the way, @mmhat you named *-only, the "only" means that passing --newest-only and --latest-only will result in a conflict.
Do you think there is value in allowing --newest and --oldest simultaneously? I feel like preventing their combination could be overly restrictive.

@mmhat
Copy link
Contributor Author

mmhat commented Sep 2, 2024

By the way, @mmhat you named *-only, the "only" means that passing --newest-only and --latest-only will result in a conflict. Do you think there is value in allowing --newest and --oldest simultaneously? I feel like preventing their combination could be overly restrictive.

Theoretically they won't conflict if the tested-with stanza contains only version, but I think that's an edge case not worth supporting. So, yes, they should be mutually exclusive, and get-tested should fail if both are given.

EDIT: Ah, I saw you found a different solution in #53 . I like it!

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

No branches or pull requests

2 participants