-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (68 loc) · 2.41 KB
/
build.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
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@v4
- 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@v4
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