-
Notifications
You must be signed in to change notification settings - Fork 42
51 lines (49 loc) · 1.6 KB
/
main.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
name: build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
config:
- {
os: macos-latest,
c: "clang",
cmake_opts: "-DWANT_PLAYER=ON -DWANT_STATIC=ON -DWANT_COREAUDIO=ON"
}
- {
os: ubuntu-latest,
c: "clang",
cmake_opts: "-DWANT_PLAYER=ON -DWANT_STATIC=ON -DWANT_OPENAL=ON -DWANT_ALSA=ON -DWANT_OSS=ON"
}
- {
os: ubuntu-latest,
c: "gcc",
cmake_opts: "-DWANT_PLAYER=ON -DWANT_STATIC=ON -DWANT_OPENAL=ON -DWANT_ALSA=ON -DWANT_OSS=ON"
}
- {
os: windows-latest,
c: "cl",
cmake_opts: "-DWANT_PLAYER=ON -DWANT_STATIC=ON -DWANT_WINMM=ON"
}
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies (Linux)
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libasound2-dev libopenal-dev
- name: Build with ${{ matrix.config.os }} / ${{ matrix.config.c }}
env:
CC: ${{ matrix.config.c }}
run: |
cmake -B build ${{ matrix.config.cmake_opts }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/out
cmake --build build -j2 --config Release
cmake --install build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wildmidi-${{ matrix.config.os }}-${{ matrix.config.c }}
path: build/out/
retention-days: 14