From 3212ee0b0fc1fd7734be56a9ccdc2b84ddb6f01d Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 30 Jan 2017 21:08:13 +0000 Subject: [PATCH 01/26] Fix endless loop of R_DrawRepeatMaskedColumn if both sprtopscreen and sprbotscreen are CLAMPMAX (INT32_MAX) This fixes the grid floors in TD's Lava Mountain freezing the game if they go off the bottom of the screen far enough (they have ACWRFL1A as the wall texture, which is a single patch texture with holes) --- src/r_segs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_segs.c b/src/r_segs.c index 8f271bfe3..3059860cf 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -706,10 +706,10 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) // Loop through R_DrawMaskedColumn calls static void R_DrawRepeatMaskedColumn(column_t *col) { - do { + while (sprtopscreen < sprbotscreen) { R_DrawMaskedColumn(col); sprtopscreen += dc_texheight*spryscale; - } while (sprtopscreen < sprbotscreen); + } } // From 72bd3e28ed2471daad12125b014d90d2bb300a86 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 31 Jan 2017 22:10:31 +0000 Subject: [PATCH 02/26] Fix sprtopscreen from getting integer overflows once and for all in R_DrawRepeatMaskedColumn Fixes TD's terminal from freezing the game this time, oh boy --- src/r_segs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/r_segs.c b/src/r_segs.c index 3059860cf..502ff3304 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -708,7 +708,10 @@ static void R_DrawRepeatMaskedColumn(column_t *col) { while (sprtopscreen < sprbotscreen) { R_DrawMaskedColumn(col); - sprtopscreen += dc_texheight*spryscale; + if ((INT64)sprtopscreen + dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow + sprtopscreen = INT32_MAX; + else + sprtopscreen += dc_texheight*spryscale; } } From dc249c6cd51fe8186f88588533b1e51bdd56d3ca Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 4 Feb 2017 23:26:37 +0000 Subject: [PATCH 03/26] D_ModifierKeyResponder now checks for ev_console as a "key down" event console window uses ev_keyup too so don't worry about turning off --- src/d_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_main.c b/src/d_main.c index 2caf50087..4080087c1 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -187,7 +187,7 @@ UINT8 altdown = 0; // 0x1 left, 0x2 right // static inline void D_ModifierKeyResponder(event_t *ev) { - if (ev->type == ev_keydown) switch (ev->data1) + if (ev->type == ev_keydown || ev->type == ev_console) switch (ev->data1) { case KEY_LSHIFT: shiftdown |= 0x1; return; case KEY_RSHIFT: shiftdown |= 0x2; return; From f9b41898a9730f755ce29edf5843d4366a11b0f4 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 5 Feb 2017 22:04:29 +0000 Subject: [PATCH 04/26] Don't allow skipping stats in record attack/nights attack --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index 84db90132..7499fe7a0 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2888,7 +2888,7 @@ static void G_DoCompleted(void) if (nextmap < NUMMAPS && !mapheaderinfo[nextmap]) P_AllocMapHeader(nextmap); - if (skipstats) + if (skipstats && !modeattacking) // Don't skip stats if we're in record attack G_AfterIntermission(); else { From b0f4bbb44b0020810c88ec2130f47097662bf406 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 2 Mar 2017 19:37:21 +0000 Subject: [PATCH 05/26] Played TD's Stormy Streets enough to know precipitation sprites didn't get an overflow test of their own (various large invisible blocks used in the level cause rain to make splashes high above the main level, high enough to make ghostly rain splash sprite artifacts appear sometimes in nearby areas) --- src/r_things.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/r_things.c b/src/r_things.c index 927217c5c..331febabd 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -891,12 +891,18 @@ static void R_DrawPrecipitationVisSprite(vissprite_t *vis) #endif fixed_t frac; patch_t *patch; + INT64 overflow_test; //Fab : R_InitSprites now sets a wad lump number patch = W_CacheLumpNum(vis->patch, PU_CACHE); if (!patch) return; + // Check for overflow + overflow_test = (INT64)centeryfrac - (((INT64)vis->texturemid*vis->scale)>>FRACBITS); + if (overflow_test < 0) overflow_test = -overflow_test; + if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) return; // fixed point mult would overflow + if (vis->transmap) { colfunc = fuzzcolfunc; From 2823c7bffbbe4f17b5a291a41c285b2b756a46e8 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 17:23:56 -0400 Subject: [PATCH 06/26] build: fixup warnings from GCC 6.2.1 --- src/d_net.c | 2 ++ src/hardware/r_opengl/r_opengl.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/d_net.c b/src/d_net.c index fae1ea311..7f16c302d 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -991,12 +991,14 @@ void Command_Droprate(void) packetdroprate = droprate; } +#ifndef NONET static boolean ShouldDropPacket(void) { return (packetdropquantity[netbuffer->packettype]) || (packetdroprate != 0 && rand() < (RAND_MAX * (packetdroprate / 100.f))) || packetdroprate == 100; } #endif +#endif // // HSendPacket diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 54dd94854..3a0bf7054 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -1836,7 +1836,7 @@ EXPORT void HWRAPI(SetSpecialState) (hwdspecialstate_t IdState, INT32 Value) } } -static inline void DrawMD2Ex(INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 duration, UINT32 tics, md2_frame_t *nextframe, FTransform *pos, float scale, UINT8 flipped, UINT8 *color) +static void DrawMD2Ex(INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 duration, UINT32 tics, md2_frame_t *nextframe, FTransform *pos, float scale, UINT8 flipped, UINT8 *color) { INT32 val, count, pindex; GLfloat s, t; From b22417bcfab06739a4ed692cecc29652905baffe Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 17:26:37 -0400 Subject: [PATCH 07/26] appveyor: buildbot now using GCC 6.3, not 5.3 --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 25b95d292..b0544a90b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,7 +47,7 @@ before_build: - upx -V - ccache -V - ccache -s -- set SRB2_MFLAGS=-C src MINGW=1 WARNINGMODE=1 GCC53=1 CCACHE=1 +- set SRB2_MFLAGS=-C src MINGW=1 WARNINGMODE=1 GCC63=1 CCACHE=1 build_script: - cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 clean From e0b2a4a7791c846ec13927f0f680e36ebe058d21 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 17:45:18 -0400 Subject: [PATCH 08/26] build: add suport for GCC 6.3 --- src/Makefile.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 72404becc..d5cb112b8 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -7,6 +7,23 @@ # and other things # + +ifdef GCC63 +GCC62=1 +endif + +ifdef GCC62 +GCC61=1 +endif + +ifdef GCC61 +GCC54=1 +endif + +ifdef GCC54 +GCC53=1 +ENDIF + ifdef GCC53 GCC52=1 endif @@ -176,6 +193,9 @@ endif ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif +ifdef GCC62 + WFALGS+=-Wno-tautological-compare +endif WFLAGS+=$(OLDWFLAGS) From b01d5da60ffb20ee1efe4d82262129fd66707be4 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 20:23:30 -0400 Subject: [PATCH 09/26] build: fixup GCC54 endif --- src/Makefile.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index d5cb112b8..781076aa2 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -22,7 +22,7 @@ endif ifdef GCC54 GCC53=1 -ENDIF +endif ifdef GCC53 GCC52=1 From 42ecca817d40f49404359ae402b359b42e98e1a9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 20:43:35 -0400 Subject: [PATCH 10/26] build: disable tautological-compare and logical-op --- src/Makefile.cfg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 781076aa2..a891a7551 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -193,8 +193,11 @@ endif ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif -ifdef GCC62 - WFALGS+=-Wno-tautological-compare +ifdef GCC54 + WFALGS+=-Wno-error=logical-op +endif +ifdef GCC61 + WFALGS+=-Wno-error=tautological-compare endif WFLAGS+=$(OLDWFLAGS) From 81fe46213d1b77cc296265a969f74cb26f5d9998 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 20:51:45 -0400 Subject: [PATCH 11/26] build: do not overwrite the -Wno-error switchs --- src/Makefile.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index a891a7551..60d96575a 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -187,6 +187,7 @@ endif ifdef ERRORMODE WFLAGS+=-Werror endif +WFLAGS+=$(OLDWFLAGS) ifdef GCC43 #WFLAGS+=-Wno-error=clobbered endif @@ -199,7 +200,6 @@ endif ifdef GCC61 WFALGS+=-Wno-error=tautological-compare endif -WFLAGS+=$(OLDWFLAGS) #indicate platform and what interface use with From 6bb7a636dc808bc4ca086ff448e7ef4ead510610 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 21:02:05 -0400 Subject: [PATCH 12/26] appveyor: output commands passed to GCCwq --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index b0544a90b..269b7698d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,7 +51,7 @@ before_build: build_script: - cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 clean -- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k +- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k ECHO=1 after_build: - ccache -s From 9cac1e9e6226a26510b5b20c64f5bd353890fdac Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 21:09:06 -0400 Subject: [PATCH 13/26] build: fixup WFALGS/WFLAGS mistake --- src/Makefile.cfg | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 60d96575a..e232c4a1b 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -181,13 +181,17 @@ ifdef GCC45 WFLAGS+=-Wunsuffixed-float-constants endif endif + ifdef NOLDWARNING LDFLAGS+=-Wl,--as-needed endif + ifdef ERRORMODE WFLAGS+=-Werror endif + WFLAGS+=$(OLDWFLAGS) + ifdef GCC43 #WFLAGS+=-Wno-error=clobbered endif @@ -195,10 +199,10 @@ ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif ifdef GCC54 - WFALGS+=-Wno-error=logical-op + WFLAGS+=-Wno-error=logical-op endif ifdef GCC61 - WFALGS+=-Wno-error=tautological-compare + WFLAGS+=-Wno-error=tautological-compare endif From 4e8972cd24c291f22d5932415bcafe0d991294af Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 21:16:37 -0400 Subject: [PATCH 14/26] build: no warning or error about logical-ip or tautological-compare --- src/Makefile.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index e232c4a1b..80d018c4b 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -199,10 +199,10 @@ ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif ifdef GCC54 - WFLAGS+=-Wno-error=logical-op + WFLAGS+=-Wno-logical-op -Wno-error=logical-op endif ifdef GCC61 - WFLAGS+=-Wno-error=tautological-compare + WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare endif From 538eac7a471c61e13ffcbae81183de8e32c1d322 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 21:17:07 -0400 Subject: [PATCH 15/26] appveyor: disable command output --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 269b7698d..b0544a90b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,7 +51,7 @@ before_build: build_script: - cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 clean -- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k ECHO=1 +- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k after_build: - ccache -s From b29193aa98eaa2fe9abc8192162e731a0cac28e5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 23 Mar 2017 21:24:31 -0400 Subject: [PATCH 16/26] CircleCI: first try --- .circleci/config.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..8b954bc70 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,53 @@ +version: 2 +jobs: + build: + working_directory: /root/SRB2 + docker: + - image: debian:jessie + environment: + CC: ccache gcc -m32 + PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig + LIBGME_CFLAGS: -I/usr/include/ + LIBGME_LDFLAGS: -lgme + CCACHE_COMPRESS: true + steps: + - run: + name: Add i386 arch + command: dpkg --add-architecture i386 + #- restore_cache: + # keys: + # - v1-SRB2-APT + - run: + name: Update APT listing + command: apt-get -qq update + - run: + name: Install SDK + command: apt-get -qq -y install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib ca-certificates + #- save_cache: + # key: v1-SRB2-APT + # paths: + # - /var/cache/apt/ + - checkout + #- restore_cache: + # keys: + # - v1-SRB2-{{ .Branch }} + - run: + name: Setup cache + command: mkdir -p /root/srb2_cache + #- run: + # name: Download SRB2 Resources + # command: wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2115-assets-2.7z -O /root/srb2_cache/SRB2-v2115-assets-2.7z + - run: + name: Compile + command: make -C src LINUX=1 GCC49=1 WARNINGMODE=1 -k + - store_artifacts: + path: /root/SRB2/bin/Linux/Release/ + destination: bin + #- save_cache: + # key: v1-SRB2-{{ .Branch }} + # paths: + # - /root/.ccache + # - /root/srb2_cache + + + From 59d91e0793f61b7dbb93a4cb17db89a1b5892999 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 23 Mar 2017 23:13:31 -0400 Subject: [PATCH 17/26] build: r_bsp.c:213:23: warning: inlining failed in call to 'R_DoorClosed': call is unlikely and code size would grow [-Winline] --- src/r_bsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_bsp.c b/src/r_bsp.c index 2562cff66..44cb991a7 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -210,7 +210,7 @@ void R_PortalClearClipSegs(INT32 start, INT32 end) // // It assumes that Doom has already ruled out a door being closed because // of front-back closure (e.g. front floor is taller than back ceiling). -static inline INT32 R_DoorClosed(void) +static INT32 R_DoorClosed(void) { return From c5d15ad5978ae3c99880789d92f4e1a06ac8f1f6 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 23 Mar 2017 23:15:01 -0400 Subject: [PATCH 18/26] CircleCI: force -Wno-unsuffixed-float-constants --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b954bc70..61c9ce501 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ jobs: LIBGME_CFLAGS: -I/usr/include/ LIBGME_LDFLAGS: -lgme CCACHE_COMPRESS: true + WFLAGS: -Wno-unsuffixed-float-constants steps: - run: name: Add i386 arch From ade354c27d19fb7a561bc3538304a24c137cbabc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 23 Mar 2017 23:19:25 -0400 Subject: [PATCH 19/26] CircleCI: error on warnings --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 61c9ce501..288468230 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,7 +40,7 @@ jobs: # command: wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2115-assets-2.7z -O /root/srb2_cache/SRB2-v2115-assets-2.7z - run: name: Compile - command: make -C src LINUX=1 GCC49=1 WARNINGMODE=1 -k + command: make -C src LINUX=1 GCC49=1 ERRORMODE=1 -k - store_artifacts: path: /root/SRB2/bin/Linux/Release/ destination: bin From aaaab40f6c35adfb284e4eff88520cdb944c2324 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 23 Mar 2017 23:42:28 -0400 Subject: [PATCH 20/26] CircleCI: cache APT and ccache --- .circleci/config.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 288468230..34b0faa7d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,23 +15,26 @@ jobs: - run: name: Add i386 arch command: dpkg --add-architecture i386 - #- restore_cache: - # keys: - # - v1-SRB2-APT - run: name: Update APT listing command: apt-get -qq update + - run: + name: Support S3 upload + command: apt-get -qq -y install ca-certificates + - restore_cache: + keys: + - v1-SRB2-APT - run: name: Install SDK - command: apt-get -qq -y install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib ca-certificates - #- save_cache: - # key: v1-SRB2-APT - # paths: - # - /var/cache/apt/ + command: apt-get -qq -y install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib + - save_cache: + key: v1-SRB2-APT + paths: + - /var/cache/apt/archives - checkout - #- restore_cache: - # keys: - # - v1-SRB2-{{ .Branch }} + - restore_cache: + keys: + - v1-SRB2-{{ .Branch }} - run: name: Setup cache command: mkdir -p /root/srb2_cache @@ -44,11 +47,11 @@ jobs: - store_artifacts: path: /root/SRB2/bin/Linux/Release/ destination: bin - #- save_cache: - # key: v1-SRB2-{{ .Branch }} - # paths: - # - /root/.ccache - # - /root/srb2_cache + - save_cache: + key: v1-SRB2-{{ .Branch }} + paths: + - /root/.ccache + - /root/srb2_cache From c85c277a48dd6b1b98c3e89027e1a52587c8d2e3 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 24 Mar 2017 08:27:41 -0400 Subject: [PATCH 21/26] CircleCI: move GCC49 check to debian's env --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 34b0faa7d..dff58840b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,10 +7,11 @@ jobs: environment: CC: ccache gcc -m32 PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig - LIBGME_CFLAGS: -I/usr/include/ + LIBGME_CFLAGS: -I/usr/include LIBGME_LDFLAGS: -lgme CCACHE_COMPRESS: true WFLAGS: -Wno-unsuffixed-float-constants + GCC49: true steps: - run: name: Add i386 arch @@ -43,7 +44,7 @@ jobs: # command: wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2115-assets-2.7z -O /root/srb2_cache/SRB2-v2115-assets-2.7z - run: name: Compile - command: make -C src LINUX=1 GCC49=1 ERRORMODE=1 -k + command: make -C src LINUX=1 ERRORMODE=1 -k - store_artifacts: path: /root/SRB2/bin/Linux/Release/ destination: bin From 99b2c888212c3211e0bf0335e934f5228246ad9f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 24 Mar 2017 08:28:31 -0400 Subject: [PATCH 22/26] README: add CircleCI's Status badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index eb06156b4..d16071454 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build status](https://ci.appveyor.com/api/projects/status/399d4hcw9yy7hg2y?svg=true)](https://ci.appveyor.com/project/STJr/srb2) [![Build status](https://travis-ci.org/STJr/SRB2.svg?branch=master)](https://travis-ci.org/STJr/SRB2) +[![CircleCI](https://circleci.com/gh/STJr/SRB2/tree/master.svg?style=svg)](https://circleci.com/gh/STJr/SRB2/tree/master) [Sonic Robo Blast 2](https://srb2.org/) is a 3D Sonic the Hedgehog fangame based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/). From ac75267ef2964c57b8956ecdbfffb96a1456c407 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 24 Mar 2017 08:29:54 -0400 Subject: [PATCH 23/26] CircleCI: build on Ubuntu as well --- .circleci/config.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index dff58840b..6330d86c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,6 +12,15 @@ jobs: CCACHE_COMPRESS: true WFLAGS: -Wno-unsuffixed-float-constants GCC49: true + - image: ubuntu:trusty + environment: + CC: ccache gcc -m32 + PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig + LIBGME_CFLAGS: -I/usr/include + LIBGME_LDFLAGS: -lgme + CCACHE_COMPRESS: true + WFLAGS: -Wno-unsuffixed-float-constants + GCC48: true steps: - run: name: Add i386 arch From 29c19b62ef16b9f8867f24bb1b306e8287a97a4c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 24 Mar 2017 08:33:14 -0400 Subject: [PATCH 24/26] CircleCi: Ubuntu docker image is broken --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6330d86c5..5efcaab4a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,15 +12,15 @@ jobs: CCACHE_COMPRESS: true WFLAGS: -Wno-unsuffixed-float-constants GCC49: true - - image: ubuntu:trusty - environment: - CC: ccache gcc -m32 - PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig - LIBGME_CFLAGS: -I/usr/include - LIBGME_LDFLAGS: -lgme - CCACHE_COMPRESS: true - WFLAGS: -Wno-unsuffixed-float-constants - GCC48: true + #- image: ubuntu:trusty + # environment: + # CC: ccache gcc -m32 + # PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig + # LIBGME_CFLAGS: -I/usr/include + # LIBGME_LDFLAGS: -lgme + # CCACHE_COMPRESS: true + # WFLAGS: -Wno-unsuffixed-float-constants + # GCC48: true steps: - run: name: Add i386 arch From 03ecb0d1644e58fa306d56f6dc226cff979a3bdc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 24 Mar 2017 09:10:18 -0400 Subject: [PATCH 25/26] CircleCI: add upx --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5efcaab4a..18a95b8a9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ jobs: - v1-SRB2-APT - run: name: Install SDK - command: apt-get -qq -y install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib + command: apt-get -qq -y install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib upx - save_cache: key: v1-SRB2-APT paths: From 52a79754d344a419a8edb9aa719e8cda78258978 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 24 Mar 2017 09:12:00 -0400 Subject: [PATCH 26/26] CircleCI: keep build cache with checksum of depend.dep --- .circleci/config.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 18a95b8a9..b5c43d017 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,15 +42,12 @@ jobs: paths: - /var/cache/apt/archives - checkout + - run: + name: Clean build + command: make -C src LINUX=1 clean - restore_cache: keys: - - v1-SRB2-{{ .Branch }} - - run: - name: Setup cache - command: mkdir -p /root/srb2_cache - #- run: - # name: Download SRB2 Resources - # command: wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2115-assets-2.7z -O /root/srb2_cache/SRB2-v2115-assets-2.7z + - v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }} - run: name: Compile command: make -C src LINUX=1 ERRORMODE=1 -k @@ -58,10 +55,9 @@ jobs: path: /root/SRB2/bin/Linux/Release/ destination: bin - save_cache: - key: v1-SRB2-{{ .Branch }} + key: v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }} paths: - /root/.ccache - - /root/srb2_cache