From b29193aa98eaa2fe9abc8192162e731a0cac28e5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 23 Mar 2017 21:24:31 -0400 Subject: [PATCH 01/12] 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 02/12] 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 03/12] 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 04/12] 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 05/12] 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 06/12] 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 07/12] 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 08/12] 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 09/12] 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 10/12] 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 11/12] 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 From 48777e60ed8a13aaa397279b683979f9dd462a1f Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Wed, 29 Mar 2017 21:27:44 +0100 Subject: [PATCH 12/12] check i not add, silly --- src/m_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_misc.c b/src/m_misc.c index cfe73d88f..d88643ec4 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -585,7 +585,7 @@ static const char *Newsnapshotfile(const char *pathname, const char *ext) i += add * result; - if (add < 0 || add > 9999) + if (i < 0 || i > 9999) return NULL; }