-
Notifications
You must be signed in to change notification settings - Fork 22
165 lines (146 loc) · 3.93 KB
/
build.yml
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
---
name: CI
on:
workflow_dispatch:
push:
paths-ignore:
- 'doc/**'
- 'lyrics/**'
- 'po/**'
branches:
- master
pull_request:
paths-ignore:
- 'doc/**'
- 'lyrics/**'
- 'po/**'
branches:
- master
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build-linux:
strategy:
matrix:
compiler: [gcc14, gcc11, clang]
include:
- compiler: gcc14
os: ubuntu-24.04
cc: gcc-14
cxx: g++-14
ldflags: -fuse-ld=mold
packages: g++-14 mold libfmt-dev
meson_options:
- compiler: gcc11
os: ubuntu-22.04
cc: gcc-11
cxx: g++-11
ldflags:
packages: g++-11
meson_options: --force-fallback-for=fmt
- compiler: clang
os: ubuntu-24.04
cc: clang
cxx: clang++
ldflags: -fuse-ld=lld
packages: clang lld
meson_options: --force-fallback-for=fmt
runs-on: ${{ matrix.os }}
env:
CC: ccache ${{ matrix.cc }}
CXX: ccache ${{ matrix.cxx }}
LDFLAGS: ${{ matrix.ldflags }}
steps:
- id: checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
meson \
ccache \
ncmpc \
${{ matrix.packages }} \
libncursesw5-dev \
libncurses5-dev \
libpcre2-dev \
libmpdclient-dev
- id: cache-ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.compiler }}
- name: Configure Full
run: |
meson setup \
-Ddocumentation=disabled \
-Dlyrics_screen=true \
-Dchat_screen=true \
--wrap-mode nofallback \
${{ matrix.meson_options }} \
output/full
- name: Build Full
run: meson compile -C output/full --verbose
- name: Configure Mini
run: |
meson setup \
-Dbuildtype=minsize \
-Dauto_features=disabled \
-Db_ndebug=true -Db_lto=true \
-Dcurses=ncurses \
-Dcolors=false \
-Dmultibyte=false \
-Dasync_connect=false \
-Dmini=true \
--wrap-mode nofallback \
${{ matrix.meson_options }} \
output/mini
- name: Build Mini
run: meson compile -C output/mini --verbose
build-macos:
runs-on: macos-latest
steps:
- id: checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
brew install \
meson ninja \
fmt \
ccache \
ncurses \
pcre2 \
libmpdclient
- id: cache-ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: macos
- name: Configure Full
run: |
meson setup \
-Ddocumentation=disabled \
-Dlyrics_screen=true \
-Dchat_screen=true \
--wrap-mode nofallback \
${{ matrix.meson_options }} \
output/full
- name: Build Full
run: meson compile -C output/full --verbose
- name: Configure Mini
run: |
meson setup \
-Dbuildtype=minsize \
-Dauto_features=disabled \
-Db_ndebug=true -Db_lto=true \
-Dcurses=ncurses \
-Dcolors=false \
-Dmultibyte=false \
-Dasync_connect=false \
-Dmini=true \
--wrap-mode nofallback \
${{ matrix.meson_options }} \
output/mini
- name: Build Mini
run: meson compile -C output/mini --verbose