Skip to content

[WIP] Fix NetBSD build #1785

[WIP] Fix NetBSD build

[WIP] Fix NetBSD build #1785

name: Build and test on Linux
on:
push:
branches:
- main
paths-ignore:
- web/**
- doc/**
pull_request:
branches:
- main
paths-ignore:
- web/**
- doc/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
x11: [ON, OFF]
wayland: [ON, OFF]
compiler:
- clang
- gcc
runs-on: ${{ matrix.os }}
steps:
- run: sudo apt-get -qq update
- name: Install dependencies
run: |
sudo apt-get install -yqq --no-install-recommends \
audacious-dev \
cmake \
gawk \
gperf \
lcov \
libaudclient-dev \
libcairo2-dev \
libpango1.0-dev \
libcurl4-gnutls-dev \
libdbus-glib-1-dev \
libglib2.0-dev \
libical-dev \
libimlib2-dev \
libircclient-dev \
libiw-dev \
liblua5.3-dev \
libmicrohttpd-dev \
libmysqlclient-dev \
libpulse-dev \
librsvg2-dev \
libsystemd-dev \
libwayland-bin \
libwayland-dev \
libx11-dev \
libxdamage-dev \
libxext-dev \
libxft-dev \
libxinerama-dev \
libxml2-dev \
libxmmsclient-dev \
libxnvctrl-dev \
ncurses-dev \
ninja-build \
wayland-protocols
- name: Install clang and libc++
if: matrix.compiler == 'clang'
run: |
sudo apt-get install -yqq --no-install-recommends \
clang \
libc++-dev \
libc++abi-dev
- name: Install gcc
if: matrix.compiler == 'gcc'
run: |
sudo apt-get install -yqq --no-install-recommends \
gcc \
g++
- name: Checkout
uses: actions/checkout@v4
- name: Configure with CMake
run: |
set -x # show the commands we're running
[[ "${{ matrix.compiler }}" == "clang"* ]] && CC=clang
[[ "${{ matrix.compiler }}" == "clang"* ]] && CXX=clang++
[[ "${{ matrix.compiler }}" == "gcc"* ]] && CC=gcc
[[ "${{ matrix.compiler }}" == "gcc"* ]] && CXX=g++
# Enable librsvg by default, disable for older versions of Ubuntu
# because we need librsvg>=2.52
RSVG_ENABLED=ON
[[ "${{ matrix.os }}" == "ubuntu-20.04"* ]] && RSVG_ENABLED=OFF
mkdir build
cd build
cmake .. -G Ninja \
-DBUILD_AUDACIOUS=ON \
-DBUILD_HTTP=ON \
-DBUILD_ICAL=ON \
-DBUILD_ICONV=ON \
-DBUILD_IRC=ON \
-DBUILD_IRC=ON \
-DBUILD_JOURNAL=ON \
-DBUILD_LUA_CAIRO=ON \
-DBUILD_LUA_CAIRO_XLIB=ON \
-DBUILD_LUA_IMLIB2=ON \
-DBUILD_LUA_RSVG=${RSVG_ENABLED} \
-DBUILD_MYSQL=ON \
-DBUILD_NVIDIA=ON \
-DBUILD_PULSEAUDIO=ON \
-DBUILD_CURL=ON \
-DBUILD_RSS=ON \
-DBUILD_TESTS=ON \
-DBUILD_WLAN=ON \
-DBUILD_WAYLAND=${{ matrix.wayland }}\
-DBUILD_X11=${{ matrix.x11 }} \
-DBUILD_XMMS2=ON \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \
-DMAINTAINER_MODE=ON
- name: Compile
run: cmake --build build
- name: Test
working-directory: build
run: ctest