1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-16 12:10:31 +00:00
conky/.github/workflows/build-and-test-linux.yaml

135 lines
4.0 KiB
YAML
Raw Normal View History

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