1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
|
---
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@v4
with:
fetch-depth: 0
- name: Configure
run: |
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install-dir -DCMAKE_BUILD_TYPE=Release ..
- name: Build
run: cmake --build build
- name: Package
run: |
cd build
cpack -G TGZ --config CPackSourceConfig.cmake
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux
path: build/calf-*gz
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@v4
with:
fetch-depth: 0
- name: Configure
run: >
mkdir build && cd build &&
cmake ..
-DCMAKE_INSTALL_PREFIX=../install-dir
-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
linux-automake:
name: linux-automake # just a quick check it still works, can be removed if automake is being removed.
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@v4
with:
fetch-depth: 0
- name: Configure
run: |
cp configure.ac.deprecated configure.ac
autoupdate
autoreconf -i
./configure --prefix $PWD/install --with-bash-completion-dir=no
- name: Build
run: make
- name: Install
run: make install
macos:
name: macos
runs-on: macos-15
steps:
- name: Install python3
run: brew install --overwrite python@3.12
- 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-dir -DCMAKE_SHARED_LINKER_FLAGS="-L$(brew --prefix)/lib -Wl,-rpath,$(brew --prefix)/lib" -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/include" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF ..
- name: Build
run: cmake --build build
- name: Package
run: |
cd build
cpack -G productbuild
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos
path: build/calf-*.pkg
msvc:
name: msvc
runs-on: windows-latest
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install NSIS
run: |
choco install nsis -y
shell: powershell
- name: Cache vcpkg dependencies
id: cache-deps
uses: actions/cache@v4
with:
key: vcpkg-x64-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-x64-
path: build\vcpkg_installed
- name: Configure
run: |
mkdir build -Force
cmake `
-B build `
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake `
-DCMAKE_BUILD_TYPE=Debug `
.
- name: Build
run: cmake --build build --config Release
- name: Package
run: |
cd build
cpack -G NSIS -C Release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows
path: build\calf-*.exe
# 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@v4
# 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
|