-
-
Notifications
You must be signed in to change notification settings - Fork 156
217 lines (215 loc) · 7.48 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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
name: build_and_test
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: prepare
run: |
sudo apt-get update
sudo apt-get install codespell
sudo apt-get install python3-sphinx
- name: spellcheck
run: |
make codespell
- name: docs
run: |
make docs
android-arm:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: prepare
run: |
sudo apt-get update
sudo apt-get install libc6-dev-i386
ANDROID_SDK_ROOT=/usr/local/lib/android/sdk
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
- name: android-arm-make-debug
run: |
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/21.4.7075529
export ANDROID_NDK_ABI=23
make MAKE_JOBS=2 android-arm-debug
- name: android-arm-make-development
run: |
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/21.4.7075529
export ANDROID_NDK_ABI=23
make MAKE_JOBS=2 android-arm-development
- name: android-arm-make-release
run: |
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/21.4.7075529
export ANDROID_NDK_ABI=23
make MAKE_JOBS=2 android-arm-release
- name: android-arm64-make-debug
run: |
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/21.4.7075529
export ANDROID_NDK_ABI=23
make MAKE_JOBS=2 android-arm64-debug
- name: android-arm64-make-development
run: |
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/21.4.7075529
export ANDROID_NDK_ABI=23
make MAKE_JOBS=2 android-arm64-development
- name: android-arm64-make-release
run: |
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/21.4.7075529
export ANDROID_NDK_ABI=23
make MAKE_JOBS=2 android-arm64-release
html5:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: prepare
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
- name: wasm-make-debug
run: |
export EMSCRIPTEN=$GITHUB_WORKSPACE/emsdk/upstream/emscripten
make MAKE_JOBS=2 wasm-debug
- name: wasm-test-debug
run: |
cd ./build/wasm/bin && node crown-debug --run-unit-tests
- name: wasm-make-development
run: |
export EMSCRIPTEN=$GITHUB_WORKSPACE/emsdk/upstream/emscripten
make MAKE_JOBS=2 wasm-development
- name: wasm-test-development
run: |
cd ./build/wasm/bin && node crown-development --run-unit-tests
- name: wasm-make-release
run: |
export EMSCRIPTEN=$GITHUB_WORKSPACE/emsdk/upstream/emscripten
make MAKE_JOBS=2 wasm-release
- name: wasm-test-release
run: |
cd ./build/wasm/bin && node crown-release --run-unit-tests
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: prepare
run: |
sudo apt-get update
sudo apt-get install mesa-common-dev libgl1-mesa-dev libpulse-dev libxrandr-dev libc6-dev-i386
sudo apt-get install libgtk-3-dev
sudo add-apt-repository ppa:vala-team
sudo apt-get install valac libgee-0.8-dev
sudo apt-get install libxml2-utils # xml-stripblanks
- name: linux-make-debug64
run: |
make MAKE_JOBS=2 linux-debug64
- name: linux-test-debug64
run: |
cd ./build/linux64/bin && ./crown-debug --run-unit-tests
- name: linux-make-development64
run: |
make MAKE_JOBS=2 linux-development64
- name: linux-test-development64
run: |
cd ./build/linux64/bin && ./crown-development --run-unit-tests
- name: linux-make-release64
run: |
make MAKE_JOBS=2 linux-release64
- name: linux-test-release64
run: |
cd ./build/linux64/bin && ./crown-release --run-unit-tests
- name: linux-make-crown-editor-debug64
run: |
make MAKE_JOBS=2 crown-editor-linux-debug64
- name: linux-make-crown-editor-release64
run: |
make MAKE_JOBS=2 crown-editor-linux-release64
- name: linux-make-crown-launcher-debug64
run: |
make MAKE_JOBS=2 crown-launcher-linux-debug64
- name: linux-make-crown-launcher-release64
run: |
make MAKE_JOBS=2 crown-launcher-linux-release64
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: luajit
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd "3rdparty\luajit\src"
.\msvcbuild.bat
- name: luajit-copy-libs
shell: cmd
run: |
md "build\windows64\bin"
cp -r 3rdparty/luajit/src/jit 3rdparty/luajit/src/luajit.exe 3rdparty/luajit/src/lua51.dll 3rdparty/luajit/src/lua51.lib build/windows64/bin
- name: windows-generate-projects
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
scripts\genie\bin\windows\genie --file=scripts\genie.lua --with-tools --no-editor vs2019
- name: windows-make-debug64
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
devenv build/projects/vs2019/crown.sln /Build "debug|x64" /Project crown
- name: windows-test-debug64
shell: cmd
run: |
build\windows64\bin\crown-debug.exe --run-unit-tests
- name: windows-make-development64
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
devenv build/projects/vs2019/crown.sln /Build "development|x64" /Project crown
- name: windows-test-development64
shell: cmd
run: |
build\windows64\bin\crown-development.exe --run-unit-tests
- name: windows-make-release64
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
devenv build/projects/vs2019/crown.sln /Build "release|x64" /Project crown
- name: windows-test-release64
shell: cmd
run: |
build\windows64\bin\crown-release.exe --run-unit-tests
- uses: msys2/setup-msys2@v2
- name: mingw-prepare
shell: msys2 {0}
run: |
pacman --noconfirm -S make mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf mingw-w64-x86_64-gtk3 mingw-w64-x86_64-vala mingw-w64-x86_64-libgee
- name: mingw-make-crown-editor-debug64
shell: msys2 {0}
run: |
export MINGW=/mingw64
make MAKE_JOBS=2 crown-editor-mingw-debug64
- name: mingw-make-crown-editor-release64
shell: msys2 {0}
run: |
export MINGW=/mingw64
make MAKE_JOBS=2 crown-editor-mingw-release64
- name: mingw-make-crown-launcher-debug64
shell: msys2 {0}
run: |
export MINGW=/mingw64
make MAKE_JOBS=2 crown-launcher-mingw-debug64
- name: mingw-make-crown-launcher-release64
shell: msys2 {0}
run: |
export MINGW=/mingw64
make MAKE_JOBS=2 crown-launcher-mingw-release64
code-style:
runs-on: ubuntu-20.04
needs: [android-arm, html5, linux, windows]
steps:
- uses: actions/checkout@v4
- name: format
run: |
make MAKE_JOBS=2 format-sources
- name: check-diff
run: |
exit `git diff --shortstat | wc -l`