-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
230 lines (216 loc) · 7.41 KB
/
.gitlab-ci.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
218
219
220
221
222
223
224
225
226
227
228
229
230
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
image: registry.fedoraproject.org/fedora-minimal:37
test:
stage: test
script:
- microdnf install -y git clang fontconfig-devel freetype-devel libvorbis-devel libepoxy-devel libwebp-devel boost-python3-devel python3-devel cmake ninja-build SDL2-devel openal-soft-devel clang-tools-extra python3-PyYAML libcxx-devel libasan mesa-dri-drivers xorg-x11-drivers >/dev/null
- Xorg -config ./test/xorg.conf &>/dev/null &
# - sleep 1 # wait for Xorg to boot up
- rm -rf build
- mkdir build
- cd build
- cmake -GNinja -DPAC_SANITIZE_ADDRESS=0 ..
- TERM=xterm script -qfec "ninja" /dev/null
- cd test
- DISPLAY=:0 ctest -V --output-junit testRes.xml && true
- cat Testing/Temporary/LastTest.log
- cat testRes.xml
- cd ../..
- rm -rf build
- mkdir build
- cd build
- CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DPAC_SANITIZE_ADDRESS=0 -GNinja ..
- TERM=xterm script -qfec "ninja" /dev/null
- cd test
- DISPLAY=:0 ctest -V --output-junit testRes.xml && true
- cat Testing/Temporary/LastTest.log
- cat testRes.xml
artifacts:
paths:
- build/test/Testing/Temporary/LastTest.log
- build/test/testRes.xml
reports:
junit: build/test/testRes.xml
retry: 2
cppcheck:
stage: test
allow_failure: true
script:
- microdnf install -y cppcheck
- cppcheck --enable=all --language=c++ --std=c++14 --error-exitcode=1 ./src/ -I
./subprojects/spine-runtimes/spine-c/spine-c/include/ -I subprojects/jngl/src
-D SPINEPLUGIN_API -I subprojects/yaml-cpp/include -I subprojects/sol2/include --suppress=missingIncludeSystem
flawfinder:
stage: test
allow_failure: true
script:
- microdnf install -y flawfinder
- flawfinder --falsepositive -m 5 ./src/
linux:
stage: build
script:
- microdnf install -y git clang fontconfig-devel freetype-devel libvorbis-devel
libepoxy-devel libwebp-devel boost-python3-devel python3-devel cmake ninja-build
SDL2-devel openal-soft-devel clang-tools-extra python3-PyYAML libcxx-devel libasan
>/dev/null
- mkdir build
- cd build
- cmake -GNinja ..
- TERM=xterm script -qfec "ninja pac" /dev/null
- cd ..
- rm -rf build
- mkdir build
- cd build
- CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1
-GNinja ..
- TERM=xterm script -qfec "ninja pac" /dev/null
- TERM=xterm script -qfec "../subprojects/jngl/data/run-clang-tidy.py" | sed s_$PWD/__
- '! grep -Fq "error:" typescript'
linux_debug:
stage: build
script:
- microdnf install -y git clang fontconfig-devel freetype-devel libvorbis-devel
libepoxy-devel libwebp-devel boost-python3-devel python3-devel cmake ninja-build
SDL2-devel openal-soft-devel clang-tools-extra python3-PyYAML libcxx-devel libasan
>/dev/null
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ..
- TERM=xterm script -qfec "ninja pac" /dev/null
- cd ..
- rm -rf build
- mkdir build
- cd build
- CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1
-GNinja -DCMAKE_BUILD_TYPE=Debug ..
- TERM=xterm script -qfec "ninja pac" /dev/null
- TERM=xterm script -qfec "../subprojects/jngl/data/run-clang-tidy.py" | sed s_$PWD/__
- '! grep -Fq "error:" typescript'
linux_release:
stage: build
script:
- microdnf install -y git clang fontconfig-devel freetype-devel libvorbis-devel
libepoxy-devel libwebp-devel boost-python3-devel python3-devel cmake ninja-build
SDL2-devel openal-soft-devel clang-tools-extra python3-PyYAML libcxx-devel libasan
>/dev/null
- mkdir build
- cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
- TERM=xterm script -qfec "ninja pac" /dev/null
- cd ..
- rm -rf build
- mkdir build
- cd build
- CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1
-GNinja -DCMAKE_BUILD_TYPE=Release ..
- TERM=xterm script -qfec "ninja pac" /dev/null
- TERM=xterm script -qfec "../subprojects/jngl/data/run-clang-tidy.py" | sed s_$PWD/__
- '! grep -Fq "error:" typescript'
windows:
stage: build
script:
- microdnf install -y cmake ninja-build mingw32-pkg-config mingw32-libvorbis
mingw32-SDL2 mingw32-fontconfig mingw32-libwebp mingw32-boost mingw32-dlfcn mingw32-libepoxy
mingw32-openal-soft mingw32-nsis git >/dev/null
- mingw32-cmake -Bbuild-windows -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0
- ninja -Cbuild-windows pac.exe
- cd windows
- sh ./convert.sh
- cd ..
- makensis windows/installer.nsi
artifacts:
paths:
- ALPACA Setup.exe
web:
stage: build
image: emscripten/emsdk
script:
- cmake --version
- sudo apt update -y
- sudo apt upgrade -y
- sudo apt install libvorbis-dev libogg-dev -y
- mkdir build
- cp -r data build/data
- cd build
- emcmake cmake -DJNGL_VIDEO=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Wno-enum-constexpr-conversion .. && make -j8 pac
- rm -rf CMakeFiles CMakeCache.txt Makefile _deps cmake_install.cmake include subprojects
- mv pac.html index.html
artifacts:
paths:
- build/
android:
stage: build
image: registry.gitlab.com/jhasse/android-ndk-docker:r26b
script:
- cd android
- chmod +x gradlew
- "./gradlew build"
- "./gradlew assembleRelease"
artifacts:
paths:
- android/app/build/outputs/apk/release/app-release.apk
- android/app/build/outputs/bundle/release/app-release.aab
only:
refs:
- master
variables:
GIT_SUBMODULE_STRATEGY: recursive
fastlane:
stage: deploy
dependencies:
- android
before_script:
- echo $google_play_service_account_api_key_json > ./google_play_api_key.json
after_script:
- rm ./google_play_api_key.json
script:
- microdnf install -y ruby-devel libstdc++-static redhat-rpm-config git gcc-c++ tar >/dev/null
- export LC_ALL=en_US.UTF-8
- export LANG=en_US.UTF-8
- ruby --version
- gem install bundler
- bundle update
- bundle install --quiet
- cd android
- ls -la
- fastlane supply --apk app/build/outputs/apk/release/app-release.apk --track internal --release_status draft --skip_upload_changelogs true
only:
refs:
- master
changes:
- android/app/src/main/AndroidManifest.xml
docs:
stage: build
script:
- microdnf install -y python3-devel
- pip install pipenv
- pipenv install -d --python 3.12
- cd lua-docs
- pipenv run mkdocs build
artifacts:
paths:
- lua-docs/site
pages:
stage: deploy
dependencies:
- web
- docs
script:
- cp -r lua-docs/site public
- cp -r build public/demo
artifacts:
paths:
- public
only:
refs:
- master
sast:
stage: test
include:
- template: Security/SAST.gitlab-ci.yml