-
Notifications
You must be signed in to change notification settings - Fork 87
85 lines (70 loc) · 2.66 KB
/
Copy pathcmake.yml
File metadata and controls
85 lines (70 loc) · 2.66 KB
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
name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: ReleaseGeneric
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Update apt-get (Linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update
- name: Update brew (macOS)
if: matrix.os == 'macos-latest'
run: brew update
- name: Install Dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libsdl2-dev libopenal-dev libwildmidi-dev libvulkan-dev
- name: Install Dependencies (macOS)
if: matrix.os == 'macos-latest'
run: brew install sdl2 openal-soft wildmidi vulkan-headers vulkan-loader molten-vk
- name: Install Dependencies - MSYS2 (Windows)
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: |
mingw-w64-x86_64-toolchain
unzip
mingw-w64-x86_64-cmake
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-openal
mingw-w64-x86_64-vulkan-headers
mingw-w64-x86_64-vulkan-loader
update: true
- name: Install WildMIDI - MSYS2 (Windows)
if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: |
curl -L -o wildmidi.zip https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-0.4.6/wildmidi-0.4.6-win64.zip
unzip wildmidi.zip
cp wildmidi-0.4.6-win64/*.h /mingw64/include/
cp wildmidi-0.4.6-win64/*.a /mingw64/lib/
- name: Configure CMake (Linux)
if: matrix.os == 'ubuntu-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Configure CMake (macOS)
if: matrix.os == 'macos-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Configure CMake - MSYS2 (Windows)
if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "MinGW Makefiles"
- name: Build (Linux)
if: matrix.os == 'ubuntu-latest'
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Build (macOS)
if: matrix.os == 'macos-latest'
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Build - MSYS2 (Windows)
if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}