Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use vcpkg for Linux CI #7316

Open
wants to merge 69 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
54e260b
Use GitHub build runner with vcpkg
messmerd Jun 2, 2024
fa09bd5
Use sudo
messmerd Jun 2, 2024
ad7892d
apt-get update
messmerd Jun 2, 2024
2edff54
Try installing Wine again
messmerd Jun 2, 2024
8b8c755
Try again
messmerd Jun 2, 2024
a166f16
ppa-purge
messmerd Jun 2, 2024
e309c89
Print sources.list
messmerd Jun 2, 2024
cbee023
Purge ppa:ondrej/php
messmerd Jun 2, 2024
a01f6c8
Debug info
messmerd Jun 2, 2024
417b32c
Try workaround
messmerd Jun 2, 2024
4114560
Try again to remove ppa:ondrej/php
messmerd Jun 2, 2024
067a028
Try apt-get
messmerd Jun 2, 2024
9f87f4e
Use libgig from APT
messmerd Jun 2, 2024
8ca6419
Fix at-spi2-core vcpkg install
messmerd Jun 2, 2024
c2c2cbb
Use awalsh128/cache-apt-pkgs-action
messmerd Jun 2, 2024
692dadd
Try to fix vcpkg qt5-base build
messmerd Jun 2, 2024
c76d5ee
Fix qt5-base dependencies
messmerd Jun 3, 2024
f2437cd
Migrate to ubuntu:20.04 container
messmerd Jun 3, 2024
0bdb1be
Install sudo
messmerd Jun 3, 2024
df2fe2a
Install gpg earlier
messmerd Jun 3, 2024
192fb2d
Add apt-fast to fix cache-apt-pkgs-action
messmerd Jun 3, 2024
fe9f0f9
Fix apt-fast install
messmerd Jun 3, 2024
acc99ac
Install software-properties-common
messmerd Jun 3, 2024
a50cd85
Use DEBIAN_FRONTEND=noninteractive everywhere
messmerd Jun 3, 2024
f600fa3
Try again
messmerd Jun 3, 2024
8b3ea4e
Once more
messmerd Jun 3, 2024
1774f5c
Try again
messmerd Jun 3, 2024
f79c62a
Install g++/gcc
messmerd Jun 3, 2024
66412a3
Download and bootstrap vcpkg
messmerd Jun 3, 2024
23754af
Install vcpkg dependencies
messmerd Jun 3, 2024
ae05197
Install rest of dependencies needed by vcpkg
messmerd Jun 5, 2024
8bdf95c
Add PulseAudio dependency
messmerd Jun 5, 2024
9a51656
Add libsndio-dev
messmerd Jun 5, 2024
38db7da
Use system LV2 packages
messmerd Jun 5, 2024
dc79aec
Use system Qt packages
messmerd Jun 5, 2024
c82a2bd
Try using jurplel/install-qt-action
messmerd Jun 5, 2024
61714e7
Install zstd
messmerd Jun 6, 2024
42086e9
Try ubuntu-20.04 build runner
messmerd Jun 9, 2024
11f425b
Try with setup-python: false
messmerd Jun 9, 2024
7dbbe58
Install icu archive
messmerd Jun 10, 2024
58810ed
Install python3-pip
messmerd Jun 10, 2024
3b8825d
Use system fltk to avoid linker error
messmerd Jun 10, 2024
d62d735
Define OV_EXCLUDE_STATIC_CALLBACKS to avoid unused variable warning
messmerd Jun 10, 2024
20e036e
Update qt5-x11embed submodule
messmerd Jun 12, 2024
44462ea
Ignore vcpkg's ALSA package
messmerd Jun 13, 2024
b564e1d
Use system portaudio and JACK; Remove unused packages from vcpkg Qt b…
messmerd Jun 13, 2024
88f8686
Use libjack-jackd2-dev
messmerd Jun 13, 2024
8cb4b8a
Replace deprecated FluidSynth functions with new ones
messmerd Jun 13, 2024
365f7b0
Retain support for FluidSynth < 2.2.0
messmerd Jun 13, 2024
1e65e7a
Use preprocessor
messmerd Jun 13, 2024
2a43e2e
Fix issue caused by cache
messmerd Jun 13, 2024
6a5be18
Add lilv, lv2, and portaudio back to vcpkg.json
messmerd Jun 13, 2024
6f8f806
Remove mkdir build
messmerd Jun 13, 2024
60e3325
Merge branch 'master' into linux-vcpkg
messmerd Jun 29, 2024
f01951f
Add support for Kitware's noble APT repo
messmerd Jun 29, 2024
38ee748
Try installing system dependencies without caching
messmerd Jul 3, 2024
6a55858
Merge branch 'master' into linux-vcpkg
messmerd Jul 29, 2024
ef7165f
Pin jurplel/install-qt-action to v4.1.1 commit
messmerd Nov 20, 2024
2580a8d
Merge branch `master` into linux-vcpkg
messmerd Nov 23, 2024
ee38ce9
Merge branch 'master' into linux-vcpkg
messmerd Jan 13, 2025
c983613
Use latest vcpkg release
messmerd Jan 13, 2025
6e90290
Remove MSVC vcpkg workaround
messmerd Jan 13, 2025
72d68e4
Merge branch 'master' into linux-vcpkg
messmerd Feb 2, 2025
34eaf96
Try building on Ubuntu 22.04 without container
messmerd Feb 2, 2025
905c2a5
Try to fix Linux ARM64 build
messmerd Feb 2, 2025
3ff235d
Merge branch 'master' into linux-vcpkg
messmerd Feb 13, 2025
a778514
Try using vcpkg's lv2 and lilv
messmerd Feb 13, 2025
0503291
Don't install lv2 or lilv system packages
messmerd Feb 13, 2025
b7ff954
Link dependencies of pkg-config packages
messmerd Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 55 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ concurrency:
jobs:
linux:
name: linux
runs-on: ubuntu-latest
container: ghcr.io/lmms/linux.gcc:20.04
runs-on: ubuntu-20.04
container: ubuntu:20.04
env:
CMAKE_OPTS: >-
-DUSE_WERROR=ON
Expand All @@ -17,14 +17,55 @@ jobs:
CCACHE_MAXSIZE: 0
CCACHE_NOCOMPRESS: 1
MAKEFLAGS: -j2
DEBIAN_FRONTEND: noninteractive
steps:
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
run: |
apt update && apt install sudo
sudo apt-get install --yes git
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Prepare to install system packages
run: |
echo "APT_DEPENDENCIES=$(xargs < .github/workflows/deps-ubuntu-20.04-gcc.txt)" >> "$GITHUB_ENV"
.github/workflows/setup-wine.sh
.github/workflows/setup-cmake.sh
messmerd marked this conversation as resolved.
Show resolved Hide resolved
# Manually install apt-fast to fix awalsh128/cache-apt-pkgs-action
sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common
sudo add-apt-repository -y ppa:apt-fast/stable
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y apt-fast
- name: Install system packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ${{ env.APT_DEPENDENCIES }}
version: 1.0
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '5.15.2'
arch: 'gcc_64'
archives: qtbase qtsvg qttools qtx11extras icu
cache: true
setup-python: false
- name: Download and bootstrap vcpkg
run: |
git clone --branch 2024.05.24 https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
echo "VCPKG_INSTALLATION_ROOT=${GITHUB_WORKSPACE}/vcpkg" >> "$GITHUB_ENV"
- name: Cache vcpkg dependencies
id: cache-deps
uses: actions/cache@v3
with:
key: vcpkg-linux-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-linux-
path: build/vcpkg_installed
- name: Cache ccache data
uses: actions/cache@v3
with:
Expand All @@ -36,9 +77,17 @@ jobs:
- name: Configure
run: |
ccache --zero-stats
source /opt/qt5*/bin/qt5*-env.sh || true
mkdir build && cd build
cmake .. $CMAKE_OPTS -DCMAKE_INSTALL_PREFIX=./install
cmake -S . \
-B build \
--toolchain "${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_TARGET_TRIPLET="x64-linux" \
-DVCPKG_HOST_TRIPLET="x64-linux" \
-DVCPKG_MANIFEST_INSTALL="${{ env.should_install_manifest }}" \
-DCMAKE_INSTALL_PREFIX=./build/install \
$CMAKE_OPTS
env:
should_install_manifest:
${{ steps.cache-deps.outputs.cache-hit == 'true' && 'NO' || 'YES' }}
- name: Build
run: cmake --build build
- name: Run tests
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/deps-ubuntu-20.04-gcc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
autoconf
binutils
bison
ca-certificates
ccache
cmake
curl
file
flex
fluid
g++
g++-multilib
gcc
gcc-multilib
git
gperf
gpg
libasound2-dev
libc6-dev
libc6-dev-i386
libfltk1.3-dev
libgig-dev
libjack-jackd2-dev
liblilv-dev
liblist-moreutils-perl
libsndio-dev
libsuil-dev
libtool
libx11-xcb-dev
libxcb-keysyms1-dev
libxcb-util0-dev
libxml-perl
libxml2-utils
lsb-release
lv2-dev
make
nasm
perl
portaudio19-dev
python3-distutils
python3-jinja2
python3-pip
software-properties-common
ssh-client
stk
sudo
tar
unzip
wget
wine-staging-dev
winehq-staging
zip
zstd
17 changes: 17 additions & 0 deletions .github/workflows/setup-cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# Add Kitware APT repo for latest CMake --- See: https://apt.kitware.com/
# As of 5/21/2024, only focal and jammy are supported
messmerd marked this conversation as resolved.
Show resolved Hide resolved
. /etc/os-release
if [ "$UBUNTU_CODENAME" = "focal" ] || [ "$UBUNTU_CODENAME" = "jammy" ]; then
sudo apt-get install --yes wget gpg
test -f /usr/share/doc/kitware-archive-keyring/copyright || \
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
| gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${UBUNTU_CODENAME} main" \
| sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
test -f /usr/share/doc/kitware-archive-keyring/copyright || \
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
sudo apt-get install -y kitware-archive-keyring
fi
10 changes: 10 additions & 0 deletions .github/workflows/setup-wine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# Add WineHQ APT repo
sudo dpkg --add-architecture i386
sudo apt-get install --yes wget
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
. /etc/os-release
sudo wget -NP /etc/apt/sources.list.d/ "https://dl.winehq.org/wine-builds/ubuntu/dists/${UBUNTU_CODENAME}/winehq-${UBUNTU_CODENAME}.sources"
sudo apt-get update
8 changes: 7 additions & 1 deletion cmake/modules/FindAlsa.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ include(CheckIncludeFileCXX)
include(CheckLibraryExists)

