Skip to content

Commit 654d772

Browse files
authored
Merge branch 'master' into setTileIDInMapNode
2 parents 11a3c1d + 5b7a1ed commit 654d772

24 files changed

+850
-565
lines changed

.github/workflows/build-game.yml

Lines changed: 7 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
name: Build game
1+
name: Build
22

33
on: [ push, pull_request ]
44

55
jobs:
66
build-msvc:
7-
name: Build Windows
7+
name: Windows
88
env:
9-
SCCACHE_DIR: C:\sccache
10-
SCCACHE_CACHE_SIZE: 500M
119
BUILD_TOOLS_PATH: C:\Program Files\Conan\conan
1210
runs-on: windows-latest
1311
steps:
@@ -17,29 +15,14 @@ jobs:
1715
with:
1816
submodules: true
1917

20-
- name: Prepare sccache timestamp
21-
id: sccache_cache_timestamp
22-
shell: cmake -P {0}
23-
run: |
24-
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
25-
message("::set-output name=timestamp::${current_date}")
26-
27-
- name: sccache cache files
28-
uses: actions/cache@v2.1.7
29-
with:
30-
path: C:\sccache
31-
key: windows-sccache-${{ steps.sccache_cache_timestamp.outputs.timestamp }}
32-
restore-keys: |
33-
windows-sccache-
34-
3518
- name: Cache conan
3619
uses: actions/cache@v2.1.7
3720
with:
3821
key: conan-win-${{ hashFiles('cmake/DependenciesConfig.cmake') }}
3922
path: ~/.conan/
4023

4124
- name: Install dependencies
42-
run: choco install conan ninja sccache -y
25+
run: choco install conan ninja -y
4326

4427
- name: Enable Developer Command Prompt
4528
uses: ilammy/msvc-dev-cmd@v1.10.0
@@ -48,7 +31,6 @@ jobs:
4831
run: |
4932
cmake -GNinja -DCMAKE_BUILD_TYPE=Release .
5033
ninja
51-
sccache --show-stats
5234
5335
- name: Test
5436
run: ctest -j2 --output-on-failure
@@ -67,31 +49,15 @@ jobs:
6749
run: conan remove "*" -fsb
6850

6951
build-gcc:
70-
name: Build Linux
52+
name: Linux
7153
env:
72-
sccache_CACHE_SIZE: 500M
7354
CONAN_SYSREQUIRES_MODE: "enabled"
7455
runs-on: ubuntu-latest
7556
steps:
7657
- uses: actions/checkout@v3
7758
with:
7859
submodules: true
7960

80-
- name: Prepare sccache timestamp
81-
id: sccache_cache_timestamp
82-
shell: cmake -P {0}
83-
run: |
84-
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
85-
message("::set-output name=timestamp::${current_date}")
86-
87-
- name: sccache cache files
88-
uses: actions/cache@v2.1.7
89-
with:
90-
path: ~/.cache/sccache
91-
key: ubuntu-sccache-${{ steps.sccache_cache_timestamp.outputs.timestamp }}
92-
restore-keys: |
93-
ubuntu-sccache-
94-
9561
- name: Cache conan
9662
uses: actions/cache@v2.1.7
9763
with:
@@ -105,7 +71,6 @@ jobs:
10571
echo -e 'pcm.!default {\n type plug\n slave.pcm "null"\n}' > ~/.asoundrc
10672
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-cmake.sh" | sudo bash
10773
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash
108-
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-sccache.sh" | sudo bash
10974
conan install "xorg/system@"
11075
sudo apt-get -y install ninja-build libgl-dev libegl-dev
11176
@@ -116,7 +81,6 @@ jobs:
11681
- name: Build
11782
run: |
11883
ninja
119-
sccache --show-stats
12084
12185
- name: Test
12286
env:
@@ -137,38 +101,21 @@ jobs:
137101
run: conan remove "*" -fsb
138102

139103
build-appleclang:
140-
name: Build Mac
141-
env:
142-
SCCACHE_CACHE_SIZE: 500M
104+
name: MacOS
143105
runs-on: macos-latest
144106
steps:
145107
- uses: actions/checkout@v3
146108
with:
147109
submodules: true
148110

