-
Notifications
You must be signed in to change notification settings - Fork 1
160 lines (149 loc) · 4.57 KB
/
ci.yaml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: CI
on:
push:
branches:
- master
tags:
- "*.*.*"
pull_request:
branches:
- master
permissions:
contents: read
jobs:
linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libsdl2-dev
- name: Configure CMake
run: cmake -S . -B build
working-directory: example/test_app
- name: Build
run: make -j 4
working-directory: example/test_app/build
- name: Cache assets bundle
id: cache-assets
uses: actions/cache@v3
with:
path: example/test_app/assets.growl
key: growl-assets-${{ hashFiles('example/test_app/assets') }}
- name: Build assets
if: ${{ steps.cache-assets.outputs.cache-hit != 'true' }}
run: ./build/growl-cmd assets bundle ./assets
working-directory: example/test_app
web:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libsdl2-dev
- uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.24
- name: Configure CMake
run: emcmake cmake -S . -B build
working-directory: example/test_app
- name: Cache assets bundle
uses: actions/cache@v3
id: cache-assets
with:
path: example/test_app/assets.growl
key: growl-assets-${{ hashFiles('example/test_app/assets') }}
- name: Build assets
if: ${{ steps.cache-assets.outputs.cache-hit != 'true' }}
run: |
cmake -S . -B build.linux && \
cmake --build build.linux --parallel 4 && \
./build.linux/growl-cmd assets bundle ./assets
working-directory: example/test_app
- name: Build
run: cp ../assets.growl . && make -j 4
working-directory: example/test_app/build
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake sdl2
- name: Configure CMake
run: cmake -S . -B build
working-directory: example/test_app
- name: Build
run: make -j 4
working-directory: example/test_app/build
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Cache SDL2
id: cache-sdl2
uses: actions/cache@v3
with:
path: D:\SDL2-2.24.2
key: sdl2-devel-2.24.2-vc
- name: Fetch SDL2
if: ${{ steps.cache-sdl2.outputs.cache-hit != 'true' }}
shell: powershell
run: |
Invoke-RestMethod `
-Uri https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip `
-OutFile D:\SDL2.zip
7z x D:\SDL2.zip -oD:\
- name: Configure CMake
run: |
cmake -DSDL2_LIBRARY="D:\SDL2-2.24.2\lib\x64\SDL2.lib" `
-DSDL2_INCLUDE_DIR="D:\SDL2-2.24.2\include" `
-S . -B build
working-directory: example/test_app
- name: Build
run: cmake --build . --parallel 4
working-directory: example/test_app/build
android:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
abi:
- "arm64-v8a"
- "armeabi-v7a"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure CMake
run: |
cmake -DCMAKE_SYSTEM_NAME="Android" -DANDROID_NDK="${ANDROID_NDK}" \
-DCMAKE_ANDROID_ARCH_ABI=${{ matrix.abi }} \
-S . -B build
working-directory: example/test_app
- name: Build
run: make -j 4
working-directory: example/test_app/build
iOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure CMake
run: |
cmake -DCMAKE_SYSTEM_NAME="iOS" -GXcode \
-S . -B build
working-directory: example/test_app
- name: Build
run: |
xcodebuild -project growl-test-app.xcodeproj -target "growl-test-app" \
-configuration Debug -sdk iphoneos -parallelizeTargets \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \
build
working-directory: example/test_app/build