@@ -3,38 +3,229 @@ name: Build libraries package
33on : [ push, pull_request, workflow_dispatch ]
44
55jobs :
6- build_ps3libraries :
6+ build :
7+ runs-on : ${{ matrix.runner }}
8+ strategy :
9+ fail-fast : false
10+ matrix :
11+ include :
12+ - runner : ubuntu-latest
13+ os : linux
14+
15+ - runner : macos-15-intel
16+ os : macos
17+
18+ - runner : macos-26
19+ os : macos
20+
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v6
24+
25+ - name : Set env vars
26+ id : slug
27+ run : |
28+ echo "sha_name=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
29+ echo "NO_SAVANNAH=1" >> $GITHUB_ENV
30+
31+ - name : Install Linux requirements
32+ if : matrix.os == 'linux'
33+ run : |
34+ sudo apt-get -y install gcc libelf-dev autoconf automake bison flex make texinfo patch wget zlib1g-dev libtool-bin bzip2 pkg-config libssl-dev
35+
36+ - name : Install MacOS requirements
37+ if : matrix.os == 'macos'
38+ shell : bash
39+ env :
40+ HOMEBREW_NO_AUTO_UPDATE : 1
41+ HOMEBREW_NO_INSTALL_CLEANUP : 1
42+ HOMEBREW_NO_ENV_HINTS : 1
43+ run : |
44+ eval "$(brew shellenv)"
45+ brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo
46+
47+ - name : Create build folder
48+ run : |
49+ mkdir build
50+
51+ - name : Cache downloaded archives
52+ uses : actions/cache@v5
53+ with :
54+ path : archives
55+ key : archives-${{ hashFiles('archives/archives.txt') }}
56+
57+ - name : Purge unverifiable archives
58+ run : |
59+ while IFS= read -r line; do
60+ set -- $line
61+ [ "${1:-}" = "-" ] || continue
62+ # 3rd field is URL, 5th field (if "->") is rename
63+ url="$3"
64+ rename=""
65+ [ "${4:-}" = "->" ] && rename="${5:-}"
66+ file="${rename:-$(basename "$url")}"
67+ rm -f "archives/$file"
68+ done < archives/archives.txt
69+
70+ - name : Download PS3DEV Toolchain
71+ env :
72+ GH_TOKEN : ${{ github.token }}
73+ run : |
74+ TOOLCHAIN_URL=$(gh api repos/ps3dev/ps3toolchain/releases \
75+ --jq '
76+ map(select(.prerelease and (.draft | not)))
77+ | sort_by(.published_at)
78+ | reverse
79+ | .[0].assets[]
80+ | select(.name == "ps3dev-${{ matrix.os }}-${{ runner.arch }}.tar.gz")
81+ | .browser_download_url
82+ ')
83+
84+ curl -sL "$TOOLCHAIN_URL" | tar xvz -C ./
85+ echo "PS3DEV=${GITHUB_WORKSPACE}/ps3dev" >> $GITHUB_ENV
86+ echo "PSL1GHT=${GITHUB_WORKSPACE}/ps3dev" >> $GITHUB_ENV
87+ echo "PATH=$PATH:$PWD/ps3dev/bin:$PWD/ps3dev/ppu/bin:$PWD/ps3dev/spu/bin" >> $GITHUB_ENV
88+
89+ - name : Download files
90+ working-directory : ./build
91+ run : ../download.sh
92+
93+ - name : Build PSL1GHT
94+ run : |
95+ git clone https://github.com/ps3dev/PSL1GHT.git
96+ cd PSL1GHT
97+ JOBS=$(nproc 2>/dev/null || sysctl -n hw.ncpu)
98+ make -j"$JOBS" install-ctrl
99+ make -j"$JOBS"
100+ make -j"$JOBS" install
101+
102+ - name : Build Zlib 1.2.13
103+ run : ./libraries.sh 001
104+
105+ - name : Build Libpng 1.4.4
106+ run : ./libraries.sh 002
107+
108+ - name : Build Jpeg 8b
109+ run : ./libraries.sh 003
110+
111+ - name : Build Freetype 2.4.3
112+ run : ./libraries.sh 004
113+
114+ - name : Build Pixman 0.20.0
115+ run : ./libraries.sh 005
116+
117+ - name : Build Cairo 1.10.0
118+ run : ./libraries.sh 006
119+
120+ - name : Build Libogg 1.3.4
121+ run : ./libraries.sh 007
122+
123+ - name : Build Libvorbis 1.3.5
124+ run : ./libraries.sh 008
125+
126+ - name : Build Libzip 0.9.3
127+ run : ./libraries.sh 009
128+
129+ - name : Build Tiff 3.9.4
130+ run : ./libraries.sh 010
131+
132+ - name : Build Libmikmod 3.1.11
133+ run : ./libraries.sh 011
134+
135+ - name : Build Libxml2 2.7.8
136+ run : ./libraries.sh 012
137+
138+ - name : Build Sdl_psl1ght
139+ run : ./libraries.sh 013
140+
141+ - name : Build Sdl2_psl1ght
142+ run : ./libraries.sh 014
143+
144+ - name : Build Sdl_psl1ght_libs
145+ run : ./libraries.sh 015
146+
147+ - name : Build SDL2_mixer 2.0.4
148+ run : ./libraries.sh 016
149+
150+ - name : Build Polarssl 1.3.9
151+ run : ./libraries.sh 017
152+
153+ - name : Build Libcurl 7.64.1
154+ run : ./libraries.sh 018
155+
156+ - name : Build Libmad 0.15.1b
157+ run : ./libraries.sh 019
158+
159+ - name : Build Flac 1.2.1
160+ run : ./libraries.sh 020
161+
162+ - name : Build Faad2 2.7
163+ run : ./libraries.sh 021
164+
165+ - name : Build Libtheora 1.1.1
166+ run : ./libraries.sh 022
167+
168+ - name : Build NoRSX
169+ run : ./libraries.sh 023
170+
171+ - name : Build Libjson
172+ run : ./libraries.sh 024
173+
174+ - name : Build Debugnet
175+ run : ./libraries.sh 025
176+
177+ - name : Build Ps3soundlib
178+ run : ./libraries.sh 026
179+
180+ - name : Build Tiny3d_libfont
181+ run : ./libraries.sh 027
182+
183+ - name : Build MbedTLS 2.28.10
184+ run : ./libraries.sh 028
185+
186+ - name : Build Libunrar
187+ run : ./libraries.sh 029
188+
189+ - name : Build Libnfs
190+ run : ./libraries.sh 030
191+
192+ - name : Build Libsmb2
193+ run : ./libraries.sh 031
194+
195+ - name : Build Package
196+ run : |
197+ cd $PSL1GHT
198+ tar -zcvf ../ps3libraries-${{ matrix.os }}-${{ runner.arch }}.tar.gz portlibs/
199+
200+ - name : Push package artifact
201+ uses : actions/upload-artifact@v7
202+ with :
203+ name : ps3libraries-${{ env.sha_name }}-${{ matrix.os }}-${{ runner.arch }}
204+ path : ps3libraries-${{ matrix.os }}-${{ runner.arch }}.tar.gz
205+ if-no-files-found : error
206+
207+ push_release :
208+ if : |
209+ github.event_name == 'push' &&
210+ github.repository == 'ps3dev/ps3libraries'
211+ needs : build
7212 runs-on : ubuntu-latest
213+ permissions :
214+ contents : write
8215 steps :
216+ - name : Checkout
217+ uses : actions/checkout@v6
218+
219+ - name : Download artifacts
220+ uses : actions/download-artifact@v8
221+ with :
222+ path : artifacts
223+ merge-multiple : true
9224
10- - name : Checkout
11- uses : actions/checkout@v4
12-
13- - name : Set env vars
14- id : slug
15- run : |
16- echo "sha_name=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
17- sudo apt-get -y install autoconf automake bison flex make texinfo patch wget zlib1g-dev libtool-bin bzip2 pkg-config
18-
19- # using pre-compiled PS3 toolchain
20- - name : Download PSL1GHT Toolchain
21- run : |
22- curl -sL https://github.com/ps3dev/ps3toolchain/releases/download/2026-06-09/ps3dev-92534e60-ubuntu-latest.tar.gz | tar xvz -C ./
23- echo "PS3DEV=${GITHUB_WORKSPACE}/ps3dev" >> $GITHUB_ENV
24- echo "PSL1GHT=${GITHUB_WORKSPACE}/ps3dev" >> $GITHUB_ENV
25-
26- - name : Install libraries
27- run : |
28- sed -i.bak '8d' libraries-sudo.sh
29- ./libraries-sudo.sh
30-
31- - name : Build Package
32- run : |
33- 7z a ps3libraries.zip $PSL1GHT/portlibs/
34-
35- - name : Push package artifact
36- uses : actions/upload-artifact@v4
37- with :
38- name : ps3libraries-build_${{ env.sha_name }}
39- path : ps3libraries.zip
40- if-no-files-found : error
225+ - name : Create Pre-Release
226+ env :
227+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
228+ run : |
229+ TAG="nightly-$(date -u +%Y-%m-%d)"
230+ gh release delete "$TAG" --yes --cleanup-tag || true
231+ gh release create "$TAG" artifacts/*.tar.gz --target ${{ GITHUB.SHA }} -t "$TAG" --prerelease
0 commit comments