149-
- name: Prepare sccache timestamp
150-
id: sccache_cache_timestamp
151-
shell: cmake -P {0}
152-
run: |
153-
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
154-
message("::set-output name=timestamp::${current_date}")
155-
156-
- name: sccache cache files
157-
uses: actions/cache@v2.1.7
158-
with:
159-
path: ~/Library/Caches/Mozilla.sccache
160-
key: macos-sccache-${{ steps.sccache_cache_timestamp.outputs.timestamp }}
161-
restore-keys: |
162-
macos-sccache-
163-
164111
- name: Cache conan
165112
uses: actions/cache@v2.1.7
166113
with:
167114
key: conan-mac-${{ hashFiles('cmake/DependenciesConfig.cmake') }}
168115
path: ~/.conan/
169116

170117
- name: Install dependencies
171-
run: brew install conan sccache ninja
118+
run: brew install conan ninja
172119

173120
- name: Build
174121
run: |
@@ -180,7 +127,6 @@ jobs:
180127
ninja package
181128
rm -rf bin/Cytopia.App/Contents/MacOS/resources
182129
rm -rf bin/Cytopia.App/Resources
183-
sccache --show-stats
184130
shell: bash
185131

186132
- name: Test
@@ -200,4 +146,4 @@ jobs:
200146
shell: bash
201147

202148
- name: Clean Conan pkgs
203-
run: conan remove "*" -fsb
149+
run: conan remove "*" -fsb

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ src/Makefile
5252
tools/l10n/TMP.pot
5353

5454
_build/
55+
/build*/

CMakeLists.txt

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ include(SourceFileUtils)
77
include(CMakeCM)
88
set(_PREFIX "CYTOPIA_")
99

10+
set(CMAKE_CONFIGURATION_TYPES "Debug" "Release" CACHE STRING "Configuration types")
11+
1012
# Test if conan is installed
1113
find_program(CONAN_CMD_TEST conan NO_CACHE)
1214
cmake_dependent_option(USE_PACKAGE_MANAGER "Use conan" ON "NOT CONAN_CMD_TEST STREQUAL CONAN_CMD_TEST-NOTFOUND" OFF)
@@ -27,17 +29,6 @@ project(
2729

2830
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
2931

30-
find_program(SCCACHE_PROGRAM sccache)
31-
find_program(CCACHE_PROGRAM ccache)
32-
if (SCCACHE_PROGRAM)
33-
set(CMAKE_CXX_COMPILER_LAUNCHER "${SCCACHE_PROGRAM}")
34-
message("Using ${SCCACHE_PROGRAM} for speeding up build")
35-
elseif (CCACHE_PROGRAM)
36-
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
37-
message("Using ${CCACHE_PROGRAM} for speeding up build")
38-
endif ()
39-
40-
4132
# Allow user to globally set the library preference for external libraries
4233
cmd_option(
4334
${_PREFIX}LIB_PREFERENCE
@@ -50,6 +41,7 @@ cmd_option(
5041
option(${_PREFIX}FORCE_SYSTEM_DEPENDENCIES "Force the use of system packages")
5142

5243
option(BUILD_TEST "Build Cytopia Tests" ON)
44+
option(ENABLE_PHC "Use a Precompiled header for speeding up the build" ON)
5345
option(ENABLE_DEBUG "Enable Debug (asserts and logs)" OFF)
5446
option(ENABLE_ASAN "Enable Address Sanitizer" OFF)
5547
option(ENABLE_UBSAN "Enable Undefined Behaviour Sanitizer" OFF)
@@ -63,7 +55,6 @@ set(EXECUTABLE_OUTPUT_PATH ${RUNTIME_OUTPUT_DIRECTORY})
6355
set(LIBRARY_OUTPUT_PATH ${RUNTIME_OUTPUT_DIRECTORY})
6456

6557
if (WIN32)
66-
set(CMAKE_CONFIGURATION_TYPES "Debug" "Release" CACHE STRING "Configuration types")
6758
# fix executable paths for windows
6859
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${RUNTIME_OUTPUT_DIRECTORY})
6960
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${RUNTIME_OUTPUT_DIRECTORY})

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Mac
6767
- [libogg](https://www.xiph.org/ogg/)
6868
- [libvorbis](https://www.xiph.org/vorbis/)
6969
- [libpng](http://www.libpng.org/pub/png/libpng.html)
70+
- [imgui](https://github.com/ocornut/imgui)
7071

7172
#### Build instructions
7273

0 commit comments

Comments
 (0)