Skip to content

Commit

Permalink
Merge pull request #9 from Bedzior/feature/travis-build
Browse files Browse the repository at this point in the history
Travis build
  • Loading branch information
dbeef authored Mar 24, 2020
2 parents 435d4e4 + 353aa93 commit 56be23c
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 4 deletions.
43 changes: 43 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Spelunky® remake for the Sony PSP.

[![`Build status`](https://travis-ci.org/dbeef/spelunky-psp.svg?branch=master)](https://travis-ci.org/dbeef/spelunky-psp)

### How?

Original Spelunky classic was written using GameMaker, properietary tool for creating games. License, under
Expand Down Expand Up @@ -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.
Expand Down
45 changes: 45 additions & 0 deletions build.dockerfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
2 changes: 1 addition & 1 deletion scripts/build-psp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
2 changes: 1 addition & 1 deletion vendor/cjson/cJSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stddef.h>

/* cJSON Types: */
#define cJSON_Invalid (0)
Expand Down

0 comments on commit 56be23c

Please sign in to comment.