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

CI on GitHub Actions using a patched haskell-ci generated workflow #189

Merged
merged 13 commits into from
Jun 18, 2021

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Jun 15, 2021

WIP, first successful run at https://github.com/andreasabel/alex/runs/2829343149?check_suite_focus=true

Rests on/includes PR #188.

@andreasabel
Copy link
Member Author

This PR is now ready.

Please have a look at the supplied DEVELOPER.md for the explanation of the philosophy of this CI: It uses the workflow generated by haskell-ci and adds bits that are specific to Alex:

  • additional dependencies: alex and happy
  • generate Scan.hs and Parser.hs before doing sdist
  • install the built Alex so that it can be found by the test runner (this seemed to be the easiest way, otherwise I have to somehow get reliably the path the build executable somewhere in dist-newstyle)

This PR should ideally squashed, but after merging #188 (so that #188's commits do not get squashed into the GHA specific stuff).

@andreasabel andreasabel marked this pull request as ready for review June 15, 2021 13:53
@Ericson2314
Copy link
Collaborator

I think I will just start with this one :).

Can you rebase this first? I think it would be good if the PR also didn't have the extra diff from #188, even if I do squash it, for anyone reading the PR after.

@andreasabel
Copy link
Member Author

I rebased it onto current master, so now the #188 bits are gone.
The commit sequence is otherwise unchanged and still reflects my try-and-error process, it is probably best to squash this into one commit.

@Ericson2314 Ericson2314 merged commit bedbdec into haskell:master Jun 18, 2021
andreasabel added a commit to andreasabel/happy that referenced this pull request Jul 14, 2021
Get CI on GitHub Actions via a patched workflow generated by haskell-ci.

- DEVELOPER.md explains how to regenerate the CI, e.g. in case of new GHCs.

- .github/haskell-ci.patch modifies the generated workflow by:
  * Setting flag 'bootstrap' to False in calls to cabal.
  * Installing happy instead of just building it.
  * Setting HAPPY and HC for running the tests.

- tests/Makefile has been modified to not overwrite already set HAPPY
  and HC variables.  This is needed to locate these executables correctly.

- cabal.haskell-ci contains configuration for running haskell-ci:
  It removes constraints on packages containers, mtl and transformers.
  Otherwise, these will be constrained to the GHC-shipped versions,
  which isn't compatible with happy for all GHC versions.

The logic behind this CI setup is identical to

  haskell/alex#189
andreasabel added a commit to andreasabel/happy that referenced this pull request Jul 14, 2021
Get CI on GitHub Actions via a patched workflow generated by haskell-ci.

- DEVELOPER.md explains how to regenerate the CI, e.g. in case of new GHCs.

- .github/haskell-ci.patch modifies the generated workflow by:
  * Setting flag 'bootstrap' to False in calls to cabal.
  * Installing happy instead of just building it.
  * Setting HAPPY and HC for running the tests.

- tests/Makefile has been modified to not overwrite already set HAPPY
  and HC variables.  This is needed to locate these executables correctly.

- cabal.haskell-ci contains configuration for running haskell-ci:
  It removes constraints on packages containers, mtl and transformers.
  Otherwise, these will be constrained to the GHC-shipped versions,
  which isn't compatible with happy for all GHC versions.

The logic behind this CI setup is identical to

  haskell/alex#189

[fixes haskell#189] [fixes haskell#193]
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