Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add libfaust with llvm github action #862

Closed
wants to merge 3 commits into from

Conversation

DBraun
Copy link
Collaborator

@DBraun DBraun commented Mar 2, 2023

This sets up a new workflow that builds libfaust dynamic libraries with LLVM on macos, ubuntu, and windows. The workflow only launches via a button on the GitHub actions page. The build results in artifacts which can be downloaded at the bottom of the actions page:

https://github.com/DBraun/faust/actions/runs/4311010847

Windows artifact contains:

  • faust.dll
  • faust.lib
  • faust.exp

macos artifact contains:

  • libfaust.2.dylib
  • libOSCFaust.a

Note that the Ubuntu zip has duplicate files. To keep it smaller, I need to decide which of the three files to keep:

  • libfaust.so <-- I think this is a symbolic link
  • libfaust.so.2 <-- probably also symbolic
  • libfaust.so.2.58.9

The action/upload-artifact doesn't work well with symbolic links (actions/upload-artifact#93)

I ended up just uploading the entire build/lib folder, and I think that hardened the symbolic links into duplicate files, bloating the ubuntu zip.

@sletz
Copy link
Member

sletz commented Mar 2, 2023

build-macos is for x86_64 only, it is possible to build also the ARM version?

@DBraun
Copy link
Collaborator Author

DBraun commented Mar 2, 2023

build-macos is for x86_64 only, it is possible to build also the ARM version?

Unfortunately not yet on GitHub actions. Maybe one day they'll have ARM runner images. If it were possible, then there would be a new entry in the macos matrix like this:

          - name: macos-arm64
            os: macos-arm64  # or something else
            cmake-options: >-
              -DCMAKE_BUILD_TYPE=Release
              -DCMAKE_VERBOSE_MAKEFILE=ON
              -DCMAKE_OSX_ARCHITECTURES="arm64"
              -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
            llvm-options: >-
              -DLLVM_DEFAULT_TARGET_TRIPLE="arm64-apple-darwin19.6.0"
              -DLLVM_TARGETS_TO_BUILD="AArch64"
              -DLLVM_ENABLE_ZLIB=off
              -DLLVM_OPTIMIZED_TABLEGEN=ON
              -DCMAKE_INSTALL_PREFIX="./llvm"

@sletz
Copy link
Member

sletz commented Mar 2, 2023

@DBraun
Copy link
Collaborator Author

DBraun commented Mar 2, 2023

No more bloat in the ubuntu zip. It's just

  • libfaust.so
  • libOSCFaust.a

So I think we're good, except still no macos arm automation.

@DBraun
Copy link
Collaborator Author

DBraun commented Mar 2, 2023

Oh I'll look into what you said about pd-faustgen.

@DBraun
Copy link
Collaborator Author

DBraun commented Mar 3, 2023

For macos and ubuntu, it looks like libsndfile.a/so are already in the faust repo. Are those suitable for building with libfaust? Do they enable mp3/flac/ogg etc? The current obstacle is linking building/linking against arm64 versions of the dependencies to libsndfile. I'm trying brew on the GitHub action.

@sletz
Copy link
Member

sletz commented Mar 3, 2023

libsndfile.a/so are not directly need in libfaust, but in architectures files that implement the soundfile primitive and addition sound handling tools.

@DBraun
Copy link
Collaborator Author

DBraun commented Mar 3, 2023

What do you think about including it anyway? If yes, should we build libsndfile as a dynamic or static library? It would save me some duplicate work in DawDreamer/TD-Faust, and I imagine other users who link against libfaust will also want to link against sndfile often.

@DBraun
Copy link
Collaborator Author

DBraun commented Mar 4, 2023

Let's leave out sndfile. I'm going to have my arm64 mac this weekend and I'll prepare two llvm builds the same way pd-faustgen did.

@DBraun
Copy link
Collaborator Author

DBraun commented Mar 8, 2023

Closing in favor of #864

@DBraun DBraun closed this Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants