88
99jobs :
1010 build :
11- runs-on : ${{ matrix.os }}
11+ runs-on : ${{ matrix.runner }}
1212 strategy :
1313 fail-fast : false
1414 matrix :
15- os : [macos-15-intel, ubuntu-latest, macos-26]
15+ include :
16+ - runner : ubuntu-latest
17+ os : linux
1618
19+ - runner : macos-15-intel
20+ os : macos
21+
22+ - runner : macos-26
23+ os : macos
24+
25+ steps :
26+ - uses : actions/checkout@v6
27+
28+ - name : Install Linux requirements
29+ if : matrix.os == 'linux'
30+ run : |
31+ sudo apt-get update
32+ sudo apt-get -y install \
33+ autoconf automake bison flex gcc libelf-dev make texinfo \
34+ libncurses5-dev patch python3 python-is-python3 subversion \
35+ wget zlib1g-dev libtool-bin python3-dev bzip2 libgmp3-dev \
36+ pkg-config pv libssl-dev
37+
38+ # ------------------------
39+ # macOS dependencies
40+ # ------------------------
41+ - name : Install macOS requirements
42+ if : matrix.os == 'macos'
43+ shell : bash
44+ env :
45+ HOMEBREW_NO_AUTO_UPDATE : 1
46+ HOMEBREW_NO_INSTALL_CLEANUP : 1
47+ HOMEBREW_NO_ENV_HINTS : 1
48+ run : |
49+ if ! command -v brew >/dev/null 2>&1; then
50+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
51+ fi
52+
53+ if [[ -d /opt/homebrew ]]; then
54+ eval "$(/opt/homebrew/bin/brew shellenv)"
55+ else
56+ eval "$(/usr/local/bin/brew shellenv)"
57+ fi
58+
59+ brew install \
60+ autoconf automake openssl libelf ncurses zlib gmp wget \
61+ pkg-config texinfo pv
62+
63+ # ------------------------
64+ # GLOBAL ENV SETUP
65+ # ------------------------
66+ - name : Setup environment (PS3DEV + base PATH)
67+ shell : bash
68+ run : |
69+ mkdir -p "$PWD/ps3dev"
70+ mkdir -p "$PWD/build"
71+
72+ echo "BUILD_PS3TOOLCHAIN_ONLY=1" >> $GITHUB_ENV
73+ echo "NO_SAVANNAH=1" >> $GITHUB_ENV
74+ echo "PS3DEV=$PWD/ps3dev" >> $GITHUB_ENV
75+ echo "PSL1GHT=$PWD/ps3dev" >> $GITHUB_ENV
76+ echo "PATH=$PATH:$PWD/ps3dev/bin:$PWD/ps3dev/ppu/bin:$PWD/ps3dev/spu/bin" >> $GITHUB_ENV
77+
78+ # ------------------------
79+ # Build steps
80+ # ------------------------
81+ - name : Download files
82+ working-directory : ./build
83+ run : ../download.sh
84+
85+ - name : Build Binutils (PPU)
86+ working-directory : ./build
87+ run : ../scripts/001-binutils-PPU.sh
88+
89+ - name : Build Gcc + Newlib (PPU)
90+ working-directory : ./build
91+ run : ../scripts/002-gcc-newlib-PPU.sh
92+
93+ - name : Symlinks (PPU)
94+ working-directory : ./build
95+ run : ../scripts/004-symlinks-PPU.sh
96+
97+ - name : Build Binutils (SPU)
98+ working-directory : ./build
99+ run : ../scripts/005-binutils-SPU.sh
100+
101+ - name : Build Gcc + Newlib (SPU)
102+ working-directory : ./build
103+ run : ../scripts/006-gcc-newlib-SPU.sh
104+
105+ - name : Build PSL1GHT
106+ if : env.BUILD_PS3TOOLCHAIN_ONLY != '1'
107+ working-directory : ./build
108+ run : ../scripts/007-psl1ght.sh
109+
110+ - name : Build PSL1GHT Libraries
111+ if : env.BUILD_PS3TOOLCHAIN_ONLY != '1'
112+ working-directory : ./build
113+ run : ../scripts/008-libraries.sh
114+
115+ - name : Get short SHA
116+ id : slug
117+ run : echo "sha8=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"
118+
119+ - name : Compress ps3dev folder
120+ run : tar -zcvf ps3dev-${{ matrix.os }}-${{ runner.arch }}.tar.gz ps3dev
121+
122+ - uses : actions/upload-artifact@v7
123+ with :
124+ name : ps3dev-${{ steps.slug.outputs.sha8 }}-${{ matrix.os }}-${{ runner.arch }}
125+ path : ps3dev-${{ matrix.os }}-${{ runner.arch }}.tar.gz
126+
127+ push_release :
128+ if : |
129+ github.event_name == 'push' &&
130+ github.repository == 'ps3dev/ps3toolchain'
131+ needs : build
132+ runs-on : ubuntu-latest
133+ permissions :
134+ contents : write
17135 steps :
18- - uses : actions/checkout@v6
19-
20- - name : Install Ubuntu requirements
21- if : matrix.os == 'ubuntu-latest'
22- run : |
23- sudo apt-get update
24- sudo apt-get -y install autoconf automake bison flex gcc libelf-dev make texinfo libncurses5-dev patch python3 python-is-python3 subversion wget zlib1g-dev libtool-bin python3-dev bzip2 libgmp3-dev pkg-config
25-
26- - name : Install macOS intel requirements
27- if : matrix.os == 'macos-15-intel'
28- shell : arch -x86_64 bash -e {0}
29- env :
30- HOMEBREW_NO_AUTO_UPDATE : 1
31- HOMEBREW_NO_INSTALL_CLEANUP : 1
32- HOMEBREW_NO_ENV_HINTS : 1
33- run : |
34- brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo
35-
36- - name : Install macOS arm64 requirements
37- if : matrix.os == 'macos-26'
38- shell : bash -e {0}
39- env :
40- HOMEBREW_NO_AUTO_UPDATE : 1
41- HOMEBREW_NO_INSTALL_CLEANUP : 1
42- HOMEBREW_NO_ENV_HINTS : 1
43- run : |
44- brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo
45-
46- - name : Runs all the stages in the shell
47- if : matrix.os == 'ubuntu-latest'
48- shell : bash -e {0}
49- env :
50- BUILD_PS3TOOLCHAIN_ONLY : 1
51- run : |
52- mkdir $PWD/ps3dev
53- export PS3DEV=$PWD/ps3dev
54- export PSL1GHT=$PS3DEV
55- export PATH=$PATH:$PS3DEV/bin
56- export PATH=$PATH:$PS3DEV/ppu/bin
57- export PATH=$PATH:$PS3DEV/spu/bin
58- ./toolchain.sh
59-
60- - name : Runs all the stages in the shell
61- if : matrix.os == 'macos-15-intel'
62- shell : arch -x86_64 bash -e {0}
63- env :
64- BUILD_PS3TOOLCHAIN_ONLY : 1
65- run : |
66- mkdir $PWD/ps3dev
67- export PS3DEV=$PWD/ps3dev
68- export PSL1GHT=$PS3DEV
69- export PATH=$PATH:$PS3DEV/bin
70- export PATH=$PATH:$PS3DEV/ppu/bin
71- export PATH=$PATH:$PS3DEV/spu/bin
72- ./toolchain.sh
73-
74- - name : Runs all the stages in the shell
75- if : matrix.os == 'macos-26'
76- shell : bash -e {0}
77- env :
78- BUILD_PS3TOOLCHAIN_ONLY : 1
79- run : |
80- mkdir $PWD/ps3dev
81- export PS3DEV=$PWD/ps3dev
82- export PSL1GHT=$PS3DEV
83- export PATH=$PATH:$PS3DEV/bin
84- export PATH=$PATH:$PS3DEV/ppu/bin
85- export PATH=$PATH:$PS3DEV/spu/bin
86- ./toolchain.sh
87-
88- - name : Get short SHA
89- id : slug
90- run : echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> "$GITHUB_OUTPUT"
91-
92- - name : Compress ps3dev folder
93- run : |
94- tar -zcvf ps3dev.tar.gz ps3dev
95-
96- - uses : actions/upload-artifact@v6
97- with :
98- name : ps3dev-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}
99- path : ps3dev.tar.gz
136+ - name : Checkout
137+ uses : actions/checkout@v6
138+
139+ - name : Download artifacts
140+ uses : actions/download-artifact@v8
141+ with :
142+ path : artifacts
143+ merge-multiple : true
144+
145+ - name : Create Release
146+ env :
147+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
148+ run : gh release create 1.0${{ GITHUB.RUN_NUMBER }} artifacts/*.tar.gz --target ${{ GITHUB.SHA }} -t 1.0${{ GITHUB.RUN_NUMBER }}
0 commit comments