Skip to content

Commit d84f572

Browse files
committed
Updating CI/CD
- Improving matrix workflow - Adding MacOS with MacPorts - Adding Ubuntu ARM - Uploading to artifacts
1 parent f6b72cc commit d84f572

File tree

2 files changed

+90
-16
lines changed

2 files changed

+90
-16
lines changed

.github/workflows/compilation.yml

Lines changed: 55 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,67 @@ on:
99

1010
jobs:
1111
build:
12-
runs-on: ${{ matrix.os[0] }}
12+
runs-on: ${{ matrix.target.machine }}
1313
strategy:
1414
matrix:
15-
os: [
16-
[macos-latest, arm64, bash],
17-
[macos-13, x86_64, bash],
18-
[ubuntu-latest, x86_64, bash],
19-
[windows-latest, x86_64, msys2]
20-
]
15+
target:
16+
- machine: macos-latest
17+
architecture: arm64
18+
shell: bash
19+
packageManager: brew
20+
- machine: macos-13
21+
architecture: x86_64
22+
shell: bash
23+
packageManager: brew
24+
- machine: macos-latest
25+
architecture: arm64
26+
shell: bash
27+
packageManager: macport
28+
- machine: ubuntu-latest
29+
architecture: x86_64
30+
shell: bash
31+
packageManager: default
32+
- machine: ubuntu-22.04-arm
33+
architecture: arm64
34+
shell: bash
35+
packageManager: default
36+
- machine: ubuntu-24.04-arm
37+
architecture: arm64
38+
shell: bash
39+
packageManager: default
40+
- machine: windows-latest
41+
architecture: x86_64
42+
shell: msys2
43+
packageManager: default
2144
fail-fast: false
2245
defaults:
2346
run:
24-
shell: ${{ matrix.os[2] }} {0}
47+
shell: ${{ matrix.target.shell }} {0}
2548

2649
steps:
2750
- uses: actions/checkout@v4
28-
with:
29-
fetch-depth: 0
3051

3152
- name: Install Ubuntu packages
32-
if: matrix.os[0] == 'ubuntu-latest'
53+
if: startsWith(matrix.target.machine, 'ubuntu')
3354
run: |
3455
sudo apt-get update
3556
sudo apt-get -y install texinfo bison flex gettext libgmp3-dev libmpfr-dev libmpc-dev
3657
37-
- name: Install macOS packages
38-
if: startsWith(matrix.os[0], 'macos')
58+
- name: Install macOS packages with brew
59+
if: startsWith(matrix.target.machine, 'macos') && matrix.target.packageManager == 'brew'
3960
run: |
4061
brew update
4162
brew install texinfo bison flex gnu-sed gsl gmp mpfr libmpc
4263
64+
- name: Install macOS packages with macport
65+
if: startsWith(matrix.target.machine, 'macos') && matrix.target.packageManager == 'macport'
66+
run: |
67+
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci
68+
source ./macports-ci install --remove-brew --version=2.11.5 --sync=rsync
69+
sudo port install gmp mpfr libmpc libiconv bison flex texinfo
70+
4371
- name: Install MSYS2 packages
44-
if: matrix.os[0] == 'windows-latest'
72+
if: startsWith(matrix.target.machine, 'windows')
4573
uses: msys2/setup-msys2@v2
4674
with:
4775
msystem: MINGW32
@@ -63,3 +91,16 @@ jobs:
6391
export PS2DEV=$PWD/ps2dev
6492
export PATH=$PATH:$PS2DEV/dvp/bin
6593
dvp-as --version
94+
95+
- name: Get short SHA
96+
id: slug
97+
run: echo "sha8=${MSYSTEM}-sha[$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
98+
99+
- name: Prepare ps2dev folder
100+
run: |
101+
tar -zcvf ps2dev-${{matrix.target.machine}}.tar.gz ps2dev
102+
103+
- uses: actions/upload-artifact@v4
104+
with:
105+
name: ps2dev-${{matrix.target.machine}}-ps2dev-${{matrix.target.architecture}}-${{matrix.target.packageManager}}-${{ steps.slug.outputs.sha8 }}
106+
path: ps2dev-${{matrix.target.machine}}.tar.gz

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,46 @@ the ps2dev main page.
1313

1414
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.
1515

16+
### Supported platforms
17+
18+
- macOS (Intel and Apple Silicon) with Homebrew or MacPorts
19+
- Ubuntu (x86_64 and arm64)
20+
- Windows (MSYS2, MinGW32 environment)
21+
1622
## What these scripts do
1723

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

2026
## Requirements
2127

22-
1. Install gcc/clang, make, patch, git, and texinfo if you don't have those packages.
28+
1. Install gcc/clang, make, patch, git, and texinfo if you don't have those packages. Below are example commands per platform:
29+
30+
### macOS (Homebrew)
31+
```bash
32+
brew update
33+
brew install texinfo bison flex gnu-sed gsl gmp mpfr libmpc
34+
```
35+
36+
### macOS (MacPorts)
37+
Make sure MacPorts is installed first. Then:
38+
```bash
39+
sudo port selfupdate
40+
sudo port install gmp mpfr libmpc libiconv bison flex texinfo
41+
```
42+
43+
### Ubuntu
44+
```bash
45+
sudo apt-get update
46+
sudo apt-get -y install texinfo bison flex gettext libgmp3-dev libmpfr-dev libmpc-dev
47+
```
48+
49+
### Windows (MSYS2 MinGW32)
50+
Use the MSYS2 MinGW32 shell and run:
51+
```bash
52+
pacman -S --noconfirm base-devel git make texinfo flex bison patch binutils mpc-devel tar \
53+
mingw-w64-i686-readline mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-make mingw-w64-i686-libogg
54+
```
55+
2356
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:
2457
```bash
2558
export PS2DEV=/usr/local/ps2dev

0 commit comments

Comments
 (0)