-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (76 loc) · 2.48 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
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: Build Sample for Android
on: [push, pull_request]
jobs:
apk:
name: Apk Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [Debug, Release]
steps:
- name: Get the Android Builder
run: git clone https://github.com/ravbug/sdl-android-builder
- uses: actions/checkout@v4
with:
submodules: recursive
path: sdl-android-builder/to-build/HelloCube
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Fix CMake min required
run: |
cd sdl-android-builder/to-build/HelloCube/RavEngine
sed -i -e 's/3.25/3.22/' CMakeLists.txt
- name: Build the APK
run: |
cd sdl-android-builder
./gradlew assemble${{ matrix.target }}
- name: Copy Assets
run: |
cd sdl-android-builder/app/.cxx
assets=sdl-android-builder/app/.cxx/`find . -name "main.rvedata" -print -quit`
cd ../../../
mkdir sdl-android-builder/app/src/main/assets/
cp $assets sdl-android-builder/app/src/main/assets/
- name: Build APK with Assets
run: |
cd sdl-android-builder
./gradlew assemble${{ matrix.target }}
- name: Upload the APK
uses: actions/upload-artifact@v4
with:
name: app-${{matrix.target}}
path: sdl-android-builder/app/build/outputs/apk/*
build-windows:
name: Build for Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x64, ARM64]
sdk: [Windows]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Configure
run: |
mkdir build
cd build
mkdir win
cd win
cmake -A${{ matrix.arch }} -DCMAKE_SYSTEM_NAME=${{ matrix.sdk }} -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_BUILD_TYPE=Release -DRAVENGINE_BUILD_TESTS=OFF ..\..
cmake -Wno-dev ..\..
- name: Build
run: cd build; cd win; cmake --build . --config release --target install
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: RavEngine_Samples_Win${{ matrix.arch }}
path: |
build\win\release\RavEngine*.exe
build\win\release\RavEngine*.rvedata
build\win\release\RavEngine*Streaming\*