Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Replace Travis with Github Actions and Nix ❄️ #48

Merged
merged 5 commits into from
Dec 19, 2019
Merged

Replace Travis with Github Actions and Nix ❄️ #48

merged 5 commits into from
Dec 19, 2019

Conversation

kutyel
Copy link
Member

@kutyel kutyel commented Dec 17, 2019

Huge thanks to @domenkozar for the help! 😉 🙌

Fixes #22

@kutyel kutyel requested review from serras and pepegar December 17, 2019 13:40
Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Copy link
Member

@pepegar pepegar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, apart of that, LGTM! 🙌

.github/workflows/haskell.yml Outdated Show resolved Hide resolved
@serras
Copy link
Collaborator

serras commented Dec 17, 2019

It seems, looking at the logs, that Nix uses a different root directory when compiling:

2019-12-17T16:00:50.5995315Z src/Mu/Adapter/ProtoBuf/Example.hs:1:1: error:
2019-12-17T16:00:50.5999118Z     Exception when trying to run compile-time code:
2019-12-17T16:00:50.6001605Z       test/protobuf/example.proto: openFile: does not exist (No such file or directory)
2019-12-17T16:00:50.6003989Z     Code: protobuf
2019-12-17T16:00:50.6016555Z             "ExampleProtoBufSchema" "test/protobuf/example.proto"
2019-12-17T16:00:50.6016676Z   |
2019-12-17T16:00:50.6017105Z 1 | {-# language DataKinds       #-}

default.nix Outdated Show resolved Hide resolved
@kutyel kutyel changed the title Replace Travis with Github Actions and Nix ❄️ [WIP] Replace Travis with Github Actions and Nix ❄️ Dec 18, 2019
@domenkozar
Copy link

The downside of haskell.nix is that you have to compile GHC and everything up the to libraries first. It's a one time build you have to pay in order to get the benefit of not updating Nix when project goes on.

There's a way to use haskell.nix cachix to speed that up, but you'd need to pin the correct nixpkgs in that case (which may be ok with you?).

@kutyel
Copy link
Member Author

kutyel commented Dec 18, 2019

It seems, looking at the logs, that Nix uses a different root directory when compiling:

2019-12-17T16:00:50.5995315Z src/Mu/Adapter/ProtoBuf/Example.hs:1:1: error:
2019-12-17T16:00:50.5999118Z     Exception when trying to run compile-time code:
2019-12-17T16:00:50.6001605Z       test/protobuf/example.proto: openFile: does not exist (No such file or directory)
2019-12-17T16:00:50.6003989Z     Code: protobuf
2019-12-17T16:00:50.6016555Z             "ExampleProtoBufSchema" "test/protobuf/example.proto"
2019-12-17T16:00:50.6016676Z   |
2019-12-17T16:00:50.6017105Z 1 | {-# language DataKinds       #-}

I just added some changes that should fix this, thanks again @domenkozar 🎉

For reference, apparently cabal does not like external files, so you need to add them to your data-files entry on your cabal, I followed this post by Neil Mitchell 👏

@kutyel kutyel changed the title [WIP] Replace Travis with Github Actions and Nix ❄️ Replace Travis with Github Actions and Nix ❄️ Dec 18, 2019
@kutyel
Copy link
Member Author

kutyel commented Dec 19, 2019

@juanpedromoreno it seems like the 47deg.cachix.org account is not correctly configured:

responseBody = "{\"error\":\"No public key set yet. Run 'cachix generate-keypair' first.\"}"})

Can you please take a look? 😉

@kutyel
Copy link
Member Author

kutyel commented Dec 19, 2019

Ok, it is fixed now 🎉 It should work! 🤞

@kutyel kutyel merged commit dfd3b59 into master Dec 19, 2019
@kutyel kutyel deleted the cachix branch December 19, 2019 10:54
@kutyel kutyel restored the cachix branch December 19, 2019 11:19
@kutyel kutyel deleted the cachix branch January 9, 2020 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace Travis CI with Github Actions (Stack)
5 participants