input-output-hk / actions

IOG GitHub Actions
2 stars 3 forks source link

Install ghcup if it's not already present #21

Closed neilmayhew closed 7 months ago

neilmayhew commented 7 months ago

It seems unwise to assume that ghcup will be in the runner environment.

In addition, when using nektos/act to test actions locally, ghcup isn't found and workflows using actions/haskell fail. This change fixes that. It does nothing if ghcup is already present, so there's no cost when running on the real GHA runner.

This is a recreation of #20 which can't be reopened because I deleted and recreated my fork.

cc @jasagredo

jasagredo commented 7 months ago

I think this PR is strictly superseded by https://github.com/input-output-hk/actions/pull/22

neilmayhew commented 7 months ago

The only difference is that #22 doesn't add $HOME/.cabal/bin to PATH, so tools installed using cabal install won't be found. I think it would be more flexible to have this, and it's also what the ghcup installer does when it modifies .bashrc.

However, I'm happy to close this in favour of #22.

jasagredo commented 7 months ago

Oh I must have forgotten it for Mac and Linux. I added it for windows. Will add it before merging. Thanks Neil!