-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.71 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
name: CMake
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
Build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
strategy:
fail-fast: false
matrix:
platform:
- { name: Ubuntu, os: ubuntu-latest, shell: sh }
- { name: macOS, os: macos-latest, shell: sh }
- { name: Windows - mingw32, os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: Windows - mingw64, os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
steps:
- uses: actions/checkout@v3
- name: Setup GNU/Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install \
libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl1.2-dev ninja-build
- name: Setup macOS dependencies
if: runner.os == 'macOS'
run: |
brew install \
sdl_image sdl_mixer sdl12-compat ninja
- name: Set up Windows dependencies
if: matrix.platform.shell == 'msys2 {0}'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.platform.msystem }}
install: >-
${{ matrix.platform.msys-env }}-gcc
${{ matrix.platform.msys-env }}-cmake
${{ matrix.platform.msys-env }}-ninja
${{ matrix.platform.msys-env }}-SDL_image
${{ matrix.platform.msys-env }}-SDL_mixer
${{ matrix.platform.msys-env }}-SDL
- name: Configure CMake
run: cmake -B build -G Ninja
- name: Build
run: cmake --build build --verbose --parallel