Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Android Build

on:
push:
branches:
- master
tags:
- v*
paths-ignore:
- 'docs/**'
- '**.md'
Expand All @@ -10,6 +14,11 @@ on:
- '**.md'
- 'docs/**'


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ on:
push:
branches:
- master
tags:
- v*
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -30,4 +36,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output


168 changes: 122 additions & 46 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build

on:
push:
branches:
- master
tags:
- v*
paths-ignore:
- 'docs/**'
- '**.md'
Expand All @@ -10,36 +14,40 @@ on:
- '**.md'
- 'docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.config.name }}
name: ${{ matrix.config.name }} ${{ matrix.library_mode }} ${{ matrix.boost && 'Boost' }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
boost: [0, 1]
header_only: [0, 1]
library_mode: [LIBRARY, HEADER_ONLY, MODULE]
config:
- {
name: "Windows (MSVC)",
name: "MSVC x86_64",
os: windows-latest,
generator: "",
cmakeflags: "-DLIBREMIDI_NO_WINUWP=0 -DBOOST_ROOT=$PWD/boost_1_86_0",
cmakeflags: "-DBOOST_ROOT=$PWD/boost_1_90_0",
test_target: "RUN_TESTS",
tests: 1,
examples: 1
}
- {
name: "Windows (MSVC, arm64)",
name: "MSVC arm64",
os: windows-11-arm,
generator: "",
cmakeflags: "-DLIBREMIDI_NO_WINUWP=0 -DBOOST_ROOT=$PWD/boost_1_86_0",
cmakeflags: "-DBOOST_ROOT=$PWD/boost_1_90_0",
test_target: "RUN_TESTS",
tests: 1,
examples: 1
}
- {
name: "Ubuntu (gcc)",
name: "Ubuntu gcc-13",
os: ubuntu-latest,
generator: "",
cmakeflags: "-DCMAKE_CXX_FLAGS='-Werror=return-type -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1 -D_GLIBCXX_ASSERTIONS=1 -D_GLIBCXX_SANITIZE_VECTOR=1'",
Expand All @@ -48,19 +56,28 @@ jobs:
examples: 1
}
- {
name: "Ubuntu (clang-18, libstdc++)",
name: "Ubuntu gcc-14",
os: ubuntu-latest,
generator: "",
cmakeflags: "-DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_CXX_FLAGS='-Werror=return-type -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1 -D_GLIBCXX_ASSERTIONS=1 -D_GLIBCXX_SANITIZE_VECTOR=1' -DBOOST_ROOT=$PWD/boost_1_90_0",
test_target: "test",
tests: 1,
examples: 1
}
- {
name: "Ubuntu clang-20 libstdc++",
os: ubuntu-latest,
generator: "",
cmakeflags: "-DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_CXX_FLAGS='-Werror=return-type -fsanitize=address -fsanitize=undefined'",
cmakeflags: "-DCMAKE_CXX_COMPILER=clang++-20 -DCMAKE_CXX_FLAGS='-Werror=return-type -fsanitize=address -fsanitize=undefined' -DBOOST_ROOT=$PWD/boost_1_90_0",
test_target: "test",
tests: 1,
examples: 1
}
- {
name: "Ubuntu (clang, libc++)",
name: "Ubuntu clang libc++",
os: ubuntu-latest,
generator: "",
cmakeflags: "-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS='-stdlib=libc++ -Werror=return-type'",
cmakeflags: "-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS='-stdlib=libc++ -Werror=return-type' -DBOOST_ROOT=$PWD/boost_1_90_0",
test_target: "test",
tests: 1,
examples: 1
Expand All @@ -76,18 +93,18 @@ jobs:
}
- {
name: "macOS",
os: macos-14,
os: macos-latest,
generator: "",
cmakeflags: "-DCMAKE_CXX_FLAGS=-Werror=return-type -DBOOST_ROOT=$PWD/boost_1_86_0",
cmakeflags: "-DCMAKE_CXX_FLAGS=-Werror=return-type -DBOOST_ROOT=$PWD/boost_1_90_0",
test_target: "test",
tests: 1,
examples: 1
}
- {
name: "iOS",
os: macos-14,
os: macos-latest,
generator: "-GXcode",
cmakeflags: "-DCMAKE_CXX_FLAGS=-Werror=return-type -DBOOST_ROOT=$PWD/boost_1_86_0 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_XCODE_EFFECTIVE_PLATFORMS=-iphoneos",
cmakeflags: "-DCMAKE_CXX_FLAGS=-Werror=return-type -DBOOST_ROOT=$PWD/boost_1_90_0 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_XCODE_EFFECTIVE_PLATFORMS=-iphoneos",
test_target: "test",
tests: 0,
examples: 0
Expand All @@ -97,6 +114,31 @@ jobs:
- config: { name: "iOS" }
boost: 1

# Modules not yet working on VS2022
- config: { name: "MSVC x86_64" }
library_mode: MODULE
- config: { name: "MSVC arm64" }
library_mode: MODULE

# Modules not supported at all on gcc 13
- config: { name: "Ubuntu gcc-13" }
library_mode: MODULE

# ICE
- config: { name: "Ubuntu gcc-14" }
library_mode: MODULE

# Modules not yet supported by ubuntu 24.04 default clang version
- config: { name: "Ubuntu clang libc++" }
library_mode: MODULE

# Modules not supported at all by AppleClang as of Xcode 26
- config: { name: "macOS" }
library_mode: MODULE

- config: { name: "iOS" }
library_mode: MODULE

steps:
- uses: actions/checkout@v4

Expand All @@ -111,27 +153,40 @@ jobs:

- name: Install dependencies
if: matrix.config.name != 'Tarball'
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
sudo apt update
sudo apt install cmake libboost-dev libasound-dev libjack-jackd2-dev clang libc++-dev
else
curl -L https://github.com/ossia/sdk/releases/download/sdk31/boost_1_86_0.tar.gz > boost.tar.gz
tar -xzf boost.tar.gz
rm boost.tar.gz
sudo apt install cmake ninja-build curl libboost-dev libasound-dev libjack-jackd2-dev clang libc++-dev gcc gcc-14
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install ninja
fi
shell: bash

curl -L https://github.com/ossia/sdk/releases/download/sdk31/boost_1_90_0.tar.gz > boost.tar.gz
tar -xzf boost.tar.gz
rm boost.tar.gz

- name: Configure
if: matrix.config.name != 'Tarball'
shell: bash
run: |
CMAKE_GENERATOR=${{ matrix.config.generator }}
if [[ -z "$CMAKE_GENERATOR" ]]; then
if [[ "${{ matrix.library_mode }}" == "MODULE" ]]; then
if [[ "$RUNNER_OS" == "Linux" ]]; then
CMAKE_GENERATOR=-GNinja
elif [[ "$RUNNER_OS" == "macOS" ]]; then
CMAKE_GENERATOR=-GNinja
fi
fi
fi

cmake -S . -B build \
${{ matrix.config.generator }} \
$CMAKE_GENERATOR \
${{ matrix.config.cmakeflags }} \
-DLIBREMIDI_FIND_BOOST=${{ matrix.boost }} \
-DLIBREMIDI_HEADER_ONLY=${{ matrix.header_only }} \
-DLIBREMIDI_LIBRARY_MODE=${{ matrix.library_mode }} \
-DLIBREMIDI_EXAMPLES=${{ matrix.config.examples }} \
-DLIBREMIDI_TESTS=${{ matrix.config.tests }} \
-DLIBREMIDI_CI=1 \
Expand All @@ -145,7 +200,7 @@ jobs:
cmake --build build --config Debug --target install

- name: Test
if: matrix.config.name != 'Tarball' && matrix.config.name != 'iOS'
if: matrix.config.name != 'Tarball' && matrix.config.name != 'iOS' && matrix.library_mode != 'MODULE'
run: |
# Not available on GH actions...
# if [ "$RUNNER_OS" == "Linux" ]; then
Expand All @@ -163,54 +218,67 @@ jobs:
fail-fast: false
matrix:
boost: [0, 1]
header_only: [0, 1]
library_mode: [LIBRARY, HEADER_ONLY, MODULE]
steps:
- uses: actions/checkout@v4

- uses: vmactions/freebsd-vm@v1
with:
usesh: true

prepare: |
pkg install -y jackit boost-libs cmake git
pkg install -y jackit boost-libs cmake git ninja

run: |
pwd
ls -lah
whoami
env
freebsd-version
CMAKE_GENERATOR=
if [ "${{ matrix.library_mode }}" = "MODULE" ]; then
CMAKE_GENERATOR=-GNinja
fi

cmake -S . -B build \
$CMAKE_GENERATOR \
-DLIBREMIDI_FIND_BOOST=${{ matrix.boost }} \
-DLIBREMIDI_HEADER_ONLY=${{ matrix.header_only }} \
-DLIBREMIDI_LIBRARY_MODE=${{ matrix.library_mode }} \
-DLIBREMIDI_EXAMPLES=1 \
-DLIBREMIDI_TESTS=1 \
-DLIBREMIDI_CI=1 \
-DCMAKE_CTEST_ARGUMENTS="--rerun-failed;--output-on-failure" \
-DCMAKE_INSTALL_PREFIX=install

cmake --build build
cmake --build build --target install
cmake --build build --target test
if [ "${{ matrix.library_mode }}" != "MODULE" ]; then
cmake --build build --target install
cmake --build build --target test
fi

build_debian:
name: Debian ${{ matrix.distro }}
name: Debian ${{ matrix.distro }} ${{ matrix.library_mode }} ${{ matrix.cxx }} ${{ matrix.boost && 'Boost' }}
runs-on: ubuntu-latest
container:
image: debian:${{ matrix.distro }}
strategy:
fail-fast: false
matrix:
boost: [0, 1]
header_only: [0, 1]
distro: [bookworm, trixie]
library_mode: [LIBRARY, HEADER_ONLY, MODULE]
distro: [bookworm, trixie, testing]
cxx: [c++, clang++]

steps:
- name: Add backports repo if necessary
if: matrix.distro == 'bullseye'
run: |
echo "deb http://ftp.debian.org/debian/ ${{ matrix.distro }}-backports main non-free contrib" > /etc/apt/sources.list.d/${{ matrix.distro }}-backports.list
exclude:
- distro: bookworm
library_mode: MODULE
- distro: trixie
library_mode: MODULE
- distro: testing
library_mode: MODULE
cxx: c++

steps:
- name: Install git
run: |
apt-get update -qq
Expand All @@ -230,31 +298,39 @@ jobs:
libasound-dev \
libjack-jackd2-dev \
libudev-dev \
libpipewire-0.3-dev

if [[ "${{matrix.distro}}" == 'bullseye' ]]; then
apt-get install -qq --force-yes cmake/bullseye-backports
else
apt-get install -qq --force-yes cmake
fi
libpipewire-0.3-dev \
cmake ninja-build curl

curl -L https://github.com/ossia/sdk/releases/download/sdk31/boost_1_90_0.tar.gz > boost.tar.gz
tar -xzf boost.tar.gz
rm boost.tar.gz

- name: Configure
shell: bash
run: |
CMAKE_GENERATOR=
if [[ "${{ matrix.library_mode }}" == "MODULE" ]]; then
CMAKE_GENERATOR=-GNinja
fi
cmake -S . -B build \
$CMAKE_GENERATOR \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DLIBREMIDI_FIND_BOOST=${{ matrix.boost }} \
-DLIBREMIDI_HEADER_ONLY=${{ matrix.header_only }} \
-DLIBREMIDI_LIBRARY_MODE=${{ matrix.library_mode }} \
-DLIBREMIDI_EXAMPLES=1 \
-DLIBREMIDI_TESTS=1 \
-DLIBREMIDI_CI=1 \
-DCMAKE_CTEST_ARGUMENTS="--rerun-failed;--output-on-failure" \
-DCMAKE_INSTALL_PREFIX=install
-DCMAKE_INSTALL_PREFIX=install \
-DBOOST_ROOT=$PWD/boost_1_90_0

- name: Build
run: |
cmake --build build --config Debug
cmake --build build --config Debug --target install

- name: Test
if: matrix.library_mode != 'MODULE'
run: |
cmake --build build --config Debug --target test

Expand Down
Loading
Loading