# Already done by toplevel
find_library(ASOUND_LIBRARY asound)
# Using NO_DEFAULT_PATH to ignore vcpkg's alsa package
find_library(ASOUND_LIBRARY
NAMES asound
HINTS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu
PATHS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu
NO_DEFAULT_PATH)

set(ASOUND_LIBRARY_DIR "")
if(ASOUND_LIBRARY)
get_filename_component(ASOUND_LIBRARY_DIR ${ASOUND_LIBRARY} PATH)
Expand Down
37 changes: 31 additions & 6 deletions plugins/Sf2Player/Sf2Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
#include "embed.h"
#include "plugin_export.h"

#define HAS_EFFECT_GROUPS (FLUIDSYNTH_VERSION_MAJOR >= 2 && FLUIDSYNTH_VERSION_MINOR >= 2)

namespace lmms
{

Expand Down Expand Up @@ -504,35 +506,58 @@ void Sf2Instrument::updateGain()

void Sf2Instrument::updateReverbOn()
{
fluid_synth_set_reverb_on( m_synth, m_reverbOn.value() ? 1 : 0 );
#if HAS_EFFECT_GROUPS
fluid_synth_reverb_on(m_synth, 0, m_reverbOn.value() ? 1 : 0);
#else
fluid_synth_set_reverb_on(m_synth, m_reverbOn.value() ? 1 : 0);
#endif
}




void Sf2Instrument::updateReverb()
{
fluid_synth_set_reverb( m_synth, m_reverbRoomSize.value(),
#if HAS_EFFECT_GROUPS
fluid_synth_set_reverb_group_roomsize(m_synth, 0, m_reverbRoomSize.value());
fluid_synth_set_reverb_group_damp(m_synth, 0, m_reverbDamping.value());
fluid_synth_set_reverb_group_width(m_synth, 0, m_reverbWidth.value());
fluid_synth_set_reverb_group_level(m_synth, 0, m_reverbLevel.value());
#else
fluid_synth_set_reverb(m_synth, m_reverbRoomSize.value(),
m_reverbDamping.value(), m_reverbWidth.value(),
m_reverbLevel.value() );
m_reverbLevel.value());
#endif
}




void Sf2Instrument::updateChorusOn()
{
fluid_synth_set_chorus_on( m_synth, m_chorusOn.value() ? 1 : 0 );
#if HAS_EFFECT_GROUPS
fluid_synth_chorus_on(m_synth, 0, m_chorusOn.value() ? 1 : 0);
#else
fluid_synth_set_chorus_on(m_synth, m_chorusOn.value() ? 1 : 0);
#endif
}




void Sf2Instrument::updateChorus()
{
fluid_synth_set_chorus( m_synth, static_cast<int>( m_chorusNum.value() ),
#if HAS_EFFECT_GROUPS
fluid_synth_set_chorus_group_nr(m_synth, 0, static_cast<int>(m_chorusNum.value()));
fluid_synth_set_chorus_group_level(m_synth, 0, m_chorusLevel.value());
fluid_synth_set_chorus_group_speed(m_synth, 0, m_chorusSpeed.value());
fluid_synth_set_chorus_group_depth(m_synth, 0, m_chorusDepth.value());
fluid_synth_set_chorus_group_type(m_synth, 0, FLUID_CHORUS_MOD_SINE);
#else
fluid_synth_set_chorus(m_synth, static_cast<int>(m_chorusNum.value()),
m_chorusLevel.value(), m_chorusSpeed.value(),
m_chorusDepth.value(), 0 );
m_chorusDepth.value(), FLUID_CHORUS_MOD_SINE);
#endif
}


Expand Down
2 changes: 1 addition & 1 deletion src/3rdparty/qt5-x11embed
1 change: 1 addition & 0 deletions src/core/SampleDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <sndfile.h>

#ifdef LMMS_HAVE_OGGVORBIS
#define OV_EXCLUDE_STATIC_CALLBACKS
#include <vorbis/vorbisfile.h>
#endif

Expand Down
27 changes: 23 additions & 4 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
},
{
"name": "fltk",
Rossmaxx marked this conversation as resolved.
Show resolved Hide resolved
"default-features": false
"default-features": false,
"platform": "!linux"
},
{
"name": "fluidsynth",
Expand Down Expand Up @@ -45,21 +46,39 @@
"name": "libvorbis",
"default-features": false
},
{
"name": "libxft",
"default-features": false,
"platform": "linux"
},
{
"name": "libxinerama",
"default-features": false,
"platform": "linux"
},
{
"name": "lilv",
"default-features": false
messmerd marked this conversation as resolved.
Show resolved Hide resolved
"default-features": false,
"platform": "!linux"
},
{
"name": "lv2",
"default-features": false
"default-features": false,
"platform": "!linux"
},
{
"name": "mp3lame",
"default-features": false
},
{
"name": "portaudio",
messmerd marked this conversation as resolved.
Show resolved Hide resolved
"default-features": false
"default-features": false,
"platform": "!linux"
},
{
"name": "pulseaudio",
"default-features": false,
"platform": "linux"
},
{
"name": "sdl2",
Expand Down
Loading