csound / plugins

Repository for Csound plugins which were originally in the main repository, and for new plugins as well.
GNU Lesser General Public License v2.1
11 stars 11 forks source link

Enable linux and mac build in workflow #19

Open stekyne opened 1 year ago

stekyne commented 1 year ago
stekyne commented 1 month ago

@vlazzarini I think this is good enough to merge after this long time and lot of changes. Let me know what you think

stekyne commented 1 month ago

@vlazzarini You're right. I had tried to think of more sustainable mechanisms, such as adding Csound to chocolatey and installing that before running the build. That way the FindCsound.cmake would work on windows. On Linux and Mac, we'd just use the normal package managers and the same FindCsound.cmake method. This was quite slow though and not always working for some reason. I'm also not sure does it work with multiple versions of Csound installed? I figured that the APIs are not changing much or at least, not enough to break the plugins here so I just dumped them into the repo to make it more reliable.

We can do another way if you think it's better but it's working for now.

vlazzarini commented 1 month ago

Can we try doing like I'm doing here with libsndfile?

https://github.com/csound/csound/pull/1986

see the macosx vanilla workflow. We could do something similar with Csound here?

Alternatively, could we not do git submodule?

stekyne commented 1 month ago

Some of the headers are compiled during the build so I don't think we can just lift the headers from the repo or use a submodule/subtree. It's also not that great a DX for local dev. I guess installing a build of Csound makes the most sense and the plugin build already looks for the appropriate csound env vars to find the headers but does this actually work having Csound 6 and 7 installed side by side? If not, then we'll have to do something else.

vlazzarini commented 1 month ago

Exactly, the raw headers are incomplete. We need to run a build, install somewhere and then pull the headers. I suppose we should be ok with separate actions for each version. A simple build is very quick, at least on Mac and Linux, we install locally and then pass the path to CMake.

Another alternative is just to run CMake, and the incomplete headers are created in the include subdir, we can copy from that. We don't need a full build, but we will still need to install libsndfile to get CMake to run correctly, so it's not much of a gain.