Skip to content

Commit 83d31fb

Browse files
authored
Merge pull request #89 from Cuda-Chen/add-sound-mux-test
Add PulseAudio dependency CI
2 parents 5cb78df + dc2dd29 commit 83d31fb

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@ on: [push, pull_request]
55
jobs:
66
semu-linux:
77
runs-on: ubuntu-24.04
8+
strategy:
9+
matrix:
10+
dependency:
11+
- libpulse-dev
12+
- none
813
steps:
9-
- uses: actions/checkout@v4
14+
- name: checkout code
15+
uses: actions/checkout@v4
1016
- name: install-dependencies
1117
run: |
1218
sudo apt-get install build-essential device-tree-compiler expect
1319
sudo apt-get install libasound2-dev libudev-dev
20+
- name: install sound multiplexer ${{ matrix.dependency }}
21+
if: matrix.dependency != 'none'
22+
run: sudo apt-get install ${{ matrix.dependency }}
1423
- name: default build
1524
run: make
1625
shell: bash

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ endif
6262

6363
ifeq ($(UNAME_S),Linux)
6464
# Check ALSA installation
65-
ifeq (0, $(call check-alsa))
65+
ifeq (1, $(call check-alsa))
6666
$(warning No libasound installed. Check libasound in advance.)
6767
ENABLE_VIRTIOSND := 0
6868
endif
6969
endif
7070
ifeq ($(UNAME_S),Darwin)
71-
ifeq (0, $(call check-coreaudio))
71+
ifeq (1, $(call check-coreaudio))
7272
$(warning No CoreAudio installed Check AudioToolbox in advance.)
7373
ENABLE_VIRTIOSND := 0
7474
endif

mk/check-libs.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ endef
3434

3535
# Check ALSA installation
3636
define check-alsa
37-
$(shell $(call create-alsa-prog) | $(CC) -x c -lasound -o /dev/null > /dev/null 2> /dev/null -
38-
&& echo $$?)
37+
$(shell $(call create-alsa-prog) | $(CC) -x c - -lasound -o /dev/null > /dev/null 2> /dev/null
38+
&& echo 0 || echo 1)
3939
endef
4040

4141
# Check PulseAudio installation
4242
define check-pa
43-
$(shell $(call create-pa-prog) | $(CC) -x c -lpulse -o /dev/null - && echo 0 || echo 1)
43+
$(shell $(call create-pa-prog) | $(CC) -x c - -lpulse -o /dev/null && echo 0 || echo 1)
4444
endef
4545

4646
# Check CoreAudio installation
4747
define check-coreaudio
48-
$(shell $(call create-ca-prog) | $(CC) -x c -framework AudioToolbox -o /dev/null > /dev/null 2> /dev/null -
49-
&& echo $$?)
48+
$(shell $(call create-ca-prog) | $(CC) -x c - -framework AudioToolbox -o /dev/null > /dev/null 2> /dev/null
49+
&& echo 0 || echo 1)
5050
endef

0 commit comments

Comments
 (0)