Skip to content

Commit 2a073b8

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents a2064f4 + 88c0fdc commit 2a073b8

File tree

376 files changed

+6485
-657
lines changed

Some content is hidden

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

376 files changed

+6485
-657
lines changed

.github/workflows/cd.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ jobs:
7474
run: ./utils/cd_update_versions.sh
7575
shell: bash
7676
- name: Build Application
77+
run: make -e -f .winmake -j ($(Get-CIMInstance -Class 'CIM_Processor').NumberOfLogicalProcessors)
78+
- name: Package Application
7779
run: |
78-
make -e -f .winmake -j ($(Get-CIMInstance -Class 'CIM_Processor').NumberOfLogicalProcessors)
7980
COPY .\bin\pkgd\EndlessSky.exe EndlessSky.exe
8081
COPY ".\dev64\bin\*.dll" .
8182
COPY C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\lib\libgcc_s_seh-1.dll .
8283
COPY C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\lib\libstdc++-6.dll .
8384
COPY C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\lib\libwinpthread-1.dll .
84-
- name: Package Application
85-
run: 7z a ${{ env.OUTPUT }} .\sounds\ .\images\ .\data\ *.dll license.txt keys.txt icon.png EndlessSky.exe credits.txt copyright changelog
85+
7z a ${{ env.OUTPUT }} .\sounds\ .\images\ .\data\ *.dll license.txt keys.txt icon.png EndlessSky.exe credits.txt copyright changelog
8686
- name: Upload artifact
8787
uses: actions/upload-artifact@v2
8888
with:

.github/workflows/ci.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,10 @@ jobs:
124124
${{ matrix.os }}-sccache
125125
- name: Compile
126126
if: steps.cache-artifact.outputs.cache-hit != 'true'
127-
run: |
128-
make -e -f .winmake -j ($(Get-CIMInstance -Class 'CIM_Processor').NumberOfLogicalProcessors)
129-
COPY .\bin\pkgd\EndlessSky.exe EndlessSky.exe
130-
COPY ".\dev64\bin\*.dll" .
131-
COPY C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\lib\libgcc_s_seh-1.dll .
132-
COPY C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\lib\libstdc++-6.dll .
133-
COPY C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\lib\libwinpthread-1.dll .
127+
run: make -e -f .winmake -j ($(Get-CIMInstance -Class 'CIM_Processor').NumberOfLogicalProcessors)
128+
- name: Prepare artifact
129+
if: steps.cache-artifact.outputs.cache-hit != 'true'
130+
run: COPY .\bin\pkgd\EndlessSky.exe EndlessSky.exe
134131
- name: Upload artifact
135132
uses: actions/upload-artifact@v2
136133
with:
@@ -168,7 +165,31 @@ jobs:
168165
path: ${{ env.ARTIFACT }}
169166

170167

