-
-
Notifications
You must be signed in to change notification settings - Fork 620
134 lines (128 loc) · 4.02 KB
/
build-and-test-linux.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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