Update main.c #283
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
repository_dispatch: | |
types: [Component_update] | |
push: | |
branches: | |
- '*' | |
tags: | |
- 'v*' | |
paths-ignore: | |
- '**.MD' | |
- '**.gitkeep' | |
- '**.gitignore' | |
workflow_dispatch: | |
inputs: | |
debug: | |
type: boolean | |
description: compile with debugging functionality | |
printf: | |
type: choice | |
description: wich debugging messages variant to use | |
options: | |
- NONE | |
- PRINTF | |
- EE_SIO | |
- SCR | |
- UDPTTY | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: ps2dev/ps2dev:latest | |
steps: | |
- name: Install dependencies | |
run: | | |
apk add build-base git p7zip | |
- uses: actions/checkout@v3 | |
- run: | | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
git fetch --prune --unshallow | |
- name: compilation opts | |
if: github.event.inputs.debug == true | |
run: | | |
echo "DEBUG=$(echo DEBUG=1)" >> $GITHUB_ENV | |
- name: Compile PS2 build | |
run: | | |
make release COMMIT_HASH=${GITHUB_SHA::7} BINDIR=PS2/ ${{ env.DEBUG }} PRINTF=${{ github.event.inputs.name }} | |
- name: Compile PS2 MX4SIO build | |
run: | | |
make release COMMIT_HASH=${GITHUB_SHA::7} BINDIR=PS2_MX4SIO/ MX4SIO=1 ${{ env.DEBUG }} PRINTF=${{ github.event.inputs.name }} | |
- name: Compile PSX build | |
run: | | |
make release COMMIT_HASH=${GITHUB_SHA::7} BINDIR=PSX/ PSX=1 ${{ env.DEBUG }} PRINTF=${{ github.event.inputs.name }} | |
- name: Compile PS2 HDD build | |
run: | | |
make release COMMIT_HASH=${GITHUB_SHA::7} BINDIR=PS2_HDD/ HDD=1 ${{ env.DEBUG }} PRINTF=${{ github.event.inputs.name }} | |
- name: Compile system 2x6 build | |
run: | | |
make release COMMIT_HASH=${GITHUB_SHA::7} BINDIR=NAMCO_ARCADE_2x6/ COH=1 ${{ env.DEBUG }} PRINTF=${{ github.event.inputs.name }} | |
- name: list | |
run: | | |
git ls-files -i --exclude-standard -c | |
- name: prepare release folder | |
run: | | |
cp LICENSE release/LICENSE.TXT | |
cp README.md release/README.md | |
mv PS2/ release/PS2/ | |
mv PSX/ release/PSX/ | |
mv PS2_HDD/ release/PS2_HDD/ | |
mv PS2_MX4SIO/ release/PS2_MX4SIO/ | |
mv NAMCO_ARCADE_2x6/ release/NAMCO_ARCADE_2x6/ | |
echo "The executables found inside this folder are specifically crafted to boot in a namco arcade system 246 or 256 (COH-H PS2 model) running these on any other PS2 type will result in a black scren!">release/NAMCO_ARCADE_2x6/WARNING.TXT | |
- name: pack release | |
run: | | |
CSH=${GITHUB_SHA::7} | |
DATE=$(date "+%d-%m-%Y") | |
TARGET="PS2BBL[$DATE]-[$CSH]" | |
cp -r release/ $TARGET/ | |
7z a -t7z PS2BBL.7z $TARGET/* | |
- name: Upload artifacts | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PS2BBL | |
path: | | |
release/* | |
- name: Create release | |
if: github.ref == 'refs/heads/main' | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
title: "Latest development build" | |
files: | | |
PS2BBL.7z | |
opentuna: | |
runs-on: ubuntu-latest | |
needs: [build] | |
container: ps2dev/ps2dev:latest | |
steps: | |
- name: Install dependencies | |
run: | | |
apk add build-base git p7zip | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
- name: list | |
run: | | |
ls -R | |
- name: clone | |
run: | | |
git clone --depth 1 -b PS2BBL https://github.com/israpps/Funtuna-Fork | |
- name: update binaries | |
run: | | |
cp PS2BBL/PS2/COMPRESSED_PS2BBL.ELF Funtuna-Fork/installer/INSTALLER_CONTENTS/BOOT/BOOT.ELF | |
cp PS2BBL/PS2BBL/CONFIG.INI Funtuna-Fork/installer/INSTALLER_CONTENTS/PS2BBL/CONFIG.INI | |
- name: update bundled software | |
run: | | |
wget https://github.com/israpps/wLaunchELF_ISR/releases/download/latest/BOOT-EXFAT.ELF -O Funtuna-Fork/installer/INSTALLER_CONTENTS/BOOT/ULE.ELF | |
- name: compile | |
run: | | |
cd Funtuna-Fork/installer | |
make clean all | |
- name: list | |
run: | | |
ls -R | |
- name: pack release | |
run: | | |
mkdir release | |
CSH=${GITHUB_SHA::7} | |
DATE=$(date "+%d-%m-%Y") | |
TARGET="PS2BBL_OpenTuna_installer-[$DATE]-[$CSH]" | |
cp Funtuna-Fork/installer/bin/PS2BBL_OpenTuna_Installer.ELF release/PS2BBL_OpenTuna_Installer.ELF | |
cp PS2BBL/LICENSE.TXT release/LICENSE.TXT | |
echo "PS2BBL and installer by Matias Israelson">release/CREDITS.TXT | |
echo "OpenTuna by Alexander Lopez Parrado">>release/CREDITS.TXT | |
echo "If you bought this software you have been SCAMMED.">>release/CREDITS.TXT | |
echo "https://github.com/israpps/PlayStation2-Basic-BootLoader">>release/CREDITS.TXT | |
cp -r release/ $TARGET/ | |
7z a -t7z PS2BBL_OpenTuna_Installer.7z $TARGET/* | |
- name: Upload artifacts | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PS2BBL | |
path: | | |
release/PS2BBL_OpenTuna_Installer.ELF | |
- name: Create release | |
if: github.ref == 'refs/heads/main' | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "opentuna" | |
title: "Latest PS2BBL + OpenTuna" | |
files: | | |
PS2BBL_OpenTuna_Installer.7z |