From f6935ee15e242099ef71d896b5d143776287f8f4 Mon Sep 17 00:00:00 2001 From: Rafal Bedzkowski Date: Sun, 15 Mar 2020 17:38:16 +0100 Subject: [PATCH 1/4] Build scripts use nproc --- scripts/build-linux.sh | 2 +- scripts/build-psp.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-linux.sh b/scripts/build-linux.sh index 701999cb..015e0922 100755 --- a/scripts/build-linux.sh +++ b/scripts/build-linux.sh @@ -5,4 +5,4 @@ # * SDL2 as a vendor of creating window, retrieving OpenGL context, controls and sounds. cd tmp/build-linux -cmake --build . --target install --config Release -- -j 4 +cmake --build . --target install --config Release -- -j `nproc` diff --git a/scripts/build-psp.sh b/scripts/build-psp.sh index 2e0e001c..c21ab6a3 100755 --- a/scripts/build-psp.sh +++ b/scripts/build-psp.sh @@ -5,4 +5,4 @@ # * SDL 1.2 as a vendor of creating window, retrieving OpenGL context, controls and sounds. cd tmp/build-psp -cmake --build . --target install --config Release -- -j 4 +cmake --build . --target install --config Release -- -j `nproc` From b8f4ca71d5da5baa84e9482c2c6bbc1048cefac2 Mon Sep 17 00:00:00 2001 From: Rafal Bedzkowski Date: Sun, 15 Mar 2020 17:38:41 +0100 Subject: [PATCH 2/4] Fixing cJSON stddef.h include --- vendor/cjson/cJSON.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/cjson/cJSON.h b/vendor/cjson/cJSON.h index e5c425bf..592986b8 100644 --- a/vendor/cjson/cJSON.h +++ b/vendor/cjson/cJSON.h @@ -83,7 +83,7 @@ then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJ #define CJSON_VERSION_MINOR 7 #define CJSON_VERSION_PATCH 12 -#include "../../../../../usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" +#include /* cJSON Types: */ #define cJSON_Invalid (0) From 21a439178592815f2d4586e88ee7c8e44b8a9e41 Mon Sep 17 00:00:00 2001 From: Rafal Bedzkowski Date: Sun, 15 Mar 2020 23:22:57 +0100 Subject: [PATCH 3/4] Setting up build w/GitHub Release --- .travis.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ README.md | 3 ++- build.dockerfile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 build.dockerfile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..7497b1c6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,43 @@ +language: cpp + +git: + depth: 1 + +services: + - docker + +env: + global: + - _C=build + - WORKDIR=/spelunky + - BUILD_IMAGE=bedzior/spelunky-psp + +stages: + - build + - name: deploy + if: tag is present + +install: + - docker run -it -d --volume `pwd`:$WORKDIR --name $_C $BUILD_IMAGE /bin/bash + - mkdir -p install + +jobs: + include: + - stage: build + name: "Build PSP" + script: + - docker exec -w $WORKDIR $_C /bin/bash -c "./scripts/config-psp.sh ; ./scripts/build-psp.sh" + - cp tmp/build-psp/SpelunkyPSP.PBP install/SpelunkyPSP.pbp + - name: "Build Linux" + script: + - docker exec -w $WORKDIR $_C /bin/bash -c "./scripts/config-linux.sh ; ./scripts/build-linux.sh" + - cp tmp/install-linux/Release/bin/Spelunky_PSP install/SpelunkyLinux + +deploy: + provider: releases + token: $GITHUB_TOKEN + file_glob: true + file: install/Spelunky* + skip_cleanup: true + on: + tags: true diff --git a/README.md b/README.md index 17c71983..1ea66755 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## Spelunky® remake for the Sony PSP. +[![`Build status`](https://travis-ci.org/Bedzior/spelunky-psp.svg?branch=feature/travis-build)](https://travis-ci.org/Bedzior/spelunky-psp) + ### How? Original Spelunky classic was written using GameMaker, properietary tool for creating games. License, under @@ -76,7 +78,6 @@ root directory), you are ready to cross compile to PSP via `/scripts/config-psp. * Establish CI, doing: * static analysis * license scanning - * archiving artifacts from master branch * Provide issue template on Github * Create resource-compiler subproject, outputting executable that would convert given asset (i.e image) to header file. Add automatic invoking resource-compiler to CMake every time assets were touched. * Extract level-generating code from Spelunky DS, making it as renderer-agnostic as possible, for potential reuse between Spelunky DS / Spelunky PSP. diff --git a/build.dockerfile b/build.dockerfile new file mode 100644 index 00000000..8436426a --- /dev/null +++ b/build.dockerfile @@ -0,0 +1,45 @@ +FROM ubuntu:19.10 + +RUN apt-get update && apt-get upgrade -y +# toolchain requirements +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ + g++ \ + build-essential \ + autoconf \ + automake \ + cmake \ + doxygen \ + bison \ + flex \ + libncurses5-dev \ + libsdl1.2-dev \ + libreadline-dev \ + libusb-dev \ + texinfo \ + libgmp3-dev \ + libmpfr-dev \ + libelf-dev \ + libmpc-dev \ + libfreetype6-dev \ + zlib1g-dev \ + libtool \ + libtool-bin \ + subversion \ + git \ + tcl \ + unzip \ + wget + +RUN git clone https://github.com/pspdev/psptoolchain.git --depth 1 + +WORKDIR psptoolchain + +RUN ./toolchain-sudo.sh && ./toolchain-sudo.sh clean + +RUN export PSPDEV=/usr/local/pspdev +RUN export PATH=$PATH:$PSPDEV/bin +ENV PSPDEV /usr/local/pspdev +ENV PATH $PATH:$PSPDEV/bin +# own requirements + +RUN apt-get install libglew-dev -y From 353aa93f6428a0b19d8864fc43c48cffce865118 Mon Sep 17 00:00:00 2001 From: Rafal Bedzkowski Date: Sat, 21 Mar 2020 14:17:04 +0100 Subject: [PATCH 4/4] Travis build status for upstream master --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ea66755..935a3812 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Spelunky® remake for the Sony PSP. -[![`Build status`](https://travis-ci.org/Bedzior/spelunky-psp.svg?branch=feature/travis-build)](https://travis-ci.org/Bedzior/spelunky-psp) +[![`Build status`](https://travis-ci.org/dbeef/spelunky-psp.svg?branch=master)](https://travis-ci.org/dbeef/spelunky-psp) ### How?