-
Notifications
You must be signed in to change notification settings - Fork 31
195 lines (172 loc) · 6.1 KB
/
linux_and_macos.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: Build and test (Linux + macOS)
on:
pull_request:
push:
schedule:
- cron: '0 3 * * 5' # Every Friday at 3am
jobs:
linux_and_macos:
name: Build and test (${{ matrix.runs-on }}, ${{ matrix.cc }})
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- cc: gcc-13
cxx: g++-13
clang_major_version: null
clang_repo_suffix: null
runs-on: macos-13
steps:
- name: Add Clang/LLVM repositories (Linux)
if: "${{ runner.os == 'Linux' && contains(matrix.cxx, 'clang') }}"
run: |-
set -x
source /etc/os-release
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}${{ matrix.clang_repo_suffix }} main"
- name: Install build dependencies (Linux)
if: runner.os == 'Linux'
run: |-
sudo apt-get update
# Note: This additional step's sole purpuse is to workaround symptom:
# > The following packages have unmet dependencies:
# > libunwind-14-dev : Breaks: libunwind-dev but 1.3.2-2build2
# > is to be installed
sudo apt-get install --yes --no-install-recommends libunwind-dev
sudo apt-get install --yes --no-install-recommends \
autoconf-archive \
autopoint \
bison \
doxygen \
flex \
gettext \
graphviz \
libgstreamer1.0-dev \
libgtk-3-dev \
libjack-dev \
libluajit-5.1-dev \
liborc-0.4-dev \
libpng-dev \
libasound2-dev \
libsdl1.2-dev \
libgl1-mesa-dev \
pkg-config \
portaudio19-dev
- name: Install build dependency Clang ${{ matrix.clang_major_version }} (Linux)
if: "${{ runner.os == 'Linux' && contains(matrix.cxx, 'clang') }}"
run: |-
sudo apt-get install --yes --no-install-recommends -V \
clang-${{ matrix.clang_major_version }}
- name: Install build dependencies (macOS)
if: runner.os == 'macOS'
run: |-
brew install \
autoconf-archive \
automake \
bison \
doxygen \
flex \
gettext \
graphviz \
gstreamer \
gtk+3 \
jack \
libpng \
luajit \
orc \
pkg-config \
portaudio \
sdl12-compat
set -x
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
brew config >&2
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
brew doctor >&2
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
exit 1
- name: Setting dynamic environment variables
run: |-
set -x
echo "LV_INSTALL_PREFIX=${HOME}/.local" >> "${GITHUB_ENV}"
- name: Checkout Git branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: '[LV] Run autoreconf'
run: |-
for i in libvisual libvisual-plugins ; do
pushd ${i}
NOCONFIGURE=please ./autogen.sh
popd
done
- name: '[LV] Run "./configure" (from Git)'
run: |-
cd libvisual
./configure || { cat config.log ; false ; }
- name: '[LV] Run "make dist"'
run: |-
make -C libvisual dist
- name: '[LV] Run "./configure" (from tarball)'
run: |-
tar xf libvisual/libvisual-0.*.tar.gz
mkdir build_lv
cd build_lv
../libvisual-0.*/configure \
CC=${{ matrix.cc }} \
CXX=${{ matrix.cxx }} \
--prefix ${LV_INSTALL_PREFIX} \
--enable-debug \
--enable-threads \
|| { cat config.log ; false ; }
- name: '[LV] Run "make"'
run: |-
make -C build_lv -j2 VERBOSE=1
- name: '[LV] Run "make install"'
run: |-
make -C build_lv install
find ${LV_INSTALL_PREFIX} | sort
- name: '[Plugins] Run "./configure" (from Git)'
run: |-
cd libvisual-plugins
PKG_CONFIG_PATH=${LV_INSTALL_PREFIX}/lib/pkgconfig/ \
./configure \
|| { cat config.log ; false ; }
- name: '[Plugins] Run "make dist"'
run: |-
make -C libvisual-plugins dist
- name: '[Plugins] Run "./configure" (from tarball)'
# TODO Make gstreamer plugin work with GStreamer 1.x (on master!)
run: |-
tar xf libvisual-plugins/libvisual-plugins-0.*.tar.gz
mkdir build_plugins
cd build_plugins
PKG_CONFIG_PATH=${LV_INSTALL_PREFIX}/lib/pkgconfig/ \
../libvisual-plugins-0.*/configure \
CC=${{ matrix.cc }} \
CXX=${{ matrix.cxx }} \
--prefix ${LV_INSTALL_PREFIX} \
|| { cat config.log ; false ; }
- name: '[Plugins] Run "make"'
run: |-
set -x -o pipefail
make -C build_plugins -j2 VERBOSE=1
# Detect and deny underlinking
! find -name \*.so | sort | xargs ldd -r | grep -F 'undefined symbol'
- name: '[Plugins] Run "make install"'
run: |-
make -C build_plugins install DESTDIR="${PWD}"/ROOT_PLUGINS
find ROOT_PLUGINS/ | sort
- name: 'Prepare artifacts for upload'
if: "${{ strategy.job-index == 0 }}"
run: |-
set -x
dirname="commit-$(git log -1 --format='%H')"
mkdir "${dirname}"/
mv -v libvisual/libvisual-0.*.tar.* "${dirname}"/
mv -v libvisual-plugins/libvisual-plugins-0.*.tar.* "${dirname}"/
- name: 'Upload artifacts'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: "${{ strategy.job-index == 0 }}"
with:
name: release-archives
path: commit-*/*
if-no-files-found: error