Skip to content

[0.4.x] Stop patching ax_check_gl.m4 for macOS #480

[0.4.x] Stop patching ax_check_gl.m4 for macOS

[0.4.x] Stop patching ax_check_gl.m4 for macOS #480

name: Build and test (Linux + macOS)
on:
pull_request:
push:
schedule:
- cron: '0 3 * * 5' # Every Friday at 3am
jobs:
linux_and_macos:
name: Build and test (${{ matrix.runs-on }}, ${{ matrix.cc }})
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
# Linux
- cc: gcc-14
cxx: g++-14
clang_major_version: null
clang_repo_suffix: null
runs-on: ubuntu-24.04
- cc: clang-18
cxx: clang++-18
clang_major_version: 18
clang_repo_suffix: -18
runs-on: ubuntu-22.04
# macOS
- cc: gcc-13
cxx: g++-13
clang_major_version: null
clang_repo_suffix: null
runs-on: macos-13
- cc: clang
cxx: clang++
clang_major_version: null
clang_repo_suffix: null
runs-on: macos-13
steps:
- name: Add Clang/LLVM repositories (Linux)
if: "${{ runner.os == 'Linux' && contains(matrix.cxx, 'clang') }}"
run: |-
set -x
source /etc/os-release
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}${{ matrix.clang_repo_suffix }} main"
- name: Install build dependencies (Linux)
if: runner.os == 'Linux'
run: |-
sudo apt-get update
# Note: This additional step's sole purpuse is to workaround symptom:
# > The following packages have unmet dependencies:
# > libunwind-14-dev : Breaks: libunwind-dev but 1.3.2-2build2
# > is to be installed
sudo apt-get install --yes --no-install-recommends libunwind-dev
sudo apt-get install --yes --no-install-recommends \
autoconf-archive \
autopoint \
bison \
doxygen \
flex \
gettext \
graphviz \
libgstreamer1.0-dev \
libgtk-3-dev \
libjack-dev \
libluajit-5.1-dev \
liborc-0.4-dev \
libpng-dev \
libasound2-dev \
libsdl1.2-dev \
libgl1-mesa-dev \
pkg-config \
portaudio19-dev
- name: Install build dependency Clang ${{ matrix.clang_major_version }} (Linux)
if: "${{ runner.os == 'Linux' && contains(matrix.cxx, 'clang') }}"
run: |-
sudo apt-get install --yes --no-install-recommends -V \
clang-${{ matrix.clang_major_version }}
- name: Install build dependencies (macOS)
if: runner.os == 'macOS'
run: |-
brew install \
autoconf-archive \
automake \
bison \
doxygen \
flex \
gettext \
graphviz \
gstreamer \
gtk+3 \
jack \
libpng \
luajit \
orc \
pkg-config \
portaudio \
sdl12-compat
- name: Setting dynamic environment variables
run: |-
set -x
echo "LV_INSTALL_PREFIX=${HOME}/.local" >> "${GITHUB_ENV}"
- name: Checkout Git branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: '[LV] Run autoreconf'
run: |-
for i in libvisual libvisual-plugins ; do
pushd ${i}
NOCONFIGURE=please ./autogen.sh
popd
done
- name: '[LV] Run "./configure" (from Git)'
run: |-
cd libvisual
./configure || { cat config.log ; false ; }
- name: '[LV] Run "make dist"'
run: |-
make -C libvisual dist
- name: '[LV] Run "./configure" (from tarball)'
run: |-
tar xf libvisual/libvisual-0.*.tar.gz
mkdir build_lv
cd build_lv
../libvisual-0.*/configure \
CC=${{ matrix.cc }} \
CXX=${{ matrix.cxx }} \
--prefix ${LV_INSTALL_PREFIX} \
--enable-debug \
--enable-threads \
|| { cat config.log ; false ; }
- name: '[LV] Run "make"'
run: |-
make -C build_lv -j2 VERBOSE=1
- name: '[LV] Run "make install"'
run: |-
make -C build_lv install
find ${LV_INSTALL_PREFIX} | sort
- name: '[Plugins] Run "./configure" (from Git)'
run: |-
cd libvisual-plugins
PKG_CONFIG_PATH=${LV_INSTALL_PREFIX}/lib/pkgconfig/ \
./configure \
|| { cat config.log ; false ; }
- name: '[Plugins] Run "make dist"'
run: |-
make -C libvisual-plugins dist
- name: '[Plugins] Run "./configure" (from tarball)'
# TODO Make gstreamer plugin work with GStreamer 1.x (on master!)
run: |-
tar xf libvisual-plugins/libvisual-plugins-0.*.tar.gz
mkdir build_plugins
cd build_plugins
PKG_CONFIG_PATH=${LV_INSTALL_PREFIX}/lib/pkgconfig/ \
../libvisual-plugins-0.*/configure \
CC=${{ matrix.cc }} \
CXX=${{ matrix.cxx }} \
--prefix ${LV_INSTALL_PREFIX} \
|| { cat config.log ; false ; }
- name: '[Plugins] Run "make"'
run: |-
set -x -o pipefail
make -C build_plugins -j2 VERBOSE=1
# Detect and deny underlinking
! find -name \*.so | sort | xargs ldd -r | grep -F 'undefined symbol'
- name: '[Plugins] Run "make install"'
run: |-
make -C build_plugins install DESTDIR="${PWD}"/ROOT_PLUGINS
find ROOT_PLUGINS/ | sort
- name: 'Prepare artifacts for upload'
if: "${{ strategy.job-index == 0 }}"
run: |-
set -x
dirname="commit-$(git log -1 --format='%H')"
mkdir "${dirname}"/
mv -v libvisual/libvisual-0.*.tar.* "${dirname}"/
mv -v libvisual-plugins/libvisual-plugins-0.*.tar.* "${dirname}"/
- name: 'Upload artifacts'
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: "${{ strategy.job-index == 0 }}"
with:
name: release-archives
path: commit-*/*
if-no-files-found: error