Windows Haskell CI

Like ghc itself, we (the Darcs team) also have trouble providing adequate support for Windows. I personally haven't (seriously) used Windows for decades. So I thought we could at least do some automated building and testing for Windows on some CI system, perhaps even automatically build Windows binaries. Is there a free CI service that you could recommend that ideally supports at least Windows, MacOS, and Linux and that has good support for Haskell programs, i.e. some recent ghc and cabal pre-installed? If not, what could be an alternative solution? Any kind of comments or hints are appreciated. Cheers Ben

Hello Ben, I have a daring (and probably) proposal. On Mon, Apr 27, 2020 at 02:38:40PM +0200, Ben Franksen wrote:
Like ghc itself, we (the Darcs team) also have trouble providing adequate support for Windows. I personally haven't (seriously) used Windows for decades. So I thought we could at least do some automated building and testing for Windows on some CI system, perhaps even automatically build Windows binaries.
Recently I was contacted by a user of a small script of mine [1]. He downloaded the (x86_64) binary and used it on Windows (10?) via «Windows Subsystem of Linux». $ uname -a Linux DESKTOP-AHPUUO5 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux I found this fantastic as I loathe dealing with Wine of Virtual Machines to provide Win users with a binary. I have not touched Windows since XP, but how feasible is it to call it a day and tell Win users: «From now on, Darcs will be available on Windows via WSL»? -F [1] https://hackage.haskell.org/package/gscholar-rss

Hi Franceso Am 27.04.20 um 14:57 schrieb Francesco Ariis:
Recently I was contacted by a user of a small script of mine [1]. He downloaded the (x86_64) binary and used it on Windows (10?) via «Windows Subsystem of Linux».
$ uname -a Linux DESKTOP-AHPUUO5 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
I found this fantastic as I loathe dealing with Wine of Virtual Machines to provide Win users with a binary.
I have not touched Windows since XP, but how feasible is it to call it a day and tell Win users: «From now on, Darcs will be available on Windows via WSL»?
It is tempting. But it feels a bit like defeat. Large parts of the Haskell ecosystem work perfectly fine on Windows; a lot of effort has been spent to make standard IO actions work there. I think it would be a waste not to use that infrastructure and build native Windows binaries. Still, thanks for mentioning the possibility. We may come back to it as a last resort. Cheers Ben

Hi, Am Montag, den 27.04.2020, 14:57 +0200 schrieb Francesco Ariis:
Recently I was contacted by a user of a small script of mine [1]. He downloaded the (x86_64) binary and used it on Windows (10?) via «Windows Subsystem of Linux».
$ uname -a Linux DESKTOP-AHPUUO5 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
I found this fantastic as I loathe dealing with Wine of Virtual Machines to provide Win users with a binary.
for my tttool project, I have long used wine to make the Windows release, but lately I have switch to cross compilation via nix. It took some experimentation to set up, but now I can produce a single release zip file that works on Windows, Linux and OSX, all on fairly standard CI (Travis, but Github Actions would also work): https://travis-ci.org/github/entropia/tip-toi-reveng https://github.com/entropia/tip-toi-reveng/blob/master/.travis.yml https://github.com/entropia/tip-toi-reveng/tree/master/nix Happy to explain more if people have questions. It doesn't help for people who want to develop _on_ windows, but at least releasing _for_ windows is prettty painless this way. Cheers, Joachim -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/

Am 29.04.20 um 23:43 schrieb Joachim Breitner:
for my tttool project, I have long used wine to make the Windows release, but lately I have switch to cross compilation via nix. It took some experimentation to set up, but now I can produce a single release zip file that works on Windows, Linux and OSX, all on fairly standard CI (Travis, but Github Actions would also work):
https://travis-ci.org/github/entropia/tip-toi-reveng https://github.com/entropia/tip-toi-reveng/blob/master/.travis.yml https://github.com/entropia/tip-toi-reveng/tree/master/nix
Happy to explain more if people have questions.
It doesn't help for people who want to develop _on_ windows, but at least releasing _for_ windows is prettty painless this way.
Indeed, developing on Windows is something we'd very much like to avoid. But what we definitely need is to be able to run our test suite on Windows; and a significant part of that are a couple hundred bash scripts. If your approach could handle that, I'd be interested to know more. Cheers Ben

On 29/04/2020 23:20, Ben Franksen wrote:
It doesn't help for people who want to develop _on_ windows, but at least releasing _for_ windows is prettty painless this way.
Indeed, developing on Windows is something we'd very much like to avoid.
As another darcs developer, I'm ambivalent about it. Windows certainly has its pain points but it's the native OS on my primary machine and developing in that OS rather than inside a VM does make many things simpler. But it's pretty clear no-one else wants to get too close :-)
But what we definitely need is to be able to run our test suite on Windows; and a significant part of that are a couple hundred bash scripts. If your approach could handle that, I'd be interested to know more.
Given how slow bash scripts are on Windows, another strategy would be to simply rewrite them in something else, e.g. something we can directly interpret in Haskell. But whatever it is would still require running compiled code on Windows somehow. Cheers, Ganesh

