-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (44 loc) · 1.32 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
on:
push:
pull_request:
branches:
- main
name: "Build"
jobs:
build-cmake:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- { name: Ubuntu, os: ubuntu-20.04 }
- { name: Windows32, os: windows-2019, param: "-A Win32" }
- { name: Windows, os: windows-2019 }
- { name: MacOS13, os: macos-13 }
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install Dependencies (Linux)"
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install libsdl2-dev
- name: "Install Dependencies (OSX)"
if: ${{ runner.os == 'macOS' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2
- name: "Install Dependencies (Windows)"
if: ${{ runner.os == 'Windows' }}
run: choco install zip
- name: "Compile"
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install ${{ matrix.platform.param }}
cmake --build .
cmake --install .
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.name }}
path: build/install/*