Skip to content

Commit

Permalink
CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
irixxxx committed Sep 11, 2023
1 parent 651cd63 commit 46f187d
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Dockerfile-gp2x
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV UNPRIVILEGED_USER_GROUPS=sudo

# minimal build environment
RUN apt-get update && \
apt-get -y --no-install-recommends install sudo make vim git-core wget curl gcc g++
apt-get -y --no-install-recommends install sudo make vim git-core wget curl zip gcc g++

# toolchain and libraries
# NB arm-none-eabi uses crt0.o as start file, while open2x libs offer crt1.o, so provide a link
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/Dockerfile-psp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# build container for PSP

FROM --platform=linux/amd64 ghcr.io/pspdev/pspsdk

ENV UNPRIVILEGED_USER_GROUPS=sudo

# minimal build environment
RUN apk add zip

# toolchain definitions
ENV CFLAGS="-U_FORTIFY_SOURCE -I/home/include"
ENV LDFLAGS="-L/home/lib"

# additional libraries
RUN cd /home && mkdir /home/lib /home/include && \
wget "http://www.zlib.net/zlib-1.3.tar.gz" && tar xzf zlib-1.3.tar.gz && cd zlib-1.3 && \
CC=psp-gcc CFLAGS="$CFLAGS -Os" ./configure --static --libdir=/home/lib --includedir=/home/include && \
make AR=psp-ar install
RUN cd /home && wget --no-check-certificate "https://downloads.sourceforge.net/project/libpng/libpng12/1.2.59/libpng-1.2.59.tar.gz" && \
tar xzf libpng-1.2.59.tar.gz && cd libpng-1.2.59 && \
CC=psp-gcc CFLAGS="$CFLAGS -Os" ./configure --host=mips-elf --libdir=/home/lib --includedir=/home/include && \
make install
15 changes: 7 additions & 8 deletions .github/workflows/ci-gp2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ jobs:
docker build -f .github/workflows/Dockerfile-gp2x -t build-gp2x .
- name: build
run: |
docker run -it -v "$PWD":"/home/picodrive" build-gp2x /bin/sh -c ' \
cd /home/picodrive && \
ver=$(sed s/^[^"]*"//;s/"[^"]*$// platform/common/version.h)-$(git rev-parse --short HEAD) && \
CROSS_COMPILE=arm-none-eabi- ./configure --platform=gp2x && \
make PLATFORM_MP3=0 && \
make -C platform/gp2x rel VER="$rel" && \
mv "PicoDrive_$rel.zip" "PicoDrive-gph_$rel.zip" \
'
ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD)
dock="docker run -i -v $PWD:/home/picodrive -w /home/picodrive build-gp2x"
$dock sh -c "git config --global --add safe.directory /home/picodrive"
$dock sh -c "CROSS_COMPILE=arm-none-eabi- ./configure --platform=gp2x"
$dock sh -c "make PLATFORM_MP3=0"
$dock sh -c "make -C platform/gp2x rel VER=$ver"
mv PicoDrive_$ver.zip PicoDrive-gph_$ver.zip
- name: artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/ci-psp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,24 @@ jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
- name: build environment
run: |
whoami
sudo apt-get update -qq
sudo apt-get install -y wget
wget https://github.com/pspdev/pspdev/releases/download/latest/pspdev-ubuntu-latest.tar.gz
tar -C /tmp/ -xf pspdev-ubuntu-latest.tar.gz
- name: configure
run: DUMP_CONFIG_LOG=1 PATH=$PATH:/tmp/pspdev/bin CROSS_COMPILE=psp- ./configure --platform=psp
- name: make
run: PATH=$PATH:/tmp/pspdev/bin CROSS_COMPILE=psp- make
docker build -f .github/workflows/Dockerfile-psp -t build-psp .
- name: build
run: |
ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD)
dock="docker run -i -v $PWD:/home/picodrive -w /home/picodrive build-psp"
$dock sh -c "git config --global --add safe.directory /home/picodrive"
$dock sh -c "CROSS_COMPILE=psp- ./configure --platform=psp"
$dock sh -c "CROSS_COMPILE=psp- make"
$dock sh -c "make -C platform/psp rel VER=$ver"
- name: artifacts
uses: actions/upload-artifact@v3
with:
name: build result
path: PicoDrive_psp_*.zip

2 changes: 1 addition & 1 deletion platform/base_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PicoDrive 1.xx

About
-----
#include "../README"
#include "../README.md"

How to make it run
------------------
Expand Down
Binary file added platform/gp2x/code940/pico940_v3.bin
Binary file not shown.
Binary file added platform/gp2x/warm_2.4.25.o
Binary file not shown.
Binary file added platform/gp2x/warm_2.4.26-open2x.o
Binary file not shown.
Binary file added platform/gp2x/warm_2.6.24.ko
Binary file not shown.
6 changes: 6 additions & 0 deletions platform/psp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ $(error need VER)
endif
endif

../../tools/textfilter: ../../tools/textfilter.c
make -C ../../tools/ textfilter

readme.txt: ../../tools/textfilter ../base_readme.txt ../../ChangeLog
../../tools/textfilter ../base_readme.txt $@ GP2X

# ?
rel: ../../EBOOT.PBP readme.txt ../game_def.cfg
mkdir -p PicoDrive/skin/
Expand Down

0 comments on commit 46f187d

Please sign in to comment.