Skip to content

New Plugin: FrameTime Logger #438

New Plugin: FrameTime Logger

New Plugin: FrameTime Logger #438

Workflow file for this run

name: Build modules
on:
push:
paths-ignore:
- "**/*.md"
- '**/*.txt'
pull_request:
paths-ignore:
- "**/*.md"
- '**/*.txt'
workflow_dispatch:
# for release create
permissions:
contents: write
concurrency:
group: ${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
build_prx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Checkout SDK
uses: actions/checkout@v3
with:
repository: GoldHEN/GoldHEN_Plugins_SDK
path: SDK
- name: Checkout mxml
uses: actions/checkout@v3
with:
repository: illusion0001/mxml
ref: patch-1
path: mxml
- name: Setup variables
run: |
echo "llvm_ver=12.0" >> $GITHUB_ENV
echo "llvm_path=$RUNNER_TOOL_CACHE/llvm" >> $GITHUB_ENV
echo "OO_PS4_TOOLCHAIN=$GITHUB_WORKSPACE/OpenOrbis/PS4Toolchain" >> $GITHUB_ENV
echo "commit_ver=1.$(git rev-list HEAD --count)" >> $GITHUB_ENV
echo "toolchain_url=https://github.com/illusion0001/OpenOrbis-PS4-Toolchain/releases/download/0.0.1.487/toolchain.tar.gz" >> $GITHUB_ENV
- name: Cache OpenOrbis Toolchain
id: cache-oosdk
uses: actions/cache@v3
with:
path: ${{ env.OO_PS4_TOOLCHAIN }}
key: ${{ runner.os }}-oosdk-${{ env.toolchain_url }}
# temporary release until 0.53 is released
- name: Download OpenOrbis Toolchain
if: steps.cache-oosdk.outputs.cache-hit != 'true'
run: curl -sL ${{ env.toolchain_url }} | tar xz -C ./
- name: Cache LLVM and Clang (${{ env.llvm_ver }})
id: cache-llvm
uses: actions/cache@v3
with:
path: ${{ env.llvm_path }}
key: llvm-${{ env.llvm_ver }}
- name: Install LLVM and Clang (${{ env.llvm_ver }})
uses: KyleMayes/install-llvm-action@v1
with:
version: ${{ env.llvm_ver }}
directory: ${{ env.llvm_path }}
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Install mini xml
working-directory: mxml/ps4
run: |
wget https://raw.githubusercontent.com/bucanero/oosdk_libraries/master/build_rules.mk -O $OO_PS4_TOOLCHAIN/build_rules.mk
make install PRX_BUILD=1
- name: Export path to SDK
working-directory: SDK
run: echo "GOLDHEN_SDK=$(pwd)" >> $GITHUB_ENV
- name: Build (Release)
run: make
- name: Build (Debug)
run: make DEBUG=1
- name: Push module artifact (Release prx)
uses: actions/upload-artifact@v3
with:
name: goldplugins_${{ env.commit_ver }}_prx_final
path: bin/plugins/prx_final/*
if-no-files-found: error
- name: Push module artifact (Release elf)
uses: actions/upload-artifact@v3
with:
name: goldplugins_${{ env.commit_ver }}_elf_final
path: bin/plugins/elf_final/*.elf
if-no-files-found: error
- name: Push module artifact (Debug prx)
uses: actions/upload-artifact@v3
with:
name: goldplugins_${{ env.commit_ver }}_prx_debug
path: bin/plugins/prx_debug/*
if-no-files-found: error
- name: Push module artifact (Debug elf)
uses: actions/upload-artifact@v3
with:
name: goldplugins_${{ env.commit_ver }}_elf_debug
path: bin/plugins/elf_debug/*.elf
if-no-files-found: error
- name: Prepare Release
if: |
github.event_name == 'workflow_dispatch' &&
github.repository == 'GoldHEN/GoldHEN_Plugins_Repository'
run: |
# Excluding non user related plugins from release
BUILD=plugins
cd bin/plugins
mv prx_final $BUILD
chmod -R 0777 $BUILD
BUILD_MD5="md5.txt"
BUILD_SHA256="sha256.txt"
echo "MD5:" > $BUILD/$BUILD_MD5
echo "SHA256:" > $BUILD/$BUILD_SHA256
FILES="$BUILD/*.prx"
for f in $FILES
do
if [[ "$f" == "$BUILD/game_call_example.prx" ]] ||
[[ "$f" == "$BUILD/plugin_loader.prx" ]] ||
[[ "$f" == "$BUILD/plugin_template.prx" ]]; then
echo "[+] Skipping $f"
rm $f
continue
fi
echo "$(sha256sum $f)" >> $BUILD/$BUILD_SHA256
echo "$(md5sum $f)" >> $BUILD/$BUILD_MD5
done
cat $BUILD/$BUILD_MD5
cat $BUILD/$BUILD_SHA256
# Create zip
commit_hash=$(echo ${GITHUB_SHA} | cut -c1-8)
ZIP_NAME=GoldPlugins-${{ env.commit_ver }}-$commit_hash
CFG=plugins.ini
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
echo "; Note: lines starting with semicolon are for comments." > $CFG
echo "; Load plugins for any title." >> $CFG
echo "" >> $CFG
echo "[default]" >> $CFG
echo "/data/GoldHEN/plugins/game_patch.prx" >> $CFG
echo "" >> $CFG
echo "; Load plugins only for Playroom." >> $CFG
echo "" >> $CFG
echo "[CUSA00001]" >> $CFG
echo "/data/GoldHEN/plugins/afr.prx" >> $CFG
echo "/data/GoldHEN/plugins/no_share_watermark.prx" >> $CFG
zip -r $ZIP_NAME.zip plugins/* $CFG
echo "<details>" > hash.md
echo "<summary>Plugin Hashes (Click to Expand)</summary>" >> hash.md
echo "" >> hash.md
echo "\`\`\`md5" >> hash.md
cat plugins/md5.txt >> hash.md
echo "\`\`\`" >> hash.md
echo "" >> hash.md
echo "\`\`\`sha256" >> hash.md
cat plugins/sha256.txt >> hash.md
echo "\`\`\`" >> hash.md
echo "" >> hash.md
echo "</details>" >> hash.md
- name: Create Release
if: |
github.event_name == 'workflow_dispatch' &&
github.repository == 'GoldHEN/GoldHEN_Plugins_Repository'
working-directory: bin/plugins
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ env.commit_ver }} ${{ env.ZIP_NAME }}.zip --target ${{ GITHUB.SHA }} -t "${{ env.commit_ver }}" -F hash.md