Skip to content

Commit

Permalink
[.travis.yml] Added.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jan 20, 2019
1 parent 8124cab commit 29c5186
Show file tree
Hide file tree
Showing 20 changed files with 89 additions and 13 deletions.
59 changes: 59 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
os: linux
dist: trusty
language: cpp

compiler:
- clang

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libopenal-dev
- libjpeg-dev
- libudev-dev
- libxrandr-dev
- libfreetype6-dev
- libvorbis-dev
- libflac-dev
- libegl1-mesa-dev
- libgles2-mesa-dev
- libtinyxml2-dev
- libsdl2-dev
- libsdl2-image-dev
- libsdl2-mixer-dev
- libsdl2-ttf-dev
- g++-8
- libglm-dev
- cmake
- cxxtest
- liblua5.2-dev

before_install:
- sudo cp /usr/include/lua5.2/* /usr/include/
- git clone git://github.com/SFML/SFML.git
- cd SFML
- cmake .
- make -j8
- sudo make install
- cd ..
- git clone git://github.com/Quent42340/GameKit.git
- cd GameKit
- cmake .
- make -j8
- sudo make install
- cd ..

script:
- cmake .
- make -j8

notifications:
email: false
# irc:
# channels:
# - "irc.freenode.net#openminer"
# template:
# - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# OpenMiner

[![Build Status](https://travis-ci.com/Quent42340/OpenMiner.svg?branch=network)](https://travis-ci.com/Quent42340/OpenMiner)
[![Documentation](https://codedocs.xyz/Quent42340/OpenMiner.svg)](https://codedocs.xyz/Quent42340/OpenMiner/)
[![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
[![Discord](https://img.shields.io/discord/527527086756200458.svg?style=popout)](https://discord.gg/eN8k8wt)
Expand Down
6 changes: 4 additions & 2 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ add_dependencies(${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_NAME}_common)
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -O3 -ffast-math)
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -g -Wall -Wextra -Wfatal-errors -Wno-variadic-macros)
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -DDEBUG_ENABLED)
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -DGLM_FORCE_RADIANS)
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -DSOL_CHECK_ARGUMENTS
# -DSOL_SAFE_USERTYPE=1
# -DSOL_SAFE_REFERENCES=1
Expand All @@ -31,7 +32,8 @@ target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -DSOL_CHECK_ARGUMENTS
-DSOL_PRINT_ERRORS=1
)

target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -std=c++17)
# target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_17)

# target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -pg)
# target_link_options(${CMAKE_PROJECT_NAME} PRIVATE -pg)
Expand All @@ -48,6 +50,6 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
${TINYXML2_LIBRARIES}
${GAMEKIT_LIBRARIES}
${LUA_LIBRARIES}
sfml-network
sfml-network -ldl
${CMAKE_PROJECT_NAME}_common)

1 change: 0 additions & 1 deletion client/source/graphics/Skybox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
#include <cstring>

#define GLM_FORCE_RADIANS
#include <glm/gtc/matrix_transform.hpp>

#include <gk/gl/Vertex.hpp>
Expand Down
1 change: 0 additions & 1 deletion client/source/hud/BlockCursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*
* =====================================================================================
*/
#define GLM_FORCE_RADIANS
#include <glm/gtc/matrix_transform.hpp>

#include <gk/gl/Vertex.hpp>
Expand Down
2 changes: 2 additions & 0 deletions client/source/hud/HUD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* =====================================================================================
*/
#include <glm/gtc/matrix_transform.hpp>

#include "Config.hpp"
#include "HUD.hpp"

Expand Down
1 change: 0 additions & 1 deletion client/source/states/GameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
#include <iostream>

#define GLM_FORCE_RADIANS
#include <glm/gtc/matrix_transform.hpp>

#include <gk/core/input/GamePad.hpp>
Expand Down
2 changes: 2 additions & 0 deletions client/source/states/InventoryState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* =====================================================================================
*/
#include <glm/gtc/matrix_transform.hpp>

#include <gk/core/ApplicationStateStack.hpp>
#include <gk/core/Mouse.hpp>

Expand Down
2 changes: 2 additions & 0 deletions client/source/states/LuaGUIState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* =====================================================================================
*/
#include <glm/gtc/matrix_transform.hpp>

#include <gk/core/ApplicationStateStack.hpp>
#include <gk/core/Debug.hpp>
#include <gk/core/Mouse.hpp>
Expand Down
2 changes: 2 additions & 0 deletions client/source/states/PauseMenuState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* =====================================================================================
*/
#include <glm/gtc/matrix_transform.hpp>

#include <gk/core/ApplicationStateStack.hpp>
#include <gk/core/Mouse.hpp>

Expand Down
2 changes: 2 additions & 0 deletions client/source/states/SettingsMenuState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* =====================================================================================
*/
#include <glm/gtc/matrix_transform.hpp>

#include <algorithm>

#include <gk/core/ApplicationStateStack.hpp>
Expand Down
2 changes: 2 additions & 0 deletions client/source/world/ClientWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* =====================================================================================
*/
#include <glm/gtc/matrix_transform.hpp>

#include <gk/gl/Shader.hpp>
#include <gk/resource/ResourceHandler.hpp>

Expand Down
8 changes: 5 additions & 3 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ add_library(${CMAKE_PROJECT_NAME}_common STATIC ${SOURCE_FILES})
#------------------------------------------------------------------------------
# Compiler flags
#------------------------------------------------------------------------------
# target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -O3 -ffast-math)
target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -O3 -ffast-math)
target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -g -Wall -Wextra -Wfatal-errors -Wno-variadic-macros)
target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -DDEBUG_ENABLED)
target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -DGLM_FORCE_RADIANS)
target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -DSOL_CHECK_ARGUMENTS
# -DSOL_SAFE_USERTYPE=1
# -DSOL_SAFE_REFERENCES=1
# -DSOL_SAFE_FUNCTION_CALLS=1
# -DSOL_SAFE_FUNCTION=1
# -DSOL_SAFE_NUMERICS=1
# -DSOL_SAFE_GETTER=1
# -DSOL_PRINT_ERRORS=1
-DSOL_PRINT_ERRORS=1
)

target_compile_features(${CMAKE_PROJECT_NAME}_common PRIVATE cxx_std_17)
target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -std=c++17)
# target_compile_features(${CMAKE_PROJECT_NAME}_common PRIVATE cxx_std_17)

# target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -pg)

1 change: 1 addition & 0 deletions common/include/inventory/Recipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
class Recipe {
public:
Recipe(const std::string &type, const ItemStack &result) : m_type(type), m_result(result) {}
virtual ~Recipe() = default;

virtual bool isMatching(const Inventory &inventory) const = 0;

Expand Down
1 change: 1 addition & 0 deletions common/include/world/Chunk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Chunk : public gk::NonCopyable {

public:
Chunk(s32 x, s32 y, s32 z);
virtual ~Chunk() = default;

virtual void update() = 0;

Expand Down
1 change: 0 additions & 1 deletion common/source/gui/Cube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*
* =====================================================================================
*/
#define GLM_FORCE_RADIANS
#include <glm/gtc/matrix_transform.hpp>

#include <gk/graphics/Color.hpp>
Expand Down
1 change: 0 additions & 1 deletion common/source/world/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*
* =====================================================================================
*/
#define GLM_FORCE_RADIANS
#include <glm/gtc/matrix_transform.hpp>

#include <gk/resource/ResourceHandler.hpp>
Expand Down
6 changes: 4 additions & 2 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ add_dependencies(${CMAKE_PROJECT_NAME}_server ${CMAKE_PROJECT_NAME}_common)
target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -O3 -ffast-math)
target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -g -Wall -Wextra -Wfatal-errors -Wno-variadic-macros)
target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -DDEBUG_ENABLED)
target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -DGLM_FORCE_RADIANS)
target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -DSOL_CHECK_ARGUMENTS
# -DSOL_SAFE_USERTYPE=1
# -DSOL_SAFE_REFERENCES=1
Expand All @@ -31,7 +32,8 @@ target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -DSOL_CHECK_ARGUMENT
-DSOL_PRINT_ERRORS=1
)

target_compile_features(${CMAKE_PROJECT_NAME}_server PRIVATE cxx_std_17)
target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -std=c++17)
# target_compile_features(${CMAKE_PROJECT_NAME}_server PRIVATE cxx_std_17)

# target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -pg)
# target_link_options(${CMAKE_PROJECT_NAME}_server PRIVATE -pg)
Expand All @@ -48,6 +50,6 @@ target_link_libraries(${CMAKE_PROJECT_NAME}_server
${TINYXML2_LIBRARIES}
${GAMEKIT_LIBRARIES}
${LUA_LIBRARIES}
sfml-network
sfml-network -ldl
${CMAKE_PROJECT_NAME}_common)

1 change: 1 addition & 0 deletions server/include/network/Server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define SERVER_HPP_

#include <functional>
#include <unordered_map>

#include <SFML/Network/SocketSelector.hpp>
#include <SFML/Network/TcpListener.hpp>
Expand Down
2 changes: 1 addition & 1 deletion server/include/world/ServerWorld.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "ServerChunk.hpp"

class Client;
struct Client;

class ServerWorld {
public:
Expand Down

0 comments on commit 29c5186

Please sign in to comment.