.github/workflows/build_aarch64.yml #4
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
# Controls when the workflow will run | |
on: | |
# Allows you to run this workflow manually ftarget the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
name: ${{ matrix.output }} | |
strategy: | |
matrix: | |
include: | |
- { buildtype: 'playdate', repo: 'joyrider3774/formula1_playdate', output: 'formula_1', binarycopy: '', assetscopy: '', downloadsecret: '', downloadsecretcmd: '', codesecret: 'FORMULA1_PLAYDATE_CODEKEY', codesecretfile: 'src/codekey.h', makecommand: '"SRC_C_DIR=src/srcgame src/srcgame/scoresubmit" SCREENRESX=320 SCREENRESY=240 WINDOWSCALE=2 SCALINGMODE=0'} | |
- { buildtype: 'playdate', repo: 'joyrider3774/checkers_playdate', output: 'checkers', binarycopy: '', assetscopy: '', downloadsecret: '', downloadsecretcmd: '', codesecret: '', codesecretfile: '', makecommand: 'CPP_BUILD=1 SCREENRESX=320 SCREENRESY=240 WINDOWSCALE=2 SCALINGMODE=0'} | |
- { buildtype: 'playdate', repo: 'joyrider3774/dynamate_playdate', output: 'dynamate', binarycopy: '', assetscopy: '', downloadsecret: '', downloadsecretcmd: '', codesecret: '', codesecretfile: '', makecommand: 'CPP_BUILD=1 SCREENRESX=320 SCREENRESY=240 WINDOWSCALE=2 SCALINGMODE=0'} | |
- { buildtype: 'playdate', repo: 'joyrider3774/blockdude_playdate', output: 'blockdude', binarycopy: '', assetscopy: '', downloadsecret: '', downloadsecretcmd: '', codesecret: '', codesecretfile: '', makecommand: ''} | |
- { buildtype: 'playdate', repo: 'joyrider3774/puztrix_playdate', output: 'puztrix', binarycopy: '', assetscopy: '', downloadsecret: '', downloadsecretcmd: '', codesecret: 'PUZTRIX_PLAYDATE_CODEKEY', codesecretfile: 'src/codekey.h', makecommand: '"SRC_C_DIR=src/srcgame/scoresubmit/src/playdate/C_API/scoresubmit" "SRC_CPP_DIR=src/srcgame src/srcstub/sdl_rotate src/srcstub/gfx_primitives_surface src/srcstub/bump src/srcstub/bump/src src/srcstub src/srcstub/pd_api"'} | |
- { buildtype: 'playdate', repo: 'joyrider3774/puzzleland_playdate', output: 'puzzleland', binarycopy: '', assetscopy: '', downloadsecret: 'PUZZLELAND_MUSIC', downloadsecretcmd: 'unzip download && mv music Source/music', codesecret: '', codesecretfile: '', makecommand: '"SRC_C_DIR=src/srcgame src/srcgame/gameobjects src/srcgame/gamestates" SCREENRESX=320 SCREENRESY=240 WINDOWSCALE=2 SCALINGMODE=0' } | |
- { buildtype: 'playdate', repo: 'joyrider3774/rubido_playdate', output: 'rubido', binarycopy: '', assetscopy: '', downloadsecret: '', downloadsecretcmd: '', codesecret: '', codesecretfile: '', makecommand: 'SCREENRESX=320 SCREENRESY=240 WINDOWSCALE=2 SCALINGMODE=0'} | |
- { buildtype: 'playdate', repo: 'joyrider3774/waternet_playdate', output: 'waternet', binarycopy: '', assetscopy: '', downloadsecret: '', downloadsecretcmd: '', codesecret: '', codesecretfile: '', makecommand: ''} | |
- { buildtype: 'vanilla', repo: 'joyrider3774/RetroTime', output: 'retrotime', binarycopy: 'retrotime', assetscopy: 'retrotimefs', downloadsecret: '', downloadsecretcmd: '', codesecret: '', codesecretfile: '', makecommand: 'CXX=/opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin/aarch64-linux-g++ NOX11=1 SDL2CONFIG=/opt/aarch64-buildroot-linux-gnu_sdk-buildroot/aarch64-buildroot-linux-gnu/sysroot/usr/bin/sdl2-config LDLIBS="`/opt/aarch64-buildroot-linux-gnu_sdk-buildroot/aarch64-buildroot-linux-gnu/sysroot/usr/bin/sdl2-config --libs` -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lSDL2_gfx -lSDL2 -lpthread -lstdc++" "DEFINES=-DRG35XX_PLUS_BATOCERA" FULLMENUTRANSPARANCY=1'} | |
- { buildtype: 'vanilla', repo: 'joyrider3774/Znax', output: 'znax', binarycopy: 'znax', assetscopy: 'znaxfs', downloadsecret: '', downloadsecretcmd: '', codesecret: '', codesecretfile: '', makecommand: 'CXX=/opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin/aarch64-linux-g++ NOX11=1 SDL2CONFIG=/opt/aarch64-buildroot-linux-gnu_sdk-buildroot/aarch64-buildroot-linux-gnu/sysroot/usr/bin/sdl2-config LDLIBS="`/opt/aarch64-buildroot-linux-gnu_sdk-buildroot/aarch64-buildroot-linux-gnu/sysroot/usr/bin/sdl2-config --libs` -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lSDL2_gfx -lSDL2 -lpthread -lstdc++" "DEFINES=-DRG35XX_PLUS_BATOCERA"'} | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: get SDK | |
uses: wei/wget@v1 | |
with: | |
args: -O rg35xx_plus_aarch64.tgz https://github.com/joyrider3774/sdks/releases/download/v1.0/aarch64-buildroot-linux-gnu_sdk-buildroot.tar.gz | |
- name: setup SDK | |
run: | | |
tar -xzvf ./rg35xx_plus_aarch64.tgz | |
sudo mv ./aarch64-buildroot-linux-gnu_sdk-buildroot /opt/ | |
- if: ${{ matrix.buildtype == 'playdate'}} | |
name: Checkout Playdate SDL2 Api Sources | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
repository: 'joyrider3774/Playdate_Api_SDL2' | |
- name: Checkout game sources sources | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
repository: ${{matrix.repo}} | |
path: tmp | |
- if: ${{ (matrix.codesecret != '') && (matrix.codesecretfile != '')}} | |
name: Setup Secret codekey.h File | |
env: | |
SECRET: ${{secrets[matrix.codesecret] }} | |
run : | | |
echo "$SECRET" | base64 --decode > tmp/${{matrix.codesecretfile}} | |
- if: ${{ matrix.buildtype== 'playdate'}} | |
name: move things to correct directories playdate | |
run: | | |
rm -rf ./src/srcgame | |
mv tmp/src ./src/srcgame | |
cp -Rf tmp/Source/. ./Source | |
- if: ${{ (matrix.downloadsecret != '') && (matrix.downloadsecretcmd != '')}} | |
name: run secret download | |
uses: wei/wget@v1 | |
with: | |
args: -O download ${{ secrets[matrix.downloadsecret] }} | |
- if: ${{ (matrix.downloadsecret != '') && (matrix.downloadsecretcmd != '')}} | |
name: run secret download cmd | |
run: | | |
${{matrix.downloadsecretcmd}} | |
rm download | |
- if: ${{ matrix.buildtype == 'playdate'}} | |
name: Build Game Playdate | |
run: | | |
make PLATFORM=rg35xx_plus_batocera_aarch64 DEFAULTSOURCEDIR=1 ${{matrix.makecommand }} | |
- if: ${{ matrix.buildtype == 'vanilla'}} | |
name: Build Game Vanilla | |
run: | | |
cd tmp | |
make ${{matrix.makecommand }} | |
- name: prepare artificat directory | |
run: | | |
mkdir artifact_dir | |
- if: ${{ matrix.buildtype == 'playdate'}} | |
name: Move Source Folder | |
run: | | |
mv Source "./artifact_dir/${{ matrix.output }}" | |
- name: copy metadata | |
run: | | |
cp -rf "tmp/metadata/rg35xxplusbatocera/"* "./artifact_dir/" | |
- if: ${{ matrix.binarycopy != ''}} | |
name: copy binary | |
run: | | |
mkdir -p artifact_dir/${{ matrix.output }} | |
cp "tmp/${{ matrix.binarycopy}}" "./artifact_dir/${{ matrix.output }}/${{ matrix.binarycopy }}" | |
- if: ${{ matrix.assetscopy != ''}} | |
name: copy assets | |
run: | | |
mkdir -p artifact_dir/${{ matrix.output }} | |
cp -Rf "tmp/${{ matrix.assetscopy}}" "./artifact_dir/${{ matrix.output }}" | |
- name: Store build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.output }} - RG35XX_Plus_Batocera_cfw_aarch64 | |
path: artifact_dir/ |