Skip to content

Commit

Permalink
Add PS3 build to GitHub Actions (#17621)
Browse files Browse the repository at this point in the history
  • Loading branch information
white-axe authored Feb 23, 2025
1 parent 84eb4f3 commit c9ed5df
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 4 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/PS3-PSL1GHT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI PS3/PSL1GHT

on:
push:
pull_request:
repository_dispatch:
types: [run_build]

permissions:
contents: read

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
build:
runs-on: ubuntu-latest
container:
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-psl1ght:latest
options: --user root

steps:
- uses: actions/checkout@v3

- name: Compile Salamander
run: |
make -f Makefile.psl1ght.salamander -j$(getconf _NPROCESSORS_ONLN) clean
make -f Makefile.psl1ght.salamander -j$(getconf _NPROCESSORS_ONLN)
- name: Compile RA
run: |
make -f Makefile.psl1ght -j$(getconf _NPROCESSORS_ONLN) clean
make -f Makefile.psl1ght -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v4
with:
name: RA-psl1ght-dummy-${{ steps.slug.outputs.sha8 }}
path: |
retroarch_psl1ght_salamander.elf
retroarch_psl1ght.elf
15 changes: 11 additions & 4 deletions Makefile.psl1ght
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
ifeq ($(strip $(PSL1GHT)),)
$(error "Please set PSL1GHT in your environment. export PSL1GHT=<path>")
endif

include $(PSL1GHT)/ppu_rules

include version.all
Expand All @@ -30,10 +30,17 @@ CORE_PATH = pkg/psl1ght/pkg/USRDIR/cores/CORE.SELF
INCLUDE += -I. -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude -Idefines -I$(PORTLIBS)/include -I$(PORTLIBS)/include/freetype2
LIBDIRS += -L. -L$(PORTLIBS)/lib

ifeq ($(HAVE_STATIC_DUMMY),1)
DEFINES += -DHAVE_STATIC_DUMMY
LIBS :=
else
LIBS := -lretro_psl1ght
endif

MACHDEP := -D__PSL1GHT__ -D__PS3__ -mcpu=cell
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
CFLAGS += -Wall $(DEFINES) $(MACHDEP) $(INCLUDE)
LDFLAGS := $(MACHDEP)
LIBS := -lretro_psl1ght -lrt -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl -lsysfs -lfreetype -lcamera -lgem -lspurs
LIBS += -lrt -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl -lsysfs -lfreetype -lcamera -lgem -lspurs

# system platform
system_platform = unix
Expand Down Expand Up @@ -125,7 +132,7 @@ $(ELF_TARGET): $(OBJ)
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)

create-core: $(SELF_TARGET)
cp $(SELF_TARGET) $(CORE_PATH)
cp $(SELF_TARGET) $(CORE_PATH)

pkg: create-core
$(PKG) --contentid $(CONTENTID) pkg/psl1ght/pkg/ $(PACKAGE_BASENAME).pkg
Expand Down

0 comments on commit c9ed5df

Please sign in to comment.