Skip to content

CI

CI #333

Workflow file for this run

name: CI
on:
repository_dispatch:
types: [Component_update]
push:
branches:
- '*'
tags:
- 'v*'
paths-ignore:
- '**.MD'
- '**.gitkeep'
- '**.gitignore'
pull_request:
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@v4
- 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: 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/
- 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@v4
with:
name: PS2BBL
path: |
release/*
# - name: last week changelog
# run: |
# git --no-pager log --pretty=format:"- %h:%as %>(18)%an: %s" --since="Last Week">CHANGELOG
# echo CHANGELOG=$(cat CHANGELOG) >> $GITHUB_ENV
# echo ${{ env.CHANGELOG }}
- uses: ClementTsang/[email protected]
if: github.ref == 'refs/heads/main'
with:
delete_release: true
tag_name: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
prerelease: true
generate_release_notes: true
tag_name: "latest"
name: "Latest development build"
files: |
PS2BBL.7z
body: |
![dl](https://img.shields.io/github/downloads/israpps/PlayStation2-Basic-BootLoader/latest/total?style=for-the-badge&logo=github)
[![info](https://img.shields.io/badge/not%20sure%20what%20to%20download%3F-Click%20Here-000000?style=for-the-badge&logo=github)](https://israpps.github.io/PlayStation2-Basic-BootLoader/Downloads/)
${{ env.CHANGELOG }}
- name: notify on discord
if: github.ref == 'refs/heads/main'
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_FEED }}
content: "## PS2BBL has been updated!\nread the changelog here: https://github.com/israpps/PlayStation2-Basic-BootLoader/releases/tag/latest\n### [Download Page](https://israpps.github.io/PlayStation2-Basic-BootLoader/Downloads/)"
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/[email protected]
- 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/SYS-CONF/PS2BBL.INI Funtuna-Fork/installer/INSTALLER_CONTENTS/SYS-CONF/PS2BBL.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_OPENTUNA
path: |
release/PS2BBL_OpenTuna_Installer.ELF
# - name: last week changelog
# run: |
# git --no-pager log --pretty=format:"- %h:%as %>(18)%an: %s" --since="Last Week">CHANGELOG
# echo CHANGELOG=$(cat CHANGELOG) >> $GITHUB_ENV
# echo ${{ env.CHANGELOG }}
- uses: ClementTsang/[email protected]
if: github.ref == 'refs/heads/main'
with:
delete_release: true
tag_name: opentuna
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
prerelease: true
generate_release_notes: true
tag_name: "opentuna"
name: "Latest PS2BBL + OpenTuna"
files: |
PS2BBL_OpenTuna_Installer.7z
body: |
![dl](https://img.shields.io/github/downloads/israpps/PlayStation2-Basic-BootLoader/latest/total?style=for-the-badge&logo=github)
[![info](https://img.shields.io/badge/not%20sure%20what%20to%20download%3F-Click%20Here-000000?style=for-the-badge&logo=github)](https://israpps.github.io/PlayStation2-Basic-BootLoader/Downloads/)
${{ env.CHANGELOG }}