From 1dcb29af9bc3390eecff3352e03c74a08ef606f0 Mon Sep 17 00:00:00 2001 From: Johannes Lorenz Date: Sat, 3 Aug 2024 14:34:10 +0200 Subject: [PATCH] Add CI (CMake) Co-authored-by: Erick G. Islas-Osuna --- .github/workflows/build.yml | 150 ++++++++++++++++++++++++++++++++++++ README.md | 2 + 2 files changed, 152 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..a7c6746ad --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,150 @@ +--- +name: build +'on': [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + linux-gcc: + name: linux-gcc + runs-on: ubuntu-latest + steps: + - name: Update + run: sudo apt-get --yes update + - name: Install dependencies + run: sudo apt-get --yes install fluidsynth libfluidsynth-dev sordi gtk+2.0 libgtk2.0-dev libcairo2 lv2-dev + - 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 + linux-clang-with-lld: + name: linux-clang-with-lld # clang with LLVM's linker LLD + runs-on: ubuntu-latest + steps: + - name: Update + run: sudo apt-get --yes update + - name: Install dependencies + run: sudo apt-get --yes install fluidsynth libfluidsynth-dev sordi gtk+2.0 libgtk2.0-dev libcairo2 lv2-dev + - name: Check out + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Configure + run: > + mkdir build && cd build && + cmake .. + -DCMAKE_INSTALL_PREFIX=../install + -DCMAKE_C_COMPILER=clang + -DCMAKE_CXX_COMPILER=clang++ + -DCMAKE_C_FLAGS="-fuse-ld=lld" + -DCMAKE_CXX_FLAGS="-fuse-ld=lld" + - name: Build + run: cmake --build build + macos: + name: macos + runs-on: macos-13 + steps: + - name: Install dependencies + run: brew install automake fluid-synth gtk+ cairo lv2 gtk-mac-integration expat + - name: Check out + uses: actions/checkout@v3 + 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 + # install does not work yet, but seems less critical for now + msvc: + name: msvc + runs-on: windows-latest + steps: + - name: Check out + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cache vcpkg dependencies + id: cache-deps + uses: actions/cache@v3 + with: + key: vcpkg-x64-${{ hashFiles('vcpkg.json') }} + restore-keys: | + vcpkg-x64- + path: build\vcpkg_installed + - name: Configure + run: > + cmake + -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake . + - name: Build + run: cmake --build . + # install does not work yet, but seems less critical for now +# mingw-cross: +# strategy: +# matrix: +# compiler: +# - {bits: '32'} +# - {bits: '64'} +# name: mingw-${{matrix.compiler.bits}}-cross +# runs-on: ubuntu-latest +# steps: +# - name: Check out +# uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# - name: Install MinGW +# run: | +# sudo dpkg --add-architecture i386 # for wine32 +# sudo apt-get update # due to new architecture +# sudo apt-get install -y mingw-w64 +# - name: Compile dependencies +# run: | +# calf_pwd=$PWD +# cd /tmp +# wget https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.bz2 +# tar xjf expat-2.5.0.tar.bz2 +# cd expat-2.5.0 +# ./buildconf.sh +# mkdir build +# cd build +# export CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ LD=i686-w64-mingw32-ld QA_PROCESSOR=gcov +# cmake -DCMAKE_SYSTEM_NAME=Windows -DWIN32=ON -DMINGW=ON -DEXPAT_ATTR_INFO=ON .. +# make VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 all +# sudo make install +# cd /tmp +# rm -rf /tmp/expat-2.5.0 +# wget https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.4.tar.gz +# tar xfz v2.3.4.tar.gz +# cd fluidsynth-2.3.4 +# mkdir build +# cd build +# ls -la $calf_pwd/.. +# ls -la $calf_pwd +# ls -la $calf_pwd/cmake/toolchains +# export PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig +# cmake -DCMAKE_TOOLCHAIN_FILE=$calf_pwd/cmake/toolchains/FluidSynth-${{matrix.compiler.bits}}.cmake -Denable-libsndfile=0 -Denable-dbus=0 -Denable-pulseaudio=0 -Denable-jack=0 .. +# sudo make install +# - name: Install dependencies +# run: | +# sudo add-apt-repository ppa:tobydox/mingw-w64 +# sudo apt update +# sudo apt-get install -y fluidsynth-mingw-w64 +# - name: Configure +# run: > +# mkdir build && cd build && +# PATH=/opt/mingw${{matrix.compiler.bits}}/bin:$PATH +# cmake .. +# -DCMAKE_INSTALL_PREFIX=../install +# -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/Ubuntu-MinGW-W64-${{matrix.compiler.bits}}.cmake +# -DCMAKE_PREFIX_PATH=/opt/mingw${{matrix.compiler.bits}} +# - name: Build +# run: cmake --build build diff --git a/README.md b/README.md index 348f652e3..03163abf9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ Calf Studio gear ================ +[![Build status](https://github.com/calf-studio-gear/calf/actions/workflows/build.yml/badge.svg)](https://github.com/calf-studio-gear/calf/actions/workflows/build.yml) + Calf Studio Gear is an audio plug-in pack for LV2 and JACK environments under LINUX operating systems. The suite contains lots of effects (delay, modulation, signal processing, filters, equalizers, dynamics,