-
Notifications
You must be signed in to change notification settings - Fork 26
156 lines (139 loc) · 4.3 KB
/
ci.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
name: CI
on:
push:
pull_request:
defaults:
run:
shell: bash
jobs:
build-and-test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
# When set to true, GitHub cancels
# all in-progress jobs if any matrix job fails.
fail-fast: false
matrix:
include:
- name: linux-latest-gcc
os: ubuntu-latest
# local variables
build_mode: regular
os_name: linux
cc: gcc
cxx: g++
- name: linux-latest-clang
os: ubuntu-latest
# local variables
build_mode: regular
os_name: linux
cc: clang
cxx: clang++
- name: macos-latest-clang
os: macos-latest
# local variables
build_mode: regular
os_name: osx
cc: clang
cxx: clang++
steps:
- name: Checkout Code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
submodules: recursive
- name: Setup apt cache (Linux)
if: startsWith(runner.os, 'Linux')
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: /var/cache/apt
key: ${{ runner.os }}-apt-cache-${{ matrix.os }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-apt-cache-${{ matrix.os }}-
${{ runner.os }}-apt-cache-
- name: Setup Prerequisites
run: |
case ${{ runner.os }} in
Linux*)
sudo apt update
packages=(
clang
cython3
doxygen
lcov
libao-dev
libasound2-dev
#libavahi-client-dev
#libavahi-glib-dev
libavcodec-dev
libboost-dev
#libcdio-cdda-dev
libcunit1-dev
libcurl4-gnutls-dev
#libdiscid0-dev
#libefl-all-dev
libexpat1-dev
libfaad-dev
libfftw3-dev
libflac-dev
libfluidsynth-dev
libgamin-dev
libglib2.0-dev
libgme-dev
libjack-dev
libmad0-dev
libmms-dev
libmodplug-dev
libmpcdec-dev
#libmpg123-dev
libofa0-dev
#libopusfile-dev
libperl-dev
libpulse-dev
libreadline-dev
libresid-builder-dev
libsamplerate0-dev
libsdl1.2-dev
libshout3-dev
libsidplay2-dev
libsmbclient-dev
libsndfile1-dev
libsqlite3-dev
libssl-dev
libvisual-0.4-dev
libvorbis-dev
libwavpack-dev
libxml2-dev
# for podselect
libpod-parser-perl
python3-dev
python3-all-dev
ruby-all-dev
# CI's valgrind can't parse dwarf output produced by clang:
# # unhandled dwarf2 abbrev form code 0x1b
# Valgrind: debuginfo reader: Possibly corrupted debuginfo file.
# Disable it for now.
#valgrind
)
sudo apt install "${packages[@]}" || for p in "${packages[@]}"; do
# Install packages one by one if the whole bundle failed.
# That should ease detection of individual problematic package
# that pulls in conflicting depend.
echo "Installing $p"
sudo apt install "$p" || exit 1
done
;;
macOS*)
# TODO
;;
esac
- name: Setup Python
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: 3.x
- name: Build
env:
BUILD_MODE: ${{ matrix.build_mode }}
TRAVIS_OS_NAME: ${{ matrix.os_name }}
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: utils/travis-build.sh build