-
Notifications
You must be signed in to change notification settings - Fork 233
61 lines (60 loc) · 2.18 KB
/
build-and-test.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
name: build-and-test
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: DoozyX/[email protected]
with:
source: '.'
exclude: './third_party'
extensions: 'h,c'
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libfftw3-dev libasound2-dev libncursesw5-dev libpulse-dev libtool automake autoconf-archive libiniparser-dev portaudio19-dev libsndio-dev libsdl2-2.0-0 libsdl2-dev squeezelite pulseaudio libpipewire-0.3-dev
- name: Generate configure
run: ./autogen.sh
- name: Run ./configure
run: ./configure
- name: Run make
run: make CFLAGS='-Werror'
- name: Prepare tests
run: |
pulseaudio -D
squeezelite -o pulse -v -m 51:fb:32:f8:e6:9f -z
- name: run non zero test
run: ./cava -p example_files/test_configs/non_zero_test > /dev/null
- name: run pulseaudio test
run: ./cava -p example_files/test_configs/pulse_zero_test > /dev/null
- name: run fifo test
run: ./cava -p example_files/test_configs/fifo_zero_test > /dev/null
- name: run shmem test
run: ./cava -p example_files/test_configs/shmem_zero_test > /dev/null
- name: build cavacore test application
run: gcc -c -g cavacore_test.c
- name: link cavacore test application
run: gcc -o cavacore_test cavacore_test.o cava-cavacore.o -lm -lfftw3
- name: run cavacore test application
run: ./cavacore_test
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
brew install fftw libtool automake autoconf-archive portaudio iniparser sdl2
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
- name: Generate configure
run: PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" ./autogen.sh
- name: Run ./configure
run: ./configure
- name: Run make
run: make CFLAGS='-Werror'
- name: run non zero test
run: ./cava -p example_files/test_configs/non_zero_test > /dev/null