-
Notifications
You must be signed in to change notification settings - Fork 38
177 lines (162 loc) · 5.45 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
166
167
168
169
170
171
172
173
174
175
176
177
name: build
on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]
jobs:
build-ubuntu-22-04:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies (apt)
run: sudo apt install python3-pip ninja-build libsndfile1-dev libliquid-dev nlohmann-json3-dev perl
- name: Install meson (pip3)
run: pip3 install --user meson
- name: meson setup
run: meson setup -Dwerror=true build
- name: compile
run: cd build && meson compile
- name: Test command-line interface
run: perl test/cli.pl build/redsea
build-ubuntu-20-04:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies (apt)
run: sudo apt install python3-pip ninja-build libsndfile1-dev libliquid-dev nlohmann-json3-dev perl
- name: Install meson (pip3)
run: pip3 install --user meson
- name: meson setup
run: meson setup -Dwerror=true build
- name: compile
run: cd build && meson compile
- name: Test command-line interface
run: perl test/cli.pl build/redsea
build-ubuntu-deb-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Debian packaging tools
run: sudo apt install build-essential devscripts debhelper equivs perl
- name: Install Build-Depends
run: sudo mk-build-deps --install --tool 'apt-get --yes'
- name: Build .deb
run: debuild -us -uc
- name: Install .deb
run: sudo dpkg -i ../redsea_*.deb
- name: Test command-line interface
run: perl test/cli.pl redsea --installed
build-debian-buster:
runs-on: ubuntu-latest
container: debian:buster
steps:
- uses: actions/checkout@v4
- name: Install dependencies (apt-get)
run: apt-get update && apt-get -y install python3-pip ninja-build build-essential libsndfile1-dev libliquid-dev nlohmann-json3-dev perl
- name: Install meson (pip3)
run: pip3 install --user meson
- name: meson setup
run: export PATH=$PATH:$HOME/.local/bin && meson setup -Dwerror=true build
- name: compile
run: export PATH=$PATH:$HOME/.local/bin && cd build && meson compile
- name: Test command-line interface
run: perl test/cli.pl build/redsea
build-test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies (brew)
run: brew install meson libsndfile liquid-dsp nlohmann-json catch2 perl gcovr
- name: meson setup
run: meson setup -Dwerror=true -Db_sanitize=address,undefined -Db_lundef=false -Db_coverage=true build -Dbuild_tests=true
- name: compile & install
run: cd build && meson install
- name: download test data
run: git lfs pull
- name: test
run: cd build && meson test
- name: Test command-line interface
run: perl test/cli.pl redsea --installed
- name: Coverage
run: cd build && ninja coverage-xml
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: build/meson-logs/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
build-windows-msys2-mingw:
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
autoconf
automake
git
make
mingw-w64-x86_64-gcc
mingw-w64-x86_64-libiconv
mingw-w64-x86_64-libsndfile
mingw-w64-x86_64-meson
mingw-w64-x86_64-nlohmann-json
mingw-w64-x86_64-python3
# Disable glibc specific checks and headers
- name: Patch & build liquid-dsp
shell: msys2 {0}
run: |
git clone https://github.com/jgaeddert/liquid-dsp.git && cd liquid-dsp
perl -i -p -e 's/(AC_CHECK_LIB\(\[c\].+| sys\/resource.h)//g' configure.ac
./bootstrap.sh && ./configure --prefix=/mingw64 && make
make install
- uses: actions/checkout@v4
- name: Build redsea.exe
shell: msys2 {0}
run: |
meson setup -Dwerror=true build && cd build && meson compile
- name: Test command-line interface
shell: msys2 {0}
run: perl test/cli.pl build/redsea.exe
build-windows-cygwin:
runs-on: windows-latest
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- uses: cygwin/cygwin-install-action@v4
with:
packages: >-
autoconf
automake
bzip2
gcc-core
gcc-g++
git
libiconv-devel
libsndfile-devel
make
meson
patch
perl
tar
xz
- name: Build liquid-dsp
shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}'
run: >-
git clone https://github.com/jgaeddert/liquid-dsp.git &&
cd liquid-dsp &&
./bootstrap.sh &&
./configure --prefix=/usr &&
make && make install
# Cygwin does not allow underscore variables that start with an uppercase when
# compiling with gcc
- name: Patch liquid.h
shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}'
run: perl -i -p -e 's/(?<=\s)(_[A-Z])(?=[,\)])/\L\1__/g' /usr/include/liquid/liquid.h
- name: Build redsea
shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}'
run: meson setup -Dwerror=true build && cd build && meson compile
- name: Test command-line interface
shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}'
run: perl test/cli.pl build/redsea