-
Notifications
You must be signed in to change notification settings - Fork 73
Run Windows CI and publish artifacts #97
Comments
Thanks for telling me about Github Actions. I will read the documentation and see if I can get it working. |
I copied your main.yml file into the Curv repo, and it ran automatically. Very cool. There was a bug in the step "Copy runtime dependencies to build dir": it was using incorrect pathnames for the DLLs. After fixing the pathnames, it ran to completion. (No need to mess with the CMake configuration.) |
The CI integration is very useful. I get email if the windows build breaks. Thanks for that. |
What problem are you trying to solve with the "publish artifacts" part of this script?
|
Ah, wonderful! Running curv.exe from the artifact publisher in your last action build in this repo still reports those DLLs as missing, unfortunately. Not sure why as they are in the same directory.
It seemed a bit saner to be to let CMake do the copying - but that turned out to be non-trivial to get working. However, there was also another reason I messed with the CMake configuration: to add ccache.
Ideally, it would package all DLLs needed and be instantly runnable on Windows. It only needs |
The ldd command in MSYS2 shows a larger set of DLLs, because it is also finding indirect dependencies:
Hard coding the list of libraries would be fragile. Fortunately, we can put the above shell command into the build script to compute the list dynamically. |
Do all those files reside in |
I want the simplified Windows installation to contain g++; that's needed for generating STL files and 3D printing. My current idea is to use the following procedure:
This approach will give us a simple upgrade procedure:
It will allow Curv to be uninstalled using the uninstall GUI in the Windows Start menu (you uninstall MSYS2). |
While that sounds totally doable, it still has the problem that the user has to spend time compiling Curv. Even if that is done by How big is MSYS2? Would it be feasible to offer a reduced MSYS2 (incl. g++) + pre-built Curv therein? |
I just tested this, and you are correct. The Curv build is the most time consuming part. Maybe a hybrid approach would work. I have no idea how to create my own MSYS2 distribution. Sounds like a lot of work (possibly with ongoing maintenance)? I'm not inclined to pour a large amount of work into this. IMO a more reasonable approach with MSYS is to add a Curv package. Then you install MSYS2 and:
All the needed dependencies are pulled in automatically, so it's just this one command. To satisfy people who want to try out Curv "within seconds", the appropriate response is to make it run inside a web browser.
Exporting a shape to a file will not be initially supported. But you can install the native client to get the full capabilities. |
Correction, I just did a full Windows install from scratch, using the new script. Unfortunately I didn't time it, but the MSYS2 installation and pacman package installation took significantly longer than the Curv build. There's no way to do an install in "seconds" if MSYS2 is part of the installation. Either a web app or a stripped down GUI app (which I'm calling "gcurv") are required for a user-friendly instant-gratification experience. |
This sounds very cool if it works out. I've never compiled C(++) to JS via any of the tools, so can neither judge feasibility nor if end result would be usable perfomance-wise.
That I would find reasonable enough for Windows users. At least here you know as an end user that the probability of an error is much lower than compared to self-compilation. scratch plan:
|
@doug-moen, @ComFreek, maintainer of msys2/setup-msys here. Just some hints that you might find useful:
|
MSYS2 packages are binary. The reason for slow installation is the large number of dependencies. C:\msys64 on my system has 86,700 files. That's a lot, just to install Curv. I endorse the idea of a "light" version of Curv that installs quickly, and doesn't require a C++ compiler or an MSYS2 installation. Styrene (thanks @eine) looks promising as a tool for creating a Windows installer .exe and/or zipfile for Curv. Curv is not a typical Windows app. It is a command line utility. The
If Styrene can satisfy these requirements by reading a config file, that would be great. |
Styrene indeed sounds super useful for packaging a light Curv here. Roadmap:
I probably won't have time this week to look into anything listed above 😄 |
It would be nice to statically link Curv.exe, so that it doesn't depend on any DLLs from the MSYS2 distribution. I just noticed that the Windows distribution of OpenSCAD does this: they distribution openscad.exe without any DLLs. That would be another solution to the problem of how do you make curv.exe visible in the PATH without causing DLL conflicts. |
Static linking is easy: just add It almost works, except that MSYS2 does not provide static libraries for libHalf and libtbb. These libraries are only needed as dependencies for libopenvdb. Libopenvdb has been a "nightmare" dependency for a long time. It has created more trouble than all the others. I only use it for exporting a shape to a mesh file. I am going to consider replacing openvdb with an alternative open source meshing library. This has been on my TODO list for some time. There are a number to choose from on github, and the benefit is that I may be able to upgrade to a better algorithm that does sharp edge detection. |
Is your feature request related to a problem? Please describe.
Currently, Curv has the working Travis CI file (at least working in my fork) that I contributed to months ago, but
Describe the solution you'd like
Use GitHub actions. I have already come up with a working build which also uploads Curv Windows binaries: https://github.com/ComFreek/curv/runs/886676572
Advantages:
look at how small and concise the workflow file is in comparison to the Travis file this repo currently has.
the subaction
msys2/setup-msys
has built-in ability to cache all Mingw64 packages!artifact upload is a breeze
Right now the uploaded Windows binaries claim
libHalf-2_5.dll,tbb.dll,libopenvdb.dll,libboost_filesystem-mt.dll
are missing. A straight-forward copy procedure in the CMake configuration should be able to copy those DLLs automatically to./release
from which the GitHub Actions aggregates the artifact files and uploads them.Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: