-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (55 loc) · 1.63 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
52
53
54
55
56
57
58
59
name: Build
on: [push, pull_request]
jobs:
desktop:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- { name: Linux, os: ubuntu-latest }
- { name: Windows, os: windows-latest }
- { name: MacOS, os: macos-latest }
steps:
- name: Set up SDL
id: sdl
uses: libsdl-org/setup-sdl@main
with:
version: sdl3-head
- name: Get project sources
uses: actions/checkout@v4
- name: Configure (CMake)
run: cmake -B build ${{ matrix.platform.flags }} -DDOWNLOAD_DEPENDENCIES=OFF
- name: Build (CMake)
run: cmake --build build/
emscripten:
name: Emscripten
runs-on: ubuntu-latest
steps:
- name: Get project sources
uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@master
- name: Configure (CMake)
run: emcmake cmake -B build ${{ matrix.platform.flags }} -DDOWNLOAD_DEPENDENCIES=ON
- name: Build (CMake)
run: cmake --build build/
android:
name: Android
runs-on: ubuntu-latest
steps:
- name: Get project sources
uses: actions/checkout@v4
- name: Download SDL3 Android Archive
env:
GH_TOKEN: ${{ github.token }}
run:
gh -R libsdl-org/SDL release download preview-3.1.6 -D android-project/app/libs -p '*.aar'
- name: Setup required Java version
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Build gradle project
run: |
cd android-project
./gradlew -i assembleRelease