Skip to content

Use mainstreams

Use mainstreams #86

Workflow file for this run

name: CI
on:
push:
pull_request:
repository_dispatch:
types: [run_build, run_release]
workflow_dispatch: {}
jobs:
build:
runs-on: ${{ matrix.os[0] }}
strategy:
matrix:
os: [
[macos-latest, arm64, bash],
[macos-13, x86_64, bash],
[ubuntu-latest, x86_64, bash],
[windows-latest, x86_64, msys2]
]
fail-fast: false
defaults:
run:
shell: ${{ matrix.os[2] }} {0}
steps:
- uses: actions/checkout@v4
- name: Install Ubuntu packages
if: matrix.os[0] == 'ubuntu-latest'
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')
run: |
brew update
brew install texinfo bison flex gnu-sed gsl gmp mpfr libmpc
- name: Install MSYS2 packages
if: matrix.os[0] == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
install: |
base-devel git make texinfo flex bison patch binutils mingw-w64-i686-gcc mpc-devel tar
mingw-w64-i686-cmake mingw-w64-i686-make mingw-w64-i686-libogg
update: true
- name: Runs all the stages in the shell
run: |
export PS2DEV=$PWD/ps2dev
export PATH="$(brew --prefix gnu-sed)/libexec/gnubin:$PATH" # This is just needed for MacOS
export PATH=$PATH:$PS2DEV/iop/bin
./toolchain.sh
- name: Print version of executables
run: |
export PS2DEV=$PWD/ps2dev
export PATH=$PATH:$PS2DEV/iop/bin
mipsel-none-elf-as --version
mipsel-none-elf-ld --version
mipsel-none-elf-gcc --version
- name: Get short SHA
id: slug
run: printf '%s\n' "sha8=$(printf '%s\n' ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Compress ps2dev folder
run: |
tar -zcvf ps2dev.tar.gz ps2dev
- uses: actions/upload-artifact@v4
with:
name: ps2dev-${{ steps.slug.outputs.sha8 }}-${{ matrix.os[0] }}
path: ps2dev.tar.gz