Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 56 additions & 14 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,67 @@ on:

jobs:
build:
runs-on: ${{ matrix.os[0] }}
runs-on: ${{ matrix.target.machine }}
strategy:
matrix:
os: [
[macos-latest, arm64, bash],
[macos-13, x86_64, bash],
[ubuntu-latest, x86_64, bash],
[windows-latest, x86_64, msys2]
]
target:
- machine: macos-latest
architecture: arm64
shell: bash
packageManager: brew
- machine: macos-13
architecture: x86_64
shell: bash
packageManager: brew
- machine: macos-latest
architecture: arm64
shell: bash
packageManager: macport
- machine: ubuntu-latest
architecture: x86_64
shell: bash
packageManager: default
- machine: ubuntu-22.04-arm
architecture: arm64
shell: bash
packageManager: default
- machine: ubuntu-24.04-arm
architecture: arm64
shell: bash
packageManager: default
- machine: windows-latest
architecture: x86_64
shell: msys2
packageManager: default
fail-fast: false
defaults:
run:
shell: ${{ matrix.os[2] }} {0}
shell: ${{ matrix.target.shell }} {0}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Ubuntu packages
if: matrix.os[0] == 'ubuntu-latest'
if: startsWith(matrix.target.machine, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get -y install texinfo bison flex gettext libgmp3-dev libmpfr-dev libmpc-dev

- name: Install macOS packages
if: startsWith(matrix.os[0], 'macos')
- name: Install macOS packages with brew
if: startsWith(matrix.target.machine, 'macos') && matrix.target.packageManager == 'brew'
run: |
brew update
brew install texinfo bison flex gnu-sed gsl gmp mpfr libmpc

- name: Install macOS packages with macport
if: startsWith(matrix.target.machine, 'macos') && matrix.target.packageManager == 'macport'
run: |
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci
source ./macports-ci install --remove-brew --version=2.11.5 --sync=rsync
sudo port install gmp mpfr libmpc libiconv bison flex texinfo

- name: Install MSYS2 packages
if: matrix.os[0] == 'windows-latest'
if: startsWith(matrix.target.machine, 'windows')
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
Expand All @@ -63,3 +91,17 @@ jobs:
export PS2DEV=$PWD/ps2dev
export PATH=$PATH:$PS2DEV/dvp/bin
dvp-as --version

- name: Get short SHA
id: slug
run: |
echo "sha8=${MSYSTEM}-sha[$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT

- name: Prepare ps2dev folder
run: |
tar -zcvf ps2dev-${{matrix.target.machine}}.tar.gz ps2dev

- uses: actions/upload-artifact@v4
with:
name: ps2dev-${{matrix.target.machine}}-ps2dev-${{matrix.target.architecture}}-${{matrix.target.packageManager}}-${{ steps.slug.outputs.sha8 }}
path: ps2dev-${{matrix.target.machine}}.tar.gz
6 changes: 0 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ jobs:
run: |
echo "DOCKER_TAG=latest" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
if: env.DOCKER_USERNAME != null
Expand Down
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,46 @@ the ps2dev main page.

This program will automatically build and install a DVP compiler, which is used in the creation of homebrew software for the Sony PlayStation® 2 videogame system.

### Supported platforms

- macOS (Intel and Apple Silicon) with Homebrew or MacPorts
- Ubuntu (x86_64 and arm64)
- Windows (MSYS2, MinGW32 environment)

## What these scripts do

These scripts download (with `git clone`) and install [binutils 2.14](http://www.gnu.org/software/binutils/ "binutils") (dvp).
These scripts download (with `git clone`) and install [binutils 2.45.0](http://www.gnu.org/software/binutils/ "binutils") (dvp).

## Requirements

1. Install gcc/clang, make, patch, git, and texinfo if you don't have those packages.
1. Install gcc/clang, make, patch, git, and texinfo if you don't have those packages. Below are example commands per platform:

### macOS (Homebrew)
```bash
brew update
brew install texinfo bison flex gnu-sed gsl gmp mpfr libmpc
```

### macOS (MacPorts)
Make sure MacPorts is installed first. Then:
```bash
sudo port selfupdate
sudo port install gmp mpfr libmpc libiconv bison flex texinfo
```

### Ubuntu
```bash
sudo apt-get update
sudo apt-get -y install texinfo bison flex gettext libgmp3-dev libmpfr-dev libmpc-dev
```

### Windows (MSYS2 MinGW32)
Use the MSYS2 MinGW32 shell and run:
```bash
pacman -S --noconfirm base-devel git make texinfo flex bison patch binutils mpc-devel tar \
mingw-w64-i686-readline mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-make mingw-w64-i686-libogg
```

2. Ensure that you have enough permissions for managing PS2DEV location (which defaults to `/usr/local/ps2dev`). PS2DEV location MUST NOT have spaces or special characters in its path! For example, on Linux systems, you can set access for the current user by running commands:
```bash
export PS2DEV=/usr/local/ps2dev
Expand Down
2 changes: 1 addition & 1 deletion config/ps2toolchain-dvp-config.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

PS2TOOLCHAIN_DVP_BINUTILS_REPO_URL="https://github.com/ps2dev/binutils-gdb.git"
PS2TOOLCHAIN_DVP_BINUTILS_DEFAULT_REPO_REF="dvp-v2.44.0"
PS2TOOLCHAIN_DVP_BINUTILS_DEFAULT_REPO_REF="dvp-v2.45.0"

if test -f "$PS2DEV_CONFIG_OVERRIDE"; then
source "$PS2DEV_CONFIG_OVERRIDE"
Expand Down
2 changes: 1 addition & 1 deletion scripts/001-binutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ "$(uname -s)" = "Darwin" ]; then
## Check if using MacPorts
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
echo Macport base is $MACPORT_BASE
TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE"
TARG_XTRA_OPTS="--with-system-zlib --with-libiconv_prefix=$MACPORT_BASE --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE"
fi
fi

Expand Down
Loading