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

Need help to set up Github Actions #335

Open
JohannesLorenz opened this issue Oct 14, 2023 · 16 comments
Open

Need help to set up Github Actions #335

JohannesLorenz opened this issue Oct 14, 2023 · 16 comments

Comments

@JohannesLorenz
Copy link
Collaborator

JohannesLorenz commented Oct 14, 2023

Hello all,

@boomshop was kind enough to grant me writing permission, so I can at least merge some of the bug fixes to maintain CALF.

Before doing that, I want to setup a Github Actions CI, to avoid introducing new errors. I got linux-gcc, linux-clang, macos and mingw64 (cross-compile) running (see branch github-actions), but there are still open questions:

  1. Does anyone have instructions/Makefiles for MSVC compiling? I only know LMMS can do it, but they do it via CMake, which we do not use here.
  2. Are there any tests? I only found bigbull/test.py, but I have no idea what it is used for. Edit: Also found a benchmark.cpp.
  3. Which are the build artifacts? I assume we could build different packages for the different linuxes? I am also not sure how to do it for mac/mingw, so if anyone has knowledge there...

Thanks for any help!

@erickisos
Copy link
Contributor

Hey @JohannesLorenz !

I can help with the macos packaging if you want, but it will depend on the build action, wdyt?

@JohannesLorenz
Copy link
Collaborator Author

@erickisos Thanks a lot 👍 I will need to see how far I get with MacOS. For now, it looks OK. I will let you know when there are difficulties.

@JohannesLorenz
Copy link
Collaborator Author

@erickisos We currently have issue with the MacOS CI: https://github.com/calf-studio-gear/calf/actions/runs/7863604912/job/21454397740 . The exact error from this log is:

ld: library not found for -lgtk-quartz-2.0

Are you currently able to compile CALF from branch github-actions? Can you tell if any of the things that we do in the CI is wrong? Currently, we have this for macos-13:

      - name: Install dependencies
        run: brew install automake fluid-synth gtk+ cairo lv2
      - name: Check out
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Configure
        run: |
          mkdir build && cd build
          cmake .. -DCMAKE_INSTALL_PREFIX=../install
      - name: Build
        run: cmake --build build

Thanks on advance.

@erickisos
Copy link
Contributor

Hey @JohannesLorenz ! Let me take a quick look

@erickisos
Copy link
Contributor

Hey @JohannesLorenz after debugging the build process it looks like we were missing the reference to gtk-quartz, perhaps to everything being installed by homebrew, I've created the following PR (#345) that should fix the build issue.

Let me know if it works for you!

@JohannesLorenz
Copy link
Collaborator Author

I could need your input: Can you please tell me what files I need to create to make a "release"?

@erickisos (MacOS) , @Rossmaxx (Windows)

Thanks!

@Rossmaxx
Copy link
Contributor

Rossmaxx commented Aug 3, 2024

I believe it's just some CMake stuff. If not, you'll have to look at NSIS scripts, which is beyond my knowledge. @DomClark is the only one i can recommend

@erickisos
Copy link
Contributor

What do you mean about "which files are needed"?
For macOS, the basic package format is just *.pkg but I think this wonderful CPack thing might be able to help us here.

@JohannesLorenz
Copy link
Collaborator Author

What do you mean about "which files are needed"? For macOS, the basic package format is just *.pkg

According to this list , there are 4 generators PACKAGEMAKER, DRAGNDROP, BUNDLE and OSXX11. PACKAGEMANAGER sounds like "pkg", I can give that a try.

@JohannesLorenz
Copy link
Collaborator Author

@erickisos I added cpack -G productbuild, but it did not work. It complained a lot about missing directories, which I do not understand. Here is what I did:

  macos:
    name: macos
    runs-on: macos-13
    steps:
      - name: Install python3
        run: brew install --overwrite [email protected]
      - name: Install dependencies
        run: brew install automake fluid-synth gtk+ lv2 gtk-mac-integration expat
      - name: Check out
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Configure
        run: |
          export LDFLAGS="-L$(brew --prefix)/lib"
          export CPPFLAGS="-I$(brew --prefix expat)/include"
          mkdir build && cd build
          cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_SHARED_LINKER_FLAGS="-L$(brew --prefix)/lib -Wl,-rpath,$(brew --prefix)/lib" -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/include"
      - name: Build
        run: cmake --build build
      - name: Package
        run: |
          cd build
          cpack -G productbuild

Error:

Error creating directory "/Users/runner/work/calf/calf/install/lib/lv2/calf.lv2".

Can you run these steps on your own MacBook and reproduce the error? Any idea what's wrong?

@JohannesLorenz
Copy link
Collaborator Author

@erickisos I finally managed to build a macOS PKG file! But I cannot test it. Can you please check if you can work with the macOS file from https://github.com/calf-studio-gear/calf/actions/runs/10640016950 ?

@JohannesLorenz
Copy link
Collaborator Author

Good news, now we have PKG for MacOS and Installer for Windows (x64):

https://github.com/calf-studio-gear/calf/actions/runs/10657742464

Please test!

@erickisos
Copy link
Contributor

I apologize for the delay, let me give it a try. It honestly looks great!

@JohannesLorenz
Copy link
Collaborator Author

@erickisos No problem, looking forward to your review.

@JohannesLorenz
Copy link
Collaborator Author

@erickisos friendly reminder, just in case you forgot.

@JohannesLorenz
Copy link
Collaborator Author

@erickisos Last reminder. You said you would give feedback, but that was 1 month ago. If you won't report anything within the next 7 days, I will just do the release, because the project needs some progress.

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

No branches or pull requests

3 participants