calf icon indicating copy to clipboard operation
calf copied to clipboard

Need help to set up Github Actions

Open JohannesLorenz opened this issue 1 year ago • 14 comments

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!

JohannesLorenz avatar Oct 14 '23 22:10 JohannesLorenz

Hey @JohannesLorenz !

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

erickisos avatar Oct 18 '23 20:10 erickisos

@erickisos Thanks a lot :+1: 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 avatar Oct 22 '23 09:10 JohannesLorenz

@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.

JohannesLorenz avatar Feb 16 '24 20:02 JohannesLorenz

Hey @JohannesLorenz ! Let me take a quick look

erickisos avatar Feb 18 '24 15:02 erickisos

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!

erickisos avatar Feb 22 '24 21:02 erickisos

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!

JohannesLorenz avatar Aug 03 '24 12:08 JohannesLorenz

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

Rossmaxx avatar Aug 03 '24 15:08 Rossmaxx

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.

erickisos avatar Aug 27 '24 20:08 erickisos

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 avatar Aug 27 '24 21:08 JohannesLorenz

@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 avatar Aug 27 '24 22:08 JohannesLorenz

@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 avatar Aug 30 '24 22:08 JohannesLorenz

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!

JohannesLorenz avatar Sep 01 '24 22:09 JohannesLorenz

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

erickisos avatar Sep 21 '24 18:09 erickisos

@erickisos No problem, looking forward to your review.

JohannesLorenz avatar Sep 23 '24 09:09 JohannesLorenz

@erickisos friendly reminder, just in case you forgot.

JohannesLorenz avatar Oct 09 '24 00:10 JohannesLorenz

@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.

JohannesLorenz avatar Oct 19 '24 12:10 JohannesLorenz