171-
test_ubuntu:
168+
# This section is for tests on ubuntu 16 (and on ubuntu 20).
169+
# The tests with Xvfb in this section work fine on ubuntu 16 and on Ubuntu 20, but they don't work on Ubuntu 18.
170+
autotest_ubuntu16:
171+
runs-on: ubuntu-16.04
172+
needs: build_ubuntu
173+
steps:
174+
- uses: actions/checkout@v2
175+
- name: Install dependencies
176+
run: |
177+
sudo rm /etc/apt/sources.list.d/* && sudo dpkg --clear-avail # Speed up installation and get rid of unwanted lists
178+
sudo apt-get update
179+
sudo apt-get install -y --no-install-recommends libsdl2-dev libpng-dev libjpeg-turbo8-dev libopenal-dev libmad0-dev libglew-dev libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev
180+
sudo apt-get install -y --no-install-recommends mesa-utils libmad0 libegl1-mesa libgles2-mesa libgl1-mesa-dri libgl1-mesa-glx libosmesa6 xvfb
181+
- name: Download artifact
182+
uses: actions/download-artifact@v1.0.0
183+
with:
184+
name: binary-ubuntu-16.04
185+
path: .
186+
- name: Execute available testcases
187+
run: |
188+
chmod +x endless-sky
189+
./tests/run_tests_headless.sh
190+
191+
192+
parsetest_ubuntu:
172193
runs-on: ${{ matrix.os }}
173194
strategy:
174195
matrix:
@@ -190,7 +211,8 @@ jobs:
190211
chmod +x endless-sky
191212
./tests/test_parse.sh ./endless-sky
192213
193-
test_windows:
214+
215+
parsetest_windows:
194216
runs-on: ${{ matrix.os }}
195217
strategy:
196218
matrix:
@@ -215,7 +237,7 @@ jobs:
215237
run: .\tests\test_parse.ps1 EndlessSky.exe
216238

217239

218-
test_macos:
240+
parsetest_macos:
219241
runs-on: ${{ matrix.os }}
220242
strategy:
221243
matrix:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ ipch/
5252
*.userosscache
5353
*.sln.docstates
5454
*.xcodeproj/**
55+
.idea/
56+
.idea_modules/
57+
CMakeLists.txt

.winmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ LD = g++.exe
6060

6161
# Compiler and linker flags
6262
include_dir = -I$(DIR_ESLIB)/include
63-
CXXFLAGS += -std=c++11 -Wall -MMD $(cxx_extra) $(include_dir)
63+
CXXFLAGS += -std=c++11 -Wall -Werror -MMD $(cxx_extra) $(include_dir)
6464
# Require the linker uses WinMainCRTStartup as the entry point.
6565
LDFLAGS += -mwindows -L$(DIR_ESLIB)/lib $(ldd_extra)
6666
# Include the Windows Multimedia API.

EndlessSky.cbp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@
5858
</Target>
5959
</Build>
6060
<Compiler>
61-
<Add option="-std=c++11" />
6261
<Add option="-Wall" />
62+
<Add option="-std=c++11" />
63+
<Add option="-Werror" />
6364
<Add directory="C:/dev64/include" />
6465
</Compiler>
6566
<Linker>
@@ -224,10 +225,10 @@
224225
<Unit filename="source/Mortgage.h" />
225226
<Unit filename="source/Music.cpp" />
226227
<Unit filename="source/Music.h" />
227-
<Unit filename="source/News.cpp" />
228-
<Unit filename="source/News.h" />
229228
<Unit filename="source/NPC.cpp" />
230229
<Unit filename="source/NPC.h" />
230+
<Unit filename="source/News.cpp" />
231+
<Unit filename="source/News.h" />
231232
<Unit filename="source/Outfit.cpp" />
232233
<Unit filename="source/Outfit.h" />
233234
<Unit filename="source/OutfitInfoDisplay.cpp" />
@@ -322,6 +323,8 @@
322323
<Unit filename="source/TradingPanel.h" />
323324
<Unit filename="source/UI.cpp" />
324325
<Unit filename="source/UI.h" />
326+
<Unit filename="source/Utf8.cpp" />
327+
<Unit filename="source/Utf8.h" />
325328
<Unit filename="source/Visual.cpp" />
326329
<Unit filename="source/Visual.h" />
327330
<Unit filename="source/Weapon.cpp" />
@@ -336,9 +339,6 @@
336339
<Unit filename="source/pi.h" />
337340
<Unit filename="source/shift.h" />
338341
<Extensions>
339-
<code_completion />
340-
<envvars />
341-
<debugger />
342342
<lib_finder disable_auto="1" />
343343
</Extensions>
344344
</Project>

EndlessSky.xcodeproj/project.pbxproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
A9C70E101C0E5B51000B3D14 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9C70E0E1C0E5B51000B3D14 /* File.cpp */; };
145145
A9CC526D1950C9F6004E4E22 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9CC526C1950C9F6004E4E22 /* Cocoa.framework */; };
146146
A9D40D1A195DFAA60086EE52 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9D40D19195DFAA60086EE52 /* OpenGL.framework */; };
147+
B590161321ED4A0F00799178 /* Utf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B590161121ED4A0E00799178 /* Utf8.cpp */; };
147148
B55C239D2303CE8B005C1A14 /* GameWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55C239B2303CE8A005C1A14 /* GameWindow.cpp */; };
148149
B5DDA6942001B7F600DBA76A /* News.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5DDA6922001B7F600DBA76A /* News.cpp */; };
149150
DF8D57E11FC25842001525DA /* Dictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF8D57DF1FC25842001525DA /* Dictionary.cpp */; };
@@ -431,6 +432,8 @@
431432
A9CC52701950C9F6004E4E22 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
432433
A9CC52711950C9F6004E4E22 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
433434
A9D40D19195DFAA60086EE52 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
435+
B590161121ED4A0E00799178 /* Utf8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Utf8.cpp; path = source/Utf8.cpp; sourceTree = "<group>"; };
436+
B590161221ED4A0F00799178 /* Utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utf8.h; path = source/Utf8.h; sourceTree = "<group>"; };
434437
B55C239B2303CE8A005C1A14 /* GameWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameWindow.cpp; path = source/GameWindow.cpp; sourceTree = "<group>"; };
435438
B55C239C2303CE8A005C1A14 /* GameWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameWindow.h; path = source/GameWindow.h; sourceTree = "<group>"; };
436439
B5DDA6922001B7F600DBA76A /* News.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = News.cpp; path = source/News.cpp; sourceTree = "<group>"; };
@@ -717,6 +720,8 @@
717720
A96863991AE6FD0D004FE1FE /* TradingPanel.h */,
718721
A968639A1AE6FD0D004FE1FE /* UI.cpp */,
719722
A968639B1AE6FD0D004FE1FE /* UI.h */,
723+
B590161121ED4A0E00799178 /* Utf8.cpp */,
724+
B590161221ED4A0F00799178 /* Utf8.h */,
720725
DF8D57E21FC25889001525DA /* Visual.cpp */,
721726
DF8D57E31FC25889001525DA /* Visual.h */,
722727
A968639C1AE6FD0D004FE1FE /* Weapon.cpp */,
@@ -881,6 +886,7 @@
881886
A96863E01AE6FD0E004FE1FE /* Panel.cpp in Sources */,
882887
A96863D21AE6FD0E004FE1FE /* MapDetailPanel.cpp in Sources */,
883888
DFAAE2AA1FD4A27B0072C0A8 /* ImageSet.cpp in Sources */,
889+
B590161321ED4A0F00799178 /* Utf8.cpp in Sources */,
884890
A96863D41AE6FD0E004FE1FE /* Mask.cpp in Sources */,
885891
A96863E61AE6FD0E004FE1FE /* Point.cpp in Sources */,
886892
A96863DE1AE6FD0E004FE1FE /* OutfitterPanel.cpp in Sources */,
@@ -998,7 +1004,7 @@
9981004
isa = XCBuildConfiguration;
9991005
buildSettings = {
10001006
ALWAYS_SEARCH_USER_PATHS = NO;
1001-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1007+
CLANG_CXX_LANGUAGE_STANDARD = "c++11";
10021008
CLANG_CXX_LIBRARY = "libc++";
10031009
CLANG_ENABLE_MODULES = YES;
10041010
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1040,6 +1046,7 @@
10401046
GCC_WARN_UNUSED_VARIABLE = YES;
10411047
MACOSX_DEPLOYMENT_TARGET = 10.9;
10421048
ONLY_ACTIVE_ARCH = YES;
1049+
OTHER_CFLAGS = "-Werror";
10431050
SDKROOT = macosx;
10441051
};
10451052
name = Debug;
@@ -1048,7 +1055,7 @@
10481055
isa = XCBuildConfiguration;
10491056
buildSettings = {
10501057
ALWAYS_SEARCH_USER_PATHS = NO;
1051-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1058+
CLANG_CXX_LANGUAGE_STANDARD = "c++11";
10521059
CLANG_CXX_LIBRARY = "libc++";
10531060
CLANG_ENABLE_MODULES = YES;
10541061
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1083,6 +1090,7 @@
10831090
GCC_WARN_UNUSED_FUNCTION = YES;
10841091
GCC_WARN_UNUSED_VARIABLE = YES;
10851092
MACOSX_DEPLOYMENT_TARGET = 10.9;
1093+
OTHER_CFLAGS = "-Werror";
10861094
SDKROOT = macosx;
10871095
};
10881096
name = Release;

SConstruct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ opts.Update(env)
2323

2424
Help(opts.GenerateHelpText(env))
2525

26-
flags = ["-std=c++11", "-Wall"]
26+
flags = ["-std=c++11", "-Wall", "-Werror"]
2727
if env["mode"] != "debug":
2828
flags += ["-O3"]
2929
if env["mode"] == "debug":

0 commit comments

Comments
 (0)