Skip to content

Build AAudio plugin in CI #286

Build AAudio plugin in CI

Build AAudio plugin in CI #286

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
name: Build
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
cc: [gcc, clang]
exclude:
- os: macos-latest
cc: gcc
runs-on: ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Dependencies (Homebrew)
if: startswith(matrix.os, 'macos-')
run: |
brew install \
libao ffmpeg libcddb libcdio libcue libdiscid faad2 flac jack mad \
libmodplug mp4v2 musepack opusfile libsamplerate libvorbis wavpack \
pkg-config
- name: Dependencies (apt)
if: startswith(matrix.os, 'ubuntu-')
run: |
sudo apt-get update -qyy
sudo apt-get install -qyy \
bash-completion libao-dev libasound2-dev libavcodec-dev \
libavformat-dev libswresample-dev libcddb2-dev libcdio-cdda-dev \
libcue-dev libdiscid-dev libfaad-dev libflac-dev libjack-dev \
libmad0-dev libmodplug-dev libmpcdec-dev libncursesw5-dev \
libopusfile-dev libpulse-dev libroar-dev libsamplerate0-dev \
libsndio-dev libvorbis-dev libwavpack-dev libsystemd-dev pkg-config
- name: Build
run: |
./configure CC="${{matrix.cc}}"
make
- name: Run
run: |
CMUS_LIB_DIR="${PWD}" ./cmus --version
CMUS_LIB_DIR="${PWD}" ./cmus --plugins
- name: Archive
run: |
mkdir tmp
make install DESTDIR=${PWD}/tmp
XZ_OPT=-9 tar -cJf cmus.tar.xz -C "${PWD}/tmp" .
- name: Upload
uses: actions/upload-artifact@v2
with:
name: cmus (${{matrix.os}}, ${{matrix.cc}})
path: cmus.tar.xz
build_ndk:
name: Build (android, ndk, ${{matrix.arch}})
strategy:
matrix:
arch: [aarch64, armv7a, x86_64]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build op/aaudio.so
run: ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target ${{matrix.arch}}-linux-android26 -shared -o op/aaudio.so -fPIC -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -Werror=unguarded-availability -Wall -std=gnu11 op/aaudio.c -laaudio
- name: Upload
uses: actions/upload-artifact@v4
with:
name: cmus (android, ndk, ${{matrix.arch}})
path: op/aaudio.so