anyone has a .github/workflows
CI setup using https://github.com/DeLaGuardo/setup-clojure and exercising it over Windows?
I'm curious to see how a (possiby advanced) clj pipeline on windows looks like. I have zero experience in this area
@vemv I have multiple projects running in Windows CI, but I stick with Appveyor for Windows since this has given me the least amount of headaches.
Also I use bb --clojure
or deps.exe
in Windows CI for the same reason (less headaches than the Powershell stuff)
Here is one for a relatively simple project: https://github.com/babashka/pod-babashka-buddy/blob/main/appveyor.yml
Is GH actions too problematic? Ideally I'd extend my existing macos+linux matrix to also span Win
Not sure, I haven't spent much energy on that. I did replicate my CircleCI setup to Github actions, but found CircleCI more pleasant to work with. The idea I'm getting from Actions is that it's good for running things on your code, like linters, but not so much for builds that require non-trivial performance.
And the UI is fairly annoying too (no output for several hours and then after 6 hours an e-mail that your build failed).
I can second that :) currently using GH Actions for org reasons I wonder if there's a Circle template for clj+win
I think the ideas from the appveyor example I just posted translate fairly well to other CI envs
good call, thanks!
You might also be able to use scoop
to install the official clj
tool, but for GraalVM builds this doesn't work as it is powershell
And Graal builds need cmd.exe
@vemv FWIW, I use GitHub Actions on Windows for rewrite-cljc. https://github.com/lread/rewrite-cljc-playground/blob/c09689e955d650fe7564a955ae22a2f02b7352fe/.github/workflows/unit-test.yml#L82 (well actually deps.exe and then I pretend it is clojure.exe).
@lee Note that with the latest bb
you can also do bb --clojure
without installing deps.exe
(but imitating "clojure" might be more difficult in Windows, dunno)
Good to know, thanks @borkdude!
The escaping rules on various Windows shells for various windows executable targets are mind numbing to me. I started to try to understand them, maybe I’ll get back to that someday…
@lee The most important one I find in almost every tool I write is the escaping of double quotes. This is now the default in babashka.process on Windows.
(for shelling out that is)
Ya, that helps tons. But the full story is weird and complicated. https://github.com/lread/info-process-builder, which is currently not at all deep.
Maybe I’ll get back to that someday…
The escape function in babashka.process is pluggable, so if you have better rules, you can override it
Dat’s cool, I actually remember you doing that!
It manifests itself mostly when sending EDN or JSON as ProcessBuilder args. I've also made a PR to depstar to fix it there
I had such a weird time with trying to send some clj-kondo config that contained [
and ^
along the Windows cmd line that I gave up and moved the config to a file.
oh yea, the carrets..
🥕😡
that's handy, thanks! kudos @borkdude for the related work