Hi,
In my team at IOHK we are using `github-actions` to compile and run tests natively on Windows. We are provisioning a windows machine using, now the official installation procedure of GHC on Windows: via chocolatey. We've been using it for some time and it works quite good for us so far.
Here's our github-action script:
https://github.com/input-output-hk/ouroboros-network/blob/master/.github/wor...
Cheers,
Marcin Szamotulski
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, May 4, 2020 8:53 PM, Ganesh Sittampalam
On 29/04/2020 23:20, Ben Franksen wrote:
It doesn't help for people who want to develop on windows, but at least releasing for windows is prettty painless this way.
Indeed, developing on Windows is something we'd very much like to avoid.
As another darcs developer, I'm ambivalent about it. Windows certainly has its pain points but it's the native OS on my primary machine and developing in that OS rather than inside a VM does make many things simpler. But it's pretty clear no-one else wants to get too close :-)
But what we definitely need is to be able to run our test suite on Windows; and a significant part of that are a couple hundred bash scripts. If your approach could handle that, I'd be interested to know more.
Given how slow bash scripts are on Windows, another strategy would be to simply rewrite them in something else, e.g. something we can directly interpret in Haskell. But whatever it is would still require running compiled code on Windows somehow.
Cheers,
Ganesh
Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

AppVeyor worked pretty reliably for me, though I haven't touched it in 3 years: https://ci.appveyor.com/project/berdario/c-repl/history As you can see, a new build can complete in less than 4 minutes The configuration is here: https://github.com/berdario/jira2sheet/blob/master/appveyor.yml (it also automatically uploads built artifacts on github) Don't pay too much attention to the code, I wrote it that way to get some practice with mtl-style effects, and it might be a bit too complex for its own good :) On Wed, May 6, 2020 at 11:49 AM Marcin Szamotulski via Haskell-Cafe < haskell-cafe@haskell.org> wrote:
Hi,
In my team at IOHK we are using `github-actions` to compile and run tests natively on Windows. We are provisioning a windows machine using, now the official installation procedure of GHC on Windows: via chocolatey. We've been using it for some time and it works quite good for us so far.
Here's our github-action script:
https://github.com/input-output-hk/ouroboros-network/blob/master/.github/wor...
Cheers, Marcin Szamotulski
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Monday, May 4, 2020 8:53 PM, Ganesh Sittampalam
wrote: On 29/04/2020 23:20, Ben Franksen wrote:
It doesn't help for people who want to develop on windows, but at least releasing for windows is prettty painless this way.
Indeed, developing on Windows is something we'd very much like to avoid.
As another darcs developer, I'm ambivalent about it. Windows certainly has its pain points but it's the native OS on my primary machine and developing in that OS rather than inside a VM does make many things simpler. But it's pretty clear no-one else wants to get too close :-)
But what we definitely need is to be able to run our test suite on Windows; and a significant part of that are a couple hundred bash scripts. If your approach could handle that, I'd be interested to know more.
Given how slow bash scripts are on Windows, another strategy would be to simply rewrite them in something else, e.g. something we can directly interpret in Haskell. But whatever it is would still require running compiled code on Windows somehow.
Cheers,
Ganesh
Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Hi Everyone thanks for you input; I'll certainly take a look at your various solutions. Hi Ganesh Am 04.05.20 um 20:53 schrieb Ganesh Sittampalam:
On 29/04/2020 23:20, Ben Franksen wrote:
Indeed, developing on Windows is something we'd very much like to avoid.
As another darcs developer, I'm ambivalent about it. Windows certainly has its pain points but it's the native OS on my primary machine and developing in that OS rather than inside a VM does make many things simpler. But it's pretty clear no-one else wants to get too close :-)
Sorry, I should have been speaking only for myself. My goal is to have a way to build and run the tests on Windows without being bogged down with Windows intricacies. I think that indeed Appveyor may serve this purpose. We'll have to create a small git repo with the configuration and a small number of scripts ("batch files"?) to manage the darcs side of things, like cloning our repo(s). I know of at least on example where it was done in this way.
But what we definitely need is to be able to run our test suite on Windows; and a significant part of that are a couple hundred bash scripts. If your approach could handle that, I'd be interested to know more.
Given how slow bash scripts are on Windows, another strategy would be to simply rewrite them in something else, e.g. something we can directly interpret in Haskell. But whatever it is would still require running compiled code on Windows somehow.
You must be aware that we currently have 380 bash scripts. Rewriting them all cannot be described with the word "simply", even if such a translation were simple for a single script, which I doubt very much it is. We should probably continue to discuss this on darcs-devel. Cheers Ben

On Mon, 27 Apr 2020, Ben Franksen wrote:
Is there a free CI service that you could recommend that ideally supports at least Windows, MacOS, and Linux and that has good support for Haskell programs, i.e. some recent ghc and cabal pre-installed? If not, what could be an alternative solution?
I only know of AppVeyor. I think it's Windows only, but I had no success to build something, so far. :-(
From time to time Windows users asked me to make my MIDI-to-music-box-stripe converter available for Windows: https://hackage.haskell.org/package/midi-music-box
participants (7)
-
Ben Franksen
-
Dario Bertini
-
Francesco Ariis
-
Ganesh Sittampalam
-
Henning Thielemann
-
Joachim Breitner
-
Marcin Szamotulski