-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Erick G. Islas-Osuna <[email protected]>
- Loading branch information
1 parent
37a238e
commit 1dcb29a
Showing
2 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters