Skip to content

fix homebrew paths in mac os workflow #253

fix homebrew paths in mac os workflow

fix homebrew paths in mac os workflow #253

name: build-and-test
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: DoozyX/clang-format-lint-action@v0.5
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 ncurses 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: LDFLAGS="-L/opt/homebrew/opt/ncurses/lib" CPPFLAGS="-I/opt/homebrew/opt/ncurses/include -I/opt/homebrew/opt/ncurses/include" ./configure
- name: Run make
run: LDFLAGS="-L/opt/homebrew/opt/ncurses/lib" CPPFLAGS="-I/opt/homebrew/opt/ncurses/include -I/opt/homebrew/opt/ncurses/include" make CFLAGS='-Werror'
- name: run non zero test
run: ./cava -p example_files/test_configs/non_zero_test > /dev/null