Merge branch 'schismtracker:master' into master #3
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: Wii U (devkitPro) | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
wiiu: | |
runs-on: ubuntu-latest | |
env: | |
UTF8PROC_VERSION: 2.9.0 | |
UTF8PROC_SHA256: bd215d04313b5bc42c1abedbcb0a6574667e31acee1085543a232204e36384c4 | |
container: | |
image: devkitpro/devkitppc:latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
with: | |
path: schismtracker | |
- name: 'Install build dependencies' | |
run: | | |
apt-get update | |
apt-get install -y ninja-build autoconf automake libtool libsdl2-dev | |
- name: 'Get date of latest commit' | |
id: date | |
run: | | |
cd schismtracker | |
echo "date=$(git log -n 1 --date=short --format=format:%cd | sed 's/\(....\)-\(..\)-\(..\).*/\1\2\3/')" >> $GITHUB_OUTPUT | |
cd .. | |
# This uses my own fork of SDL until the keyboard patches get merged | |
- name: 'Checkout SDL2' | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: 'mrpapersonic/SDL' | |
ref: 'wiiu-sdl2-2.28' | |
path: SDL | |
# this has to be after so it can check the current commit from my branch | |
- name: 'Cache dependencies' | |
id: cache-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: '/github/home/wiiuprefix' | |
key: wiiu-dependencies-SDL_${{ steps.checkout.outputs.commit }}-UTF8PROC_${{ env.UTF8PROC_VERSION }} | |
- name: 'Build SDL2' | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
run: | | |
cd SDL | |
export PATH="${DEVKITPRO}/portlibs/wiiu/bin:${DEVKITPPC}/bin:$PATH" | |
powerpc-eabi-cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME/wiiuprefix" | |
cmake --build build --verbose | |
cmake --install build | |
cd .. | |
- name: 'Download utf8proc' | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
run: | | |
wget -O "utf8proc-$UTF8PROC_VERSION.tar.gz" "https://github.com/JuliaStrings/utf8proc/releases/download/v$UTF8PROC_VERSION/utf8proc-$UTF8PROC_VERSION.tar.gz" | |
echo "$UTF8PROC_SHA256 utf8proc-$UTF8PROC_VERSION.tar.gz" | sha256sum -c - | |
tar xzvf "utf8proc-$UTF8PROC_VERSION.tar.gz" | |
- name: 'Build utf8proc' | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
run: | | |
cd utf8proc-$UTF8PROC_VERSION | |
# PIC is broken under libwut | |
patch -p1 < ../schismtracker/.github/patches/utf8proc/1-disable-pic.patch | |
mkdir build | |
cd build | |
export PATH="${DEVKITPRO}/portlibs/wiiu/bin:${DEVKITPPC}/bin:$PATH" | |
powerpc-eabi-cmake -DCMAKE_INSTALL_PREFIX="$HOME/wiiuprefix" .. | |
make | |
make install | |
cd ../.. | |
- name: 'Build Schism' | |
run: | | |
cd schismtracker | |
autoreconf -i | |
mkdir build | |
cd build | |
export PATH="${DEVKITPRO}/portlibs/wiiu/bin:${DEVKITPPC}/bin:$PATH" | |
# disable FLAC support for now, because compiling with it gives | |
# errors when making an rpx (PIC is enabled...) | |
FLAC_LIBS="-L${DEVKITPRO}/portlibs/ppc/lib -lFLAC -logg" PKG_CONFIG=pkg-config PKG_CONFIG_LIBDIR="$HOME/wiiuprefix/lib/pkgconfig:${DEVKITPRO}/portlibs/wiiu/lib/pkgconfig:${DEVKITPRO}/portlibs/ppc/lib/pkgconfig" ../configure --host=powerpc-eabi --without-flac --enable-force-wiiu --enable-sdl2-linking | |
make | |
powerpc-eabi-strip -S schismtracker.elf | |
make schismtracker.wuhb | |
- name: 'Upload binaries' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: schismtracker-${{ steps.date.outputs.date }}-wiiu | |
path: | | |
schismtracker/build/schismtracker.elf | |
schismtracker/build/schismtracker.wuhb |