-
Notifications
You must be signed in to change notification settings - Fork 126
109 lines (88 loc) · 3.4 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
env:
BUILD_TYPE: ${{ matrix.type }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
type: [Release, Debug]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get install libpulse-dev pulseaudio
if: matrix.os == 'ubuntu-20.04'
- name: Start Sound Server (Linux)
run: pulseaudio -D --start
if: matrix.os == 'ubuntu-20.04'
- name: Install virtual audio devices (Windows)
run: git clone https://github.com/LABSN/sound-ci-helpers && powershell sound-ci-helpers/windows/setup_sound.ps1
if: ${{ matrix.os == 'windows-2019' }}
- name: Allow microphone access to all apps (Windows)
shell: pwsh
run: |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy\"
New-ItemProperty -Path "HKLM:\SOFTWARE\policies\microsoft\windows\appprivacy" -Name "LetAppsAccessMicrophone" -Value "0x00000001" -PropertyType "dword"
if: ${{ matrix.os == 'windows-2019' }}
- name: Install virtual audio devices (macOS)
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' }}
run: |
brew install switchaudio-osx
brew install blackhole-2ch
SwitchAudioSource -s "BlackHole 2ch" -t input
SwitchAudioSource -s "BlackHole 2ch" -t output
- name: Allow microphone access to all apps (macOS)
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' }}
env:
tcc_extra_columns: ${{ matrix.os == 'macos-14' && ',NULL,NULL,''UNUSED'',1687786159' || '' }}
run: sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159${{ env.tcc_extra_columns }});"
- name: Configure CMake
shell: bash
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
shell: bash
run: cmake --build build
- name: Test
shell: bash
run: (cd build && ctest -V)
- name: Test winmm
shell: bash
run: (cd build && CUBEB_BACKEND=winmm ctest -V)
if: ${{ matrix.os == 'windows-2019' }}
build-android:
runs-on: ubuntu-22.04
env:
BUILD_TYPE: ${{ matrix.type }}
BUILD_ARCH: ${{ matrix.arch }}
strategy:
matrix:
type: [Release, Debug]
arch: [arm64-v8a, armeabi-v7a, x86_64]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Configure CMake
shell: bash
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=android-28 -DANDROID_ABI=$BUILD_ARCH
- name: Build
shell: bash
run: cmake --build build
check_format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get install clang-format-15
- name: Configure CMake
shell: bash
run: cmake -S . -B build -DCLANG_FORMAT_BINARY=clang-format-15
- name: Check format
shell: bash
run: cmake --build build --target clang-format-check