-
Notifications
You must be signed in to change notification settings - Fork 2
181 lines (151 loc) · 4.86 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: Build for MacOS, Linux, and Windows
on: [push, pull_request]
jobs:
build-macos-arm64:
runs-on: macos-latest
strategy:
matrix:
arch: [arm64] # Mac architectures: ARM
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies on MacOS
run: |
echo "Setting up dependencies on MacOS ${{ matrix.arch }}"
brew install cmake
- name: Build the project on MacOS
run: |
echo "Building project on MacOS ${{ matrix.arch }}"
mkdir build
cd build
cmake -DBUILD_PLATFORM=mac -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: miniaudioex-build-macos-arm64
path: build/
build-macos-x86_64:
runs-on: macos-13
strategy:
matrix:
arch: [x86_64] # Mac architecture: Intel
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies on MacOS
run: |
echo "Setting up dependencies on MacOS ${{ matrix.arch }}"
brew install cmake
- name: Build the project on MacOS
run: |
echo "Building project on MacOS ${{ matrix.arch }}"
mkdir build
cd build
cmake -DBUILD_PLATFORM=mac -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: miniaudioex-build-macos-x86_64
path: build/
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64] # Linux architectures: x64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies on Linux
run: |
echo "Setting up dependencies on Linux ${{ matrix.arch }}"
sudo apt-get update
sudo apt-get install -y cmake
- name: Build the project on Linux
run: |
echo "Building project on Linux ${{ matrix.arch }}"
mkdir build
cd build
cmake -DBUILD_PLATFORM=linux_x86_64 -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: miniaudioex-build-linux-x86_64
path: build/
build-linux-arm64:
runs-on: ubuntu-22.04-arm
strategy:
matrix:
arch: [arm64] # Linux architecture: ARM64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies on Linux ARM64
run: |
echo "Setting up dependencies on Linux ARM64 ${{ matrix.arch }}"
sudo apt-get update
sudo apt-get install -y cmake
- name: Build the project on Linux ARM64
run: |
echo "Building project on Linux ARM64 ${{ matrix.arch }}"
mkdir build
cd build
cmake -DBUILD_PLATFORM=linux_arm64 -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: miniaudioex-build-linux-arm64
path: build/
build-linux-arm32:
runs-on: ubuntu-22.04-arm
strategy:
matrix:
arch: [arm64] # Linux architecture: ARM32
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies on Linux ARM32
run: |
echo "Setting up dependencies on Linux ARM32 ${{ matrix.arch }}"
sudo apt-get update
sudo apt-get install -y cmake gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- name: Build the project on Linux ARM32
run: |
echo "Building project on Linux ARM32 ${{ matrix.arch }}"
mkdir build
cd build
cmake -DBUILD_PLATFORM=linux_arm -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ ..
cmake --build .
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: miniaudioex-build-linux-arm
path: build/
build-windows:
runs-on: windows-latest
strategy:
matrix:
name: [win32, x64]
#arch: [x86, x86_64] # Windows architectures: x86 (32-bit) and x64 (64-bit)
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies on Windows
run: |
echo "Setting up dependencies on Windows ${{ matrix.name }}"
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
- name: Build the project on Windows
run: |
echo "Building project on Windows ${{ matrix.name }}"
mkdir build
cd build
cmake -A ${{ matrix.name }} -DBUILD_PLATFORM=windows -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: miniaudioex-build-windows-${{ matrix.name }}
path: build/