Browse Source

Add cmake build to CI tests

Signed-off-by: falkTX <falktx@falktx.com>
pull/1780/head
falkTX 1 year ago
parent
commit
ef009b303e
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 54 additions and 3 deletions
  1. +50
    -0
      .github/workflows/cmake.yml
  2. +3
    -2
      cmake/CMakeLists.txt
  3. +1
    -1
      cmake/README.md

+ 50
- 0
.github/workflows/cmake.yml View File

@@ -0,0 +1,50 @@
name: cmake

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

env:
DEBIAN_FRONTEND: noninteractive
HOMEBREW_NO_AUTO_UPDATE: 1

jobs:
macos-11:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
brew install cmake fluid-synth libmagic libsndfile pkg-config
- name: configure
run: cmake -S cmake -B cmake
- name: build
run: make -C cmake -j $(sysctl -n hw.logicalcpu)

ubuntu-20_04:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get install -yqq cmake libfluidsynth-dev libmagic-dev libsndfile1-dev libx11-dev pkg-config
- name: configure
run: cmake -S cmake -B cmake
- name: build
run: make -C cmake -j $(nproc)

ubuntu-22_04:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get install -yqq cmake libfluidsynth-dev libmagic-dev libsndfile1-dev libx11-dev pkg-config
- name: configure
run: cmake -S cmake -B cmake
- name: build
run: make -C cmake -j $(nproc)

+ 3
- 2
cmake/CMakeLists.txt View File

@@ -16,7 +16,6 @@ set_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
#######################################################################################################################
# required dependencies

find_package(PkgConfig)
find_package(Threads REQUIRED)

if(NOT (APPLE OR HAIKU OR WIN32))
@@ -30,6 +29,8 @@ endif()
#######################################################################################################################
# optional dependencies

find_package(PkgConfig)

if(PKGCONFIG_FOUND)
pkg_check_modules(FLUIDSYNTH IMPORTED_TARGET fluidsynth)
pkg_check_modules(SNDFILE IMPORTED_TARGET sndfile)
@@ -621,7 +622,7 @@ if (APPLE)
../source/backend/plugin/CarlaPluginCLAP.cpp
../source/backend/plugin/CarlaPluginVST2.cpp
../source/backend/plugin/CarlaPluginVST3.cpp
PROPERTIES COMPILE_FLAGS -ObjC++)
PROPERTIES COMPILE_FLAGS -ObjC++)
endif()

#######################################################################################################################


+ 1
- 1
cmake/README.md View File

@@ -1,4 +1,4 @@
# carla cmake build setup
# Carla cmake build setup

This directory contains a cmake build setup for a few Carla libraries and tools.
It is not meant as a stock replacement for the regular Carla build, but simply as a way to more easily integrate Carla into other projects that already use cmake.


Loading…
Cancel
Save