-
Notifications
You must be signed in to change notification settings - Fork 173
93 lines (75 loc) · 2.68 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
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
name: [
linux-cmake,
linux-autotools,
macos-cmake,
macos-autotools,
windows-cmake
]
include:
- name: linux-cmake
os: ubuntu-latest
build-system: cmake
- name: linux-autotools
os: ubuntu-latest
build-system: autotools
configure-options: --enable-sndfile --enable-alsa
- name: macos-cmake
os: macos-latest
build-system: cmake
- name: macos-autotools
os: macos-latest
build-system: autotools
configure-options: --enable-sndfile
- name: windows-cmake
os: windows-latest
build-system: cmake
configure-options: -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install Linux dependencies
if: startsWith(matrix.os,'ubuntu')
run: |
sudo apt-get update -y
sudo apt-get install -y libsndfile-dev libopus-dev libfftw3-dev libasound2-dev
- name: Install macOS dependencies
if: startsWith(matrix.os,'macos')
run: brew install automake libtool-bin fftw
- name: Install Windows dependencies
if: startsWith(matrix.os,'windows')
run: |
vcpkg install libsndfile:x64-windows opus:x64-windows fftw3:x64-windows
- name: Create CMake Build Environment
if: startsWith(matrix.build-system,'cmake')
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
if: startsWith(matrix.build-system,'cmake')
working-directory: ${{runner.workspace}}/build
run: cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=Release ${{matrix.configure-options}}
- name: Build CMake
if: startsWith(matrix.build-system,'cmake')
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Release
- name: Test CMake
if: startsWith(matrix.build-system,'cmake')
working-directory: ${{runner.workspace}}/build
run: ctest -C Release
- name: Bootstrap Autotools
if: startsWith(matrix.build-system,'autotools')
run: ./autogen.sh
- name: Configure Autotools
if: startsWith(matrix.build-system,'autotools')
run: ./configure ${{matrix.configure-options}}
- name: Build Autotools
if: startsWith(matrix.build-system,'autotools')
run: make
- name: Test Autotools
if: startsWith(matrix.build-system,'autotools')
run: make distcheck