move init & some IOP ops to different source file #368
This file contains hidden or 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' | |
| 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: Compile PS2 MMCE build | |
| run: | | |
| make release COMMIT_HASH=${GITHUB_SHA::7} BINDIR=PS2_MMCE/ MMCE=1 ${{ env.DEBUG }} PRINTF=${{ github.event.inputs.name }} | |
| - name: Compile PSX MMCE build | |
| run: | | |
| make release COMMIT_HASH=${GITHUB_SHA::7} BINDIR=PSX_MMCE/ PSX=1 MMCE=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 PS2_MMCE/ release/PS2_MMCE/ | |
| mv PSX_MMCE/ release/PSX_MMCE/ | |
| - 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: Create prerelease | |
| if: github.ref == 'refs/heads/main' | |
| uses: mathieucarbou/marvinpinto-action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| prerelease: true | |
| automatic_release_tag: "latest" | |
| title: "Latest development build" | |
| files: | | |
| PS2BBL.7z | |
| - name: notify on discord | |
| if: github.ref == 'refs/heads/main' | |
| uses: tsickert/discord-webhook@v5.3.0 | |
| 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/download-artifact@v4.1.7 | |
| - 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@v4 | |
| 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 }} | |
| - name: Create prerelease | |
| if: github.ref == 'refs/heads/main' | |
| uses: mathieucarbou/marvinpinto-action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| prerelease: true | |
| automatic_release_tag: "opentuna" | |
| title: "Latest PS2BBL + OpenTuna" | |
| files: | | |
| PS2BBL_OpenTuna_Installer.7z |