Skip to content

Commit 7520167

Browse files
committed
Initial commit
0 parents  commit 7520167

File tree

300 files changed

+145631
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+145631
-0
lines changed

.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BasedOnStyle: WebKit
2+
AllowShortIfStatementsOnASingleLine: WithoutElse

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_white_space = true

.gitattributes

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Force LF
2+
*.c text eol=lf
3+
*.cc text eol=lf
4+
*.cmake text eol=lf
5+
*.gradle text eol=lf
6+
*.h text eol=lf
7+
*.java text eol=lf
8+
*.json text eol=lf
9+
*.md text eol=lf
10+
*.plist text eol=lf
11+
*.pro text eol=lf
12+
*.properties text eol=lf
13+
*.xml text eol=lf
14+
*.yml text eol=lf
15+
.clang-format text eol=lf
16+
.editorconfig text eol=lf
17+
.gitattributes text eol=lf
18+
.gitignore text eol=lf
19+
gradlew text eol=lf
20+
CMakeLists.txt text eol=lf
21+
LICENSE text eol=lf
22+
23+
# Force CRLF
24+
*.bat text eol=crlf

.github/workflows/ci-build.yml

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
jobs:
17+
static-analysis:
18+
name: Static analysis
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Install
24+
run: |
25+
sudo apt update
26+
sudo apt install cppcheck
27+
28+
- name: Clone
29+
uses: actions/checkout@v3
30+
31+
- name: cppcheck
32+
run: cppcheck --std=c++17 src/
33+
34+
android:
35+
name: Android
36+
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- name: Clone
41+
uses: actions/checkout@v3
42+
43+
- name: Setup Java
44+
uses: actions/setup-java@v2
45+
with:
46+
distribution: temurin
47+
java-version: 11
48+
cache: gradle
49+
50+
- name: Cache cmake build
51+
uses: actions/cache@v3
52+
with:
53+
path: os/android/app/.cxx
54+
key: android-cmake-v1
55+
56+
- name: Setup signing config
57+
if: env.KEYSTORE_FILE_BASE64 != '' && env.KEYSTORE_PROPERTIES_FILE_BASE64 != ''
58+
run: |
59+
cd os/android
60+
echo "$KEYSTORE_FILE_BASE64" | base64 --decode > debug.keystore
61+
echo "$KEYSTORE_PROPERTIES_FILE_BASE64" | base64 --decode > debug-keystore.properties
62+
env:
63+
KEYSTORE_FILE_BASE64: ${{ secrets.ANDROID_DEBUG_KEYSTORE_FILE_BASE64 }}
64+
KEYSTORE_PROPERTIES_FILE_BASE64: ${{ secrets.ANDROID_DEBUG_KEYSTORE_PROPERTIES_FILE_BASE64 }}
65+
66+
- name: Build
67+
run: |
68+
cd os/android
69+
./gradlew assembleDebug
70+
71+
- name: Upload
72+
uses: actions/upload-artifact@v3
73+
with:
74+
name: fallout-ce-debug.apk
75+
path: os/android/app/build/outputs/apk/debug/app-debug.apk
76+
retention-days: 7
77+
78+
ios:
79+
name: iOS
80+
81+
runs-on: macos-11
82+
83+
steps:
84+
- name: Clone
85+
uses: actions/checkout@v3
86+
87+
- name: Cache cmake build
88+
uses: actions/cache@v3
89+
with:
90+
path: build
91+
key: ios-cmake-v1
92+
93+
- name: Configure
94+
run: |
95+
cmake \
96+
-B build \
97+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
98+
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \
99+
-D ENABLE_BITCODE=0 \
100+
-D PLATFORM=OS64 \
101+
# EOL
102+
103+
- name: Build
104+
run: |
105+
cmake \
106+
--build build \
107+
-j $(sysctl -n hw.physicalcpu) \
108+
--target package \
109+
# EOL
110+
111+
# TODO: Should be a part of packaging.
112+
- name: Prepare for uploading
113+
run: |
114+
cp build/fallout-ce.zip build/fallout-ce.ipa
115+
116+
- name: Upload
117+
uses: actions/upload-artifact@v3
118+
with:
119+
name: fallout-ce.ipa
120+
path: build/fallout-ce.ipa
121+
retention-days: 7
122+
123+
linux:
124+
name: Linux (${{ matrix.arch }})
125+
126+
runs-on: ubuntu-20.04
127+
128+
strategy:
129+
fail-fast: false
130+
matrix:
131+
arch:
132+
- x86
133+
- x64
134+
135+
steps:
136+
- name: Clone
137+
uses: actions/checkout@v3
138+
139+
- name: Dependencies (x86)
140+
if: matrix.arch == 'x86'
141+
run: |
142+
sudo dpkg --add-architecture i386
143+
sudo apt update
144+
sudo apt install --allow-downgrades libpcre2-8-0=10.34-7
145+
sudo apt install g++-multilib libsdl2-dev:i386 zlib1g-dev:i386
146+
147+
- name: Dependencies (x64)
148+
if: matrix.arch == 'x64'
149+
run: |
150+
sudo apt update
151+
sudo apt install libsdl2-dev zlib1g-dev
152+
153+
- name: Cache cmake build
154+
uses: actions/cache@v3
155+
with:
156+
path: build
157+
key: linux-${{ matrix.arch }}-cmake-v1
158+
159+
- name: Configure (x86)
160+
if: matrix.arch == 'x86'
161+
run: |
162+
cmake \
163+
-B build \
164+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
165+
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/Linux32.cmake \
166+
# EOL
167+
168+
- name: Configure (x64)
169+
if: matrix.arch == 'x64'
170+
run: |
171+
cmake \
172+
-B build \
173+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
174+
# EOL
175+
176+
- name: Build
177+
run: |
178+
cmake \
179+
--build build \
180+
-j $(nproc) \
181+
# EOL
182+
183+
- name: Upload
184+
uses: actions/upload-artifact@v3
185+
with:
186+
name: fallout-ce-linux-${{ matrix.arch }}
187+
path: build/fallout-ce
188+
retention-days: 7
189+
190+
macos:
191+
name: macOS
192+
193+
runs-on: macos-11
194+
195+
steps:
196+
- name: Clone
197+
uses: actions/checkout@v3
198+
199+
- name: Cache cmake build
200+
uses: actions/cache@v3
201+
with:
202+
path: build
203+
key: macos-cmake-v3
204+
205+
- name: Configure
206+
run: |
207+
cmake \
208+
-B build \
209+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
210+
# EOL
211+
212+
- name: Build
213+
run: |
214+
cmake \
215+
--build build \
216+
-j $(sysctl -n hw.physicalcpu) \
217+
--target package \
218+
# EOL
219+
220+
- name: Upload
221+
uses: actions/upload-artifact@v3
222+
with:
223+
name: fallout-ce-macos.dmg
224+
path: build/fallout-ce.dmg
225+
retention-days: 7
226+
227+
windows:
228+
name: Windows (${{ matrix.arch }})
229+
230+
runs-on: windows-2019
231+
232+
strategy:
233+
fail-fast: false
234+
matrix:
235+
include:
236+
- arch: x86
237+
generator-platform: Win32
238+
- arch: x64
239+
generator-platform: x64
240+
241+
steps:
242+
- name: Clone
243+
uses: actions/checkout@v3
244+
245+
- name: Cache cmake build
246+
uses: actions/cache@v3
247+
with:
248+
path: build
249+
key: windows-${{ matrix.arch }}-cmake-v1
250+
251+
- name: Configure
252+
run: |
253+
cmake \
254+
-B build \
255+
-G "Visual Studio 16 2019" \
256+
-A ${{ matrix.generator-platform }} \
257+
# EOL
258+
259+
- name: Build
260+
run: |
261+
cmake \
262+
--build build \
263+
--config RelWithDebInfo \
264+
# EOL
265+
266+
- name: Upload
267+
uses: actions/upload-artifact@v3
268+
with:
269+
name: fallout-ce-windows-${{ matrix.arch }}
270+
path: build/RelWithDebInfo/fallout-ce.exe
271+
retention-days: 7

0 commit comments

Comments
 (0)