Skip to content

Commit

Permalink
Implemented Travis-CI Builds and Fixed x64 Linux builds (#56)
Browse files Browse the repository at this point in the history
* Adds Travis-CI
* Fixes Linux libdisasm trying to use REG_EIP and sizeof(void*) == 4 in x64 mode
* Also disables a warning narrowing conversions which is an error from g++5 onwards
  • Loading branch information
sbx320 committed Aug 1, 2016
1 parent 34e6297 commit f76c22e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 9 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: cpp
compiler:
- gcc

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
env: COMPILER=g++-5

before_script:
- wget https://github.com/sbx320/premake5-travis/blob/master/premake5?raw=true -O ./premake5
- chmod +x ./premake5
- ./premake5 gmake
- cd Build

script: make -j 3 CXX=g++-5 CC=gcc-5 config=release_x64

notifications:
irc:
channels:
- "irc.gtanet.com#mta.dev"
on_success: change
on_failure: always
3 changes: 3 additions & 0 deletions Server/mods/deathmatch/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ project "Deathmatch"
includedirs { "../../../vendor/pthreads/include" }
buildoptions { "-Zm130" }
links { "ws2_32" }

filter "system:not windows"
buildoptions { "-Wno-narrowing" } -- We should fix the warnings at some point

9 changes: 6 additions & 3 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ workspace "MTASA"
filter "configurations:Debug"
defines { "MTA_DEBUG" }
targetsuffix "_d"


-- Skip Optimization in CI Builds for build speed
if os.getenv("CONTINUOUS_INTEGRATION") ~= "true" then
filter "configurations:Release or configurations:Nightly"
flags { "Optimize" }

end

filter {"system:windows", "configurations:Nightly", "kind:not StaticLib"}
os.mkdir("Build/Symbols")
linkoptions "/PDB:\"Symbols\\$(ProjectName).pdb\""
Expand Down Expand Up @@ -106,4 +109,4 @@ workspace "MTASA"
include "vendor/unrar"
include "vendor/zip"
include "vendor/zlib"


1 change: 0 additions & 1 deletion vendor/google-breakpad/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ project "breakpad"
targetname "breakpad"

includedirs { "src", "src/third_party/glog/src" }

vpaths {
["Headers/*"] = "src/**.h",
["Sources/*"] = {"src/**.cc", "src/**.c"},
Expand Down
10 changes: 5 additions & 5 deletions vendor/google-breakpad/src/third_party/glog/src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@
#define PACKAGE_VERSION "0.3.1"

/* How to access the PC from a struct ucontext */
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP]
#else
#define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_EIP]

/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
#endif

/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 4
#define SIZEOF_VOID_P (sizeof(void*)

/* Define to 1 if you have the ANSI C header files. */
/* #undef STDC_HEADERS */
Expand Down

1 comment on commit f76c22e

@qaisjp
Copy link
Contributor

@qaisjp qaisjp commented on f76c22e Aug 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Please sign in to comment.