nh2 / static-haskell-nix

easily build most Haskell programs into fully static Linux executables
388 stars 36 forks source link

Add CI #27

Closed nmattia closed 5 years ago

nmattia commented 5 years ago

Adds a CircleCI config that builds the survey and uploads the build artifacts to cachix. Next steps:

CC @nh2 @basvandijk

nh2 commented 5 years ago

Some more questions:

nh2 commented 5 years ago

Now suddently I'm getting:

https://circleci.com/gh/nh2/static-haskell-nix/4

Fatal error: glibc detected an invalid stdio handle
Aborted (core dumped)
Exited with code 134
nmattia commented 5 years ago

Workaround: https://github.com/nmattia/niv/blob/ed8c23faeff2fd3c54677b8ef381e7baad8280f2/.circleci/config.yml#L35

nh2 commented 5 years ago

Hmm OK. Trying with https://github.com/nh2/static-haskell-nix/commit/bc4b14493bd6f9af4a64dabbbf470e3c0c5897e5

https://circleci.com/gh/nh2/static-haskell-nix/5

nh2 commented 5 years ago

@nmattia Hmm getting the next weird stuff:

https://circleci.com/gh/nh2/static-haskell-nix/5

#!/bin/bash -eo pipefail
cachix push static-haskell-nix --watch-store

Watching /nix/store for new builds ...
pushing /nix/store/y6kzzrm6lw5f9f2cpwv5cshg1kmpy28d-hedgehog-0.6.1
...
pushing /nix/store/i4l84xrwpskjxsaw3h5k1jygxvmdjq73-servant-client-0.15
pushing /nix/store/fc6mxy4wg6byr2m1far14qyh32df8fnm-servant-swagger-ui-core-0.3.2
pushing /nix/store/26z0kipp9am1fgcw8r3vf0qlmcnh7syi-servant-conduit-0.15
pushing /nix/store/1rpk3hkwphnq0jbwjnvhj0dibv67bs6s-cachix-api-0.2.0
Step was canceled

Step was canceled?

Also it still went green nevertheless, but that stage went grey somehow.

nmattia commented 5 years ago

That's normal; cachix runs in the background and gets canceled when the main job finishes

nh2 commented 5 years ago

@nmattia ~Ah, is this perhaps because it runs as a daemon?~ I should have refreshed, seeing your answer now.

If yes, it it possble to make that clear somehow?

nmattia commented 5 years ago

Make it clearer from what point of view? It's currently using CircleCI's support for background steps but you could use cachix ... & instead

nh2 commented 5 years ago

I'll just rename the section heading to Run cachix in background (it is normal for this to be cancelled at the end), that should do.

Cool this is working now!