-
Notifications
You must be signed in to change notification settings - Fork 31
132 lines (117 loc) · 4.14 KB
/
linux.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
name: Build and test (Linux)
on:
pull_request:
push:
schedule:
- cron: '0 3 * * 5' # Every Friday at 3am
env:
LV_BUILD_TYPE: Debug
LV_INSTALL_PREFIX: /home/runner/.local/
jobs:
linux:
name: Build and test (Linux)
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- cc: gcc-12
cxx: g++-12
clang_major_version: null
clang_repo_suffix: null
- cc: clang-18
cxx: clang++-18
clang_major_version: 18
clang_repo_suffix: -18
steps:
- name: Add Clang/LLVM repositories
if: "${{ 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
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 \
bison \
doxygen \
flex \
gettext \
graphviz \
libgstreamer1.0-dev \
libgtk2.0-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 }}
if: "${{ contains(matrix.cxx, 'clang') }}"
run: |-
sudo apt-get install --yes --no-install-recommends -V \
clang-${{ matrix.clang_major_version }}
- name: Checkout Git branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: '[LV] Run CMake'
run: |-
mkdir build_lv
cd build_lv
cmake \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${LV_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX:PATH=${LV_INSTALL_PREFIX} \
\
-DENABLE_DOCS=yes \
-DENABLE_FATAL_WARNINGS=yes \
-DENABLE_TESTS=yes \
../libvisual/ \
- 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 CMake'
run: |-
mkdir build_plugins
cd build_plugins
PKG_CONFIG_PATH=${LV_INSTALL_PREFIX}/lib/pkgconfig/ \
cmake \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${LV_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX:PATH=${LV_INSTALL_PREFIX} \
\
-DENABLE_FATAL_WARNINGS=yes \
../libvisual-plugins/
- 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: '[LV] Run tests (exit code ignored for now!)'
# TODO Fix tests and remove " || true" here
run: |-
make -C build_lv \
CMAKE_CONFIG_TYPE=${LV_BUILD_TYPE} \
CTEST_OUTPUT_ON_FAILURE=1 \
VERBOSE=1 \
test || true