Skip to content

Update blame ignore & labeler (#2133) #1949

Update blame ignore & labeler (#2133)

Update blame ignore & labeler (#2133) #1949

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
env:
SCCACHE_VERSION: "0.9.0"
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: Install sccache
run: .github/scripts/setup-sccache.sh
- name: Load cached compilation artifacts
id: compiler-cache
uses: actions/cache@v4
with:
path: "${{ env.SCCACHE_DIR }}"
key: sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}-${{ matrix.compiler }}-${{ github.ref }}
- 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
# Reset sccache statistics
sccache --zero-stats
cmake . -B build -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_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: Show sccache stats
run: sccache --show-stats
- name: Test
working-directory: build
run: ctest --output-on-failure