Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream' into creational-correctness-t…
Browse files Browse the repository at this point in the history
…racks-clips
  • Loading branch information
sakertooth committed Mar 3, 2025
2 parents b59b242 + 9159533 commit 507ea25
Show file tree
Hide file tree
Showing 241 changed files with 4,525 additions and 2,748 deletions.
200 changes: 143 additions & 57 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
name: linux
runs-on: ubuntu-latest
container: ghcr.io/lmms/linux.gcc:20.04
linux-x86_64:
name: linux-x86_64
runs-on: ubuntu-22.04
env:
CMAKE_OPTS: >-
-DUSE_WERROR=ON
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DUSE_COMPILE_CACHE=ON
-DWANT_DEBUG_CPACK=ON
CCACHE_MAXSIZE: 0
CCACHE_NOCOMPRESS: 1
MAKEFLAGS: -j2
Expand All @@ -25,6 +25,29 @@ jobs:
with:
fetch-depth: 0
submodules: recursive
- name: Clone fltk
uses: actions/checkout@v4
with:
repository: fltk/fltk
path: fltk
ref: 27d991f046bdebb12bfd58f7c05a19f135979c29
fetch-depth: 1
- name: Configure winehq
run: |
sudo dpkg --add-architecture i386
sudo mkdir -pm755 /etc/apt/keyrings
wget -O - https://dl.winehq.org/wine-builds/winehq.key | \
sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -
sudo wget -NP /etc/apt/sources.list.d/ \
https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources
- name: Install packages
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends \
$(xargs < .github/workflows/deps-ubuntu-24.04-gcc.txt)
sudo apt-get install -y --install-recommends g++-multilib gcc-multilib winehq-stable wine-stable-dev
sudo apt-get install -y --install-recommends \
$(xargs < .github/workflows/deps-ubuntu-24.04-fltk.txt)
- name: Cache ccache data
uses: actions/cache@v3
with:
Expand All @@ -33,13 +56,20 @@ jobs:
ccache-${{ github.job }}-${{ github.ref }}-
ccache-${{ github.job }}-
path: ~/.ccache
- name: Configure fltk
run: |
cmake -S fltk -B fltk/build -DFLTK_BUILD_SHARED_LIBS=ON -DFLTK_BACKEND_WAYLAND=ON \
-DFLTK_USE_LIBDECOR_GTK=OFF -DFLTK_BUILD_TEST=OFF -DFLTK_BUILD_GL=OFF
- name: Install fltk
run: |
cmake --build fltk/build
sudo cmake --install fltk/build --prefix /usr
- name: Configure
run: |
ccache --zero-stats
source /opt/qt5*/bin/qt5*-env.sh || true
cmake -S . \
-B build \
-DCMAKE_INSTALL_PREFIX=./install \
$CMAKE_OPTS
- name: Build
run: cmake --build build
Expand All @@ -49,8 +79,7 @@ jobs:
ctest --output-on-failure -j2
- name: Package
run: |
cmake --build build --target install
cmake --build build --target appimage
cmake --build build --target package
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -65,6 +94,86 @@ jobs:
ccache --show-stats
env:
CCACHE_MAXSIZE: 500M
linux-arm64:
name: linux-arm64
runs-on: ubuntu-24.04-arm
env:
CMAKE_OPTS: >-
-DUSE_WERROR=ON
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DUSE_COMPILE_CACHE=ON
-DWANT_DEBUG_CPACK=ON
CCACHE_MAXSIZE: 0
CCACHE_NOCOMPRESS: 1
MAKEFLAGS: -j2
DEBIAN_FRONTEND: noninteractive
steps:
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Clone fltk
uses: actions/checkout@v4
with:
repository: fltk/fltk
path: fltk
ref: 27d991f046bdebb12bfd58f7c05a19f135979c29
fetch-depth: 1
- name: Install system packages
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends \
$(xargs < .github/workflows/deps-ubuntu-24.04-gcc.txt)
sudo apt-get install -y --install-recommends \
$(xargs < .github/workflows/deps-ubuntu-24.04-fltk.txt)
- name: Cache ccache data
uses: actions/cache@v3
with:
key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
ccache-${{ github.job }}-${{ github.ref }}-
ccache-${{ github.job }}-
path: ~/.ccache
- name: Configure fltk
run: |
cmake -S fltk -B fltk/build -DFLTK_BUILD_SHARED_LIBS=ON -DFLTK_BACKEND_WAYLAND=ON \
-DFLTK_USE_LIBDECOR_GTK=OFF -DFLTK_BUILD_TEST=OFF -DFLTK_BUILD_GL=OFF
- name: Install fltk
run: |
cmake --build fltk/build
sudo cmake --install fltk/build --prefix /usr
- name: Configure
run: |
ccache --zero-stats
cmake -S . \
-B build \
$CMAKE_OPTS
- name: Build
run: cmake --build build
- name: Run tests
run: |
cd build/tests
ctest --output-on-failure -j2
- name: Package
run: |
cmake --build build --target package
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-arm64
path: build/lmms-*.AppImage
- name: Trim ccache and print statistics
run: |
ccache --cleanup
echo "[ccache config]"
ccache --show-config
echo "[ccache stats]"
ccache --show-stats
env:
CCACHE_MAXSIZE: 500M
macos:
strategy:
fail-fast: false
Expand Down Expand Up @@ -129,8 +238,6 @@ jobs:
mkdir build
cmake -S . \
-B build \
-DCMAKE_INSTALL_PREFIX="../target" \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)" \
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
$CMAKE_OPTS \
-DUSE_WERROR=OFF
Expand All @@ -142,8 +249,7 @@ jobs:
ctest --output-on-failure -j3
- name: Package
run: |
cmake --build build --target install
cmake --build build --target dmg
cmake --build build --target package
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -168,13 +274,8 @@ jobs:
key: "homebrew-${{ matrix.arch }}\
-${{ hashFiles('Brewfile.lock.json') }}"
mingw:
strategy:
fail-fast: false
matrix:
arch: ['32', '64']
name: mingw${{ matrix.arch }}
name: mingw64
runs-on: ubuntu-latest
container: ghcr.io/lmms/linux.mingw:20.04
env:
CMAKE_OPTS: >-
-Werror=dev
Expand All @@ -185,12 +286,12 @@ jobs:
CCACHE_NOCOMPRESS: 1
MAKEFLAGS: -j2
steps:
- name: Enable POSIX MinGW
- name: Configure apt
run: |
update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
sudo sh -c 'echo "deb http://ppa.launchpad.net/tobydox/mingw-w64/ubuntu focal main" > \
/etc/apt/sources.list.d/tobydox-mingw-w64.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 72931B477E22FEFD47F8DECE02FE5F12ADDE29B2
sudo apt-get update -y
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Check out
Expand All @@ -201,19 +302,22 @@ jobs:
- name: Cache ccache data
uses: actions/cache@v3
with:
key: "ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}\
key: "ccache-${{ github.job }}-64-${{ github.ref }}\
-${{ github.run_id }}"
restore-keys: |
ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}-
ccache-${{ github.job }}-${{ matrix.arch }}-
ccache-${{ github.job }}-64-${{ github.ref }}-
ccache-${{ github.job }}-64-
path: ~/.ccache
- name: Install dependencies
run: |
sudo apt-get install -y --no-install-recommends \
$(xargs < .github/workflows/deps-ubuntu-24.04-mingw.txt)
- name: Configure
run: |
ccache --zero-stats
cmake -S . \
-B build \
-DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_TOOLCHAIN_FILE="./cmake/toolchains/MinGW-W64-${{ matrix.arch }}.cmake" \
-DCMAKE_TOOLCHAIN_FILE="./cmake/toolchains/MinGW-W64-64.cmake" \
$CMAKE_OPTS
- name: Build
run: cmake --build build
Expand All @@ -222,7 +326,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mingw${{ matrix.arch }}
name: mingw64
path: build/lmms-*.exe
- name: Trim ccache and print statistics
run: |
Expand All @@ -234,11 +338,7 @@ jobs:
env:
CCACHE_MAXSIZE: 500M
msvc:
strategy:
fail-fast: false
matrix:
arch: ['x86', 'x64']
name: msvc-${{ matrix.arch }}
name: msvc-x64
runs-on: windows-2019
env:
CCACHE_MAXSIZE: 0
Expand All @@ -249,29 +349,23 @@ jobs:
with:
fetch-depth: 0
submodules: recursive
- name: Update vcpkg (TEMPORARY)
run: |
cd $env:VCPKG_INSTALLATION_ROOT
git pull
.\bootstrap-vcpkg.bat
shell: pwsh
- name: Cache vcpkg dependencies
id: cache-deps
uses: actions/cache@v3
with:
key: vcpkg-${{ matrix.arch }}-${{ hashFiles('vcpkg.json') }}
key: vcpkg-msvc-x86_64-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ matrix.arch }}-
vcpkg-msvc-x86_64-
path: build\vcpkg_installed
- name: Cache ccache data
uses: actions/cache@v3
with:
# yamllint disable rule:line-length
key: "ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}\
key: "ccache-${{ github.job }}-x64-${{ github.ref }}\
-${{ github.run_id }}"
restore-keys: |
ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}-
ccache-${{ github.job }}-${{ matrix.arch }}-
ccache-${{ github.job }}-x64-${{ github.ref }}-
ccache-${{ github.job }}-x64-
path: ~\AppData\Local\ccache
# yamllint enable rule:line-length
- name: Install tools
Expand All @@ -280,21 +374,13 @@ jobs:
uses: jurplel/install-qt-action@b3ea5275e37b734d027040e2c7fe7a10ea2ef946
with:
version: '5.15.2'
arch: |-
${{
fromJSON('
{
"x86": "win32_msvc2019",
"x64": "win64_msvc2019_64"
}
')[matrix.arch]
}}
arch: "win64_msvc2019_64"
archives: qtbase qtsvg qttools
cache: true
- name: Set up build environment
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89
with:
arch: ${{ matrix.arch }}
arch: x64
- name: Configure
run: |
ccache --zero-stats
Expand All @@ -307,8 +393,8 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DUSE_COMPILE_CACHE=ON `
-DUSE_WERROR=ON `
-DVCPKG_TARGET_TRIPLET="${{ matrix.arch }}-windows" `
-DVCPKG_HOST_TRIPLET="${{ matrix.arch }}-windows" `
-DVCPKG_TARGET_TRIPLET="x64-windows" `
-DVCPKG_HOST_TRIPLET="x64-windows" `
-DVCPKG_MANIFEST_INSTALL="${{ env.should_install_manifest }}"
env:
should_install_manifest:
Expand All @@ -324,7 +410,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: msvc-${{ matrix.arch }}
name: msvc-x64
path: build\lmms-*.exe
- name: Trim ccache and print statistics
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deps-ubuntu-24.04-fltk.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libcairo2-dev
libpango1.0-dev
wayland-protocols
Loading

0 comments on commit 507ea25

Please sign in to comment.