Release version v1.5.0 #1074
Workflow file for this run
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: Build wiliwili | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
ssh_darwin: | |
description: 'SSH connection to Darwin' | |
required: false | |
default: 'false' | |
ssh_ubuntu: | |
description: 'SSH connection to Ubuntu' | |
required: false | |
default: 'false' | |
arm_flatpak: | |
description: 'build flatpak (aarch64)' | |
required: false | |
default: 'false' | |
universal_macos: | |
description: 'build macos (universal)' | |
required: false | |
default: 'false' | |
release: | |
description: 'Push a new release' | |
required: false | |
default: 'false' | |
version: | |
description: 'Version' | |
required: false | |
default: '0.0.0' | |
disable_unity_build: | |
description: 'Disable unity build' | |
required: false | |
default: 'false' | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.info.outputs.version }} | |
standard_version: ${{ steps.info.outputs.standard_version }} | |
DIST_EXE: ${{ steps.info.outputs.DIST_EXE }} | |
DIST_UWP: ${{ steps.info.outputs.DIST_UWP }} | |
DIST_NRO: ${{ steps.info.outputs.DIST_NRO }} | |
DIST_PS4: ${{ steps.info.outputs.DIST_PS4 }} | |
DIST_DMG_PREFIX: ${{ steps.info.outputs.DIST_DMG_PREFIX }} | |
DIST_INTEL_DMG: ${{ steps.info.outputs.DIST_INTEL_DMG }} | |
DIST_INTEL_OLD_DMG: ${{ steps.info.outputs.DIST_INTEL_OLD_DMG }} | |
DIST_ARM_DMG: ${{ steps.info.outputs.DIST_ARM_DMG }} | |
DIST_UNIVERSAL_DMG: ${{ steps.info.outputs.DIST_UNIVERSAL_DMG }} | |
DIST_FLATPAK_X86_64: ${{ steps.info.outputs.DIST_FLATPAK_X86_64 }} | |
DIST_FLATPAK_AARCH64_GL: ${{ steps.info.outputs.DIST_FLATPAK_AARCH64_GL }} | |
DIST_FLATPAK_AARCH64_GLES2: ${{ steps.info.outputs.DIST_FLATPAK_AARCH64_GLES2 }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Debug version | |
run: | | |
export VERSION=`git rev-parse --short HEAD` | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: Release version | |
if: github.event.inputs.release == 'true' && github.event.inputs.release != 'false' && !cancelled() | |
run: | | |
export VERSION="${{ github.event.inputs.version }}" | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: Version | |
id: info | |
env: | |
VERSION: ${{ env.VERSION }} | |
run: | | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_EXE=wiliwili-Windows-${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_UWP=wiliwili-windows-x64-uwp-${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_NRO=wiliwili-NintendoSwitch-${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_PS4=wiliwili-PS4-${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_DMG_PREFIX=wiliwili-macOS" >> $GITHUB_OUTPUT | |
echo "DIST_INTEL_DMG=wiliwili-macOS-IntelChip-${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_INTEL_OLD_DMG=wiliwili-macOS-IntelChip_10.11-${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_ARM_DMG=wiliwili-macOS-AppleSilicon-${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_UNIVERSAL_DMG=wiliwili-macOS-Universal-${VERSION}" >> $GITHUB_OUTPUT | |
echo "DIST_FLATPAK_X86_64=wiliwili-Linux-${VERSION}-x86_64" >> $GITHUB_OUTPUT | |
echo "DIST_FLATPAK_AARCH64_GL=wiliwili-Linux-${VERSION}-gl-aarch64" >> $GITHUB_OUTPUT | |
echo "DIST_FLATPAK_AARCH64_GLES2=wiliwili-Linux-${VERSION}-gles2-aarch64" >> $GITHUB_OUTPUT | |
echo $VERSION | |
echo "${{ github.event.inputs.version }}" | |
release: | |
needs: [ build-win, build-switch, build-macos, build-flatpak, version ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
- name: Package exe | |
if: github.event.inputs.release == 'true' && !cancelled() | |
run: | | |
tree | |
zip -r -9 ${{ needs.version.outputs.DIST_EXE }}-x86_64.zip ${{ needs.version.outputs.DIST_EXE }}-d3d-x86_64 | |
zip -r -9 ${{ needs.version.outputs.DIST_EXE }}-x86.zip ${{ needs.version.outputs.DIST_EXE }}-d3d-x86 | |
- name: Upload Release | |
if: github.event.inputs.release == 'true' && !cancelled() | |
uses: ncipollo/release-action@v1 | |
with: | |
name: wiliwili ${{ github.event.inputs.version }} | |
tag: ${{ github.event.inputs.version }} | |
omitBodyDuringUpdate: true | |
body: This release is built by github-action. | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
artifacts: > | |
${{ needs.version.outputs.DIST_EXE }}-x86_64.zip | |
${{ needs.version.outputs.DIST_EXE }}-x86.zip | |
${{ needs.version.outputs.DIST_NRO }}/${{ needs.version.outputs.DIST_NRO }}.tar.gz | |
${{ needs.version.outputs.DIST_INTEL_DMG }}/${{ needs.version.outputs.DIST_INTEL_DMG }}.dmg | |
${{ needs.version.outputs.DIST_ARM_DMG }}/${{ needs.version.outputs.DIST_ARM_DMG }}.dmg | |
${{ needs.version.outputs.DIST_UNIVERSAL_DMG }}/${{ needs.version.outputs.DIST_UNIVERSAL_DMG }}.dmg | |
${{ needs.version.outputs.DIST_FLATPAK_X86_64 }}/${{ needs.version.outputs.DIST_FLATPAK_X86_64 }}.flatpak | |
build-win: | |
needs: [ version ] | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { arch: x86_64, msystem: MINGW64, driver: gl } | |
- { arch: x86_64, msystem: MINGW64, driver: d3d, cmake: "-DUSE_D3D11=ON" } | |
- { arch: x86, msystem: MINGW32, driver: gl, cmake: "-DUSE_GL2=ON" } | |
- { arch: x86, msystem: MINGW32, driver: d3d, cmake: "-DUSE_D3D11=ON" } | |
arch: [ x86_64, x86 ] | |
driver: [gl, d3d] | |
env: | |
MSYSTEM: ${{ matrix.msystem }} | |
MSYS2_PATH_TYPE: inherit | |
defaults: | |
run: | |
shell: C:\shells\msys2bash.cmd {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Install dependency | |
run: | | |
pacman -S --needed --noconfirm --noprogressbar \ | |
${MINGW_PACKAGE_PREFIX}-gcc \ | |
${MINGW_PACKAGE_PREFIX}-ninja unzip | |
curl -LO https://github.com/xfangfang/wiliwili/releases/download/v0.1.0/${MINGW_PACKAGE_PREFIX}-mpv-0.39.0-4-any.pkg.tar.zst | |
pacman -U --noconfirm *.pkg.tar.zst | |
curl -LO https://github.com/rainers/cv2pdb/releases/download/v0.52/cv2pdb-0.52.zip | |
unzip cv2pdb-0.52.zip cv2pdb64.exe -d /usr/bin | |
- if: matrix.arch == 'x86' | |
name: Config Editbin | |
shell: powershell | |
run: | | |
$vcvarsall_path = vswhere.exe -latest -products * -find "VC\Auxiliary\Build\vcvarsall.bat" | |
$cc1_path = Get-ChildItem -Path "C:\msys64\mingw32\lib\gcc" -Filter cc1plus.exe -Recurse -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName } | |
cmd.exe /c "call ""$vcvarsall_path"" x86_amd64 && editbin /LARGEADDRESSAWARE $cc1_path" | |
- name: Update gamepad db | |
run: | | |
BRLS_GLFW=library/borealis/library/lib/extern/glfw | |
cmake -P ${BRLS_GLFW}/CMake/GenerateMappings.cmake ${BRLS_GLFW}/src/mappings.h.in ${BRLS_GLFW}/src/mappings.h | |
- name: Build dependency | |
run: | | |
curl -sL https://github.com/webmproject/libwebp/archive/v1.4.0.tar.gz | tar zxf - -C /tmp | |
cd /tmp/libwebp-1.4.0 | |
cmake -B build -G Ninja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DWEBP_BUILD_ANIM_UTILS=OFF \ | |
-DWEBP_BUILD_CWEBP=OFF \ | |
-DWEBP_BUILD_DWEBP=OFF \ | |
-DWEBP_BUILD_GIF2WEBP=OFF \ | |
-DWEBP_BUILD_IMG2WEBP=OFF \ | |
-DWEBP_BUILD_VWEBP=OFF \ | |
-DWEBP_BUILD_WEBPINFO=OFF \ | |
-DWEBP_BUILD_WEBPMUX=OFF \ | |
-DWEBP_BUILD_LIBWEBPMUX=OFF \ | |
-DWEBP_BUILD_EXTRAS=OFF | |
cmake --build build | |
cmake --install build | |
curl -sL https://curl.se/download/curl-8.7.1.tar.xz | tar Jxf - -C /tmp | |
cd /tmp/curl-8.7.1 | |
cmake -B build -G Ninja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DHTTP_ONLY=ON \ | |
-DCURL_USE_SCHANNEL=ON \ | |
-DCURL_DISABLE_PROGRESS_METER=ON \ | |
-DBUILD_CURL_EXE=OFF \ | |
-DBUILD_TESTING=OFF \ | |
-DBUILD_LIBCURL_DOCS=OFF \ | |
-DUSE_LIBIDN2=OFF \ | |
-DUSE_WIN32_IDN=ON \ | |
-DCURL_USE_LIBSSH2=OFF \ | |
-DCURL_USE_LIBPSL=OFF \ | |
-DZLIB_USE_STATIC_LIBS=ON | |
cmake --build build | |
cmake --install build | |
- name: Build | |
run: | | |
cmake -B build -G Ninja ${{ matrix.cmake }} \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-DPLATFORM_DESKTOP=ON \ | |
-DWIN32_TERMINAL=OFF \ | |
-DUSE_SYSTEM_CURL=ON \ | |
-DUSE_LIBROMFS=ON \ | |
-DBRLS_UNITY_BUILD=${{ github.event.inputs.disable_unity_build == 'true' && 'OFF' || 'ON' }} \ | |
-DCMAKE_UNITY_BUILD_BATCH_SIZE=20 \ | |
-DZLIB_USE_STATIC_LIBS=ON \ | |
-DMPV_BUNDLE_DLL=${MINGW_PREFIX}/bin/libmpv-2.dll \ | |
-DVERSION_BUILD=${{ github.run_number }} | |
cmake --build build | |
cv2pdb64 build/wiliwili.exe | |
cp -a README.md build | |
- name: Upload dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ needs.version.outputs.DIST_EXE }}-${{ matrix.driver }}-${{ matrix.arch }} | |
path: | | |
build/wiliwili.exe | |
build/wiliwili.pdb | |
build/README.md | |
# build-win-uwp: | |
# needs: [ version ] | |
# runs-on: windows-2022 | |
# steps: | |
# - name: Install NSIS | |
# shell: powershell | |
# run: | | |
# Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content | |
# - uses: actions/checkout@v4 | |
# with: | |
# submodules: recursive | |
# fetch-depth: 0 | |
# - name: Cache xmake packages | |
# uses: actions/cache@v4 | |
# with: | |
# key: ${{ runner.os }}-xmake | |
# path: | | |
# ${{ runner.temp }}/.xmake/packages | |
# - name: build | |
# shell: powershell | |
# env: | |
# VERSION: ${{ needs.version.outputs.VERSION }} | |
# run: | | |
# $env:path+=";$env:USERPROFILE\xmake" | |
# $env:XMAKE_GLOBALDIR="${{ runner.temp }}" | |
# xmake f -c -y -v --sw=y --winrt=y --window=sdl --driver=d3d11 | |
# xmake b -y -v wiliwili | |
# cp winrt/key.pfx build/ | |
# cp winrt/docs/key.pdf build/key.pdf | |
# - uses: actions/upload-artifact@v4 | |
# with: | |
# name: ${{ needs.version.outputs.DIST_UWP }} | |
# path: | | |
# build/wiliwili.msix | |
# build/key.pfx | |
# build/key.pdf | |
build-switch: | |
needs: [ version ] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { driver: opengl } | |
- { driver: deko3d, shuffix: "_deko3d" } | |
driver: [opengl, deko3d] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Disable unity build | |
if: ${{ github.event.inputs.disable_unity_build == 'true' }} | |
run: | | |
sed -i 's/BRLS_UNITY_BUILD=ON/BRLS_UNITY_BUILD=OFF/' scripts/build_switch${{ matrix.shuffix }}.sh | |
- name: Build Nro | |
run: | | |
docker run --rm -v $(pwd):/data devkitpro/devkita64:20241022 bash -c "/data/scripts/build_switch${{ matrix.shuffix }}.sh" | |
- name: Upload dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ needs.version.outputs.DIST_NRO }}${{ matrix.shuffix }} | |
path: "cmake-build-switch/wiliwili.nro" | |
build-ps4: | |
needs: [ version ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Build | |
run: | | |
docker run --rm -v $(pwd):/src/ xfangfang/wiliwili_ps4_builder:latest \ | |
"git config --global --add safe.directory /src && | |
cmake -B cmake-build-ps4 -DPLATFORM_PS4=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DMPV_NO_FB=ON \ | |
-DBRLS_UNITY_BUILD=${{ github.event.inputs.disable_unity_build == 'true' && 'OFF' || 'ON' }} \ | |
-DCMAKE_UNITY_BUILD_BATCH_SIZE=16 && \ | |
make -C cmake-build-ps4 -j$(nproc)" | |
- name: Upload dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ needs.version.outputs.DIST_PS4 }} | |
path: "cmake-build-ps4/*.pkg" | |
- name: Upload oelf | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ps4_dev_oelf | |
path: "cmake-build-ps4/*.oelf" | |
build-macos: | |
needs: [ version ] | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
include: | |
- { arch: IntelChip, name: IntelChip } | |
- { arch: IntelChip_Old, name: IntelChip_10.11 } | |
- { arch: AppleSilicon, name: AppleSilicon } | |
- { arch: Universal, name: Universal } | |
# Don't fail the whole workflow if one architecture fails | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: install deps | |
if: matrix.arch != 'Universal' || ( matrix.arch == 'Universal' && github.event.inputs.universal_macos == 'true') | |
run: | | |
brew install create-dmg dylibbundler | |
brew tap xfangfang/wiliwili | |
brew install -v mpv-wiliwili | |
- name: SSH connection to Actions | |
uses: P3TERX/[email protected] | |
if: (github.event.inputs.ssh_darwin == 'true' && github.event.inputs.ssh_darwin != 'false') || contains(github.event.action, 'ssh_darwin') | |
env: | |
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
- name: Update gamepad mappings | |
if: matrix.arch != 'Universal' || ( matrix.arch == 'Universal' && github.event.inputs.universal_macos == 'true') | |
id: gamepad | |
run: | | |
BRLS_GLFW="library/borealis/library/lib/extern/glfw" | |
cmake -P ${BRLS_GLFW}/CMake/GenerateMappings.cmake ${BRLS_GLFW}/src/mappings.h.in ${BRLS_GLFW}/src/mappings.h | |
- name: Build | |
if: matrix.arch != 'Universal' || ( matrix.arch == 'Universal' && github.event.inputs.universal_macos == 'true') | |
id: compile | |
run: | | |
cmake -B build \ | |
-DPLATFORM_DESKTOP=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DMAC_${{ matrix.arch }}=ON \ | |
-DMAC_DOWNLOAD_DYLIB=ON \ | |
-DBRLS_UNITY_BUILD=${{ github.event.inputs.disable_unity_build == 'true' && 'OFF' || 'ON' }} \ | |
-DCMAKE_UNITY_BUILD_BATCH_SIZE=16 | |
make -C build wiliwili.app -j$(sysctl -n hw.ncpu) | |
- name: Name | |
if: matrix.arch != 'Universal' || ( matrix.arch == 'Universal' && github.event.inputs.universal_macos == 'true') | |
id: name | |
run: | | |
echo "DMG=${{ needs.version.outputs.DIST_DMG_PREFIX }}-${{ matrix.name }}-${{ needs.version.outputs.version }}" >> $GITHUB_OUTPUT | |
- name: Bundle | |
if: matrix.arch != 'Universal' || ( matrix.arch == 'Universal' && github.event.inputs.universal_macos == 'true') | |
id: bundle | |
run: | | |
mkdir -p dist | |
mv build/wiliwili.app dist/ | |
cp ./scripts/mac/readme.txt dist/readme.txt | |
create-dmg --window-pos 200 120 --window-size 800 400 \ | |
--icon-size 100 --icon "wiliwili.app" 200 190 \ | |
--icon "readme.txt" 400 100 --hide-extension "wiliwili.app" \ | |
--app-drop-link 600 185 --volicon ./scripts/mac/dmg.icns \ | |
--volname "wiliwili (${{ needs.version.outputs.version }})" ${{ steps.name.outputs.DMG }}.dmg "dist/" | |
- name: Upload dist | |
if: matrix.arch != 'Universal' || ( matrix.arch == 'Universal' && github.event.inputs.universal_macos == 'true') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.name.outputs.DMG }} | |
path: "${{ steps.name.outputs.DMG }}.dmg" | |
build-flatpak: | |
needs: [ version ] | |
runs-on: ubuntu-latest | |
container: | |
image: bilelmoussaoui/flatpak-github-actions:freedesktop-24.08 | |
options: --privileged | |
strategy: | |
matrix: | |
arch: [ x86_64, aarch64 ] | |
driver: [ gl, gles2 ] | |
exclude: | |
- arch: x86_64 | |
driver: gles2 | |
# Don't fail the whole workflow if one architecture fails | |
fail-fast: false | |
env: | |
FLATPAK_NAME: wiliwili-Linux-${{ needs.version.outputs.version }}.flatpak | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
if: matrix.arch == 'x86_64' || ( matrix.arch == 'aarch64' && github.event.inputs.arm_flatpak == 'true') | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Add OpenGL ES 2.0 build option | |
if: matrix.driver == 'gles2' && ( matrix.arch == 'x86_64' || ( matrix.arch == 'aarch64' && github.event.inputs.arm_flatpak == 'true' ) ) | |
run: | | |
sed -i 's/USE_GLES2=OFF/USE_GLES2=ON/' .flatpak-manifest.yml | |
- name: Disable unity build | |
if: ( github.event.inputs.disable_unity_build == 'true' ) && ( matrix.arch == 'x86_64' || ( matrix.arch == 'aarch64' && github.event.inputs.arm_flatpak == 'true') ) | |
run: | | |
sed -i 's/BRLS_UNITY_BUILD=ON/BRLS_UNITY_BUILD=OFF/' .flatpak-manifest.yml | |
- name: Rename package | |
if: matrix.arch == 'aarch64' | |
run: | | |
echo "FLATPAK_NAME=wiliwili-Linux-${{ needs.version.outputs.version }}-${{ matrix.driver }}.flatpak" >> $GITHUB_ENV | |
- name: Install docker | |
if: ${{ matrix.arch == 'aarch64' }} | |
run: | | |
dnf -y install docker | |
- name: Install deps | |
id: dep | |
if: matrix.arch == 'x86_64' || ( matrix.arch == 'aarch64' && github.event.inputs.arm_flatpak == 'true') | |
run: | | |
dnf -y install cmake | |
BRLS_GLFW="library/borealis/library/lib/extern/glfw/" | |
cmake -P ${BRLS_GLFW}/CMake/GenerateMappings.cmake ${BRLS_GLFW}/src/mappings.h.in ${BRLS_GLFW}/src/mappings.h | |
echo "FLATPAK_NAME=${FLATPAK_NAME}" >> $GITHUB_OUTPUT | |
echo ${FLATPAK_NAME} | |
- name: Set up QEMU | |
id: qemu | |
if: matrix.arch == 'aarch64' && github.event.inputs.arm_flatpak == 'true' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- uses: xfangfang/flatpak-github-actions/flatpak-builder@master | |
if: matrix.arch == 'x86_64' || ( matrix.arch == 'aarch64' && github.event.inputs.arm_flatpak == 'true') | |
with: | |
bundle: ${{ steps.dep.outputs.FLATPAK_NAME }} | |
manifest-path: .flatpak-manifest.yml | |
cache-key: flatpak-builder-${{ matrix.driver }}-${{ hashFiles('.flatpak-manifest.yml') }} | |
verbose: true | |
arch: ${{ matrix.arch }} | |
upload-artifact: false | |
- uses: actions/upload-artifact@v4 | |
if: matrix.arch == 'x86_64' || ( matrix.arch == 'aarch64' && github.event.inputs.arm_flatpak == 'true') | |
with: | |
name: wiliwili-Linux-${{ needs.version.outputs.version }}-${{ matrix.arch }} | |
path: ${{ steps.dep.outputs.FLATPAK_NAME }} | |
if-no-files-found: error | |
build-vita: | |
needs: [ version ] | |
name: build-psv | |
runs-on: ubuntu-latest | |
container: | |
image: vitasdk/vitasdk:latest | |
steps: | |
- name: Install build requirements | |
run: | | |
apk update | |
apk add cmake ninja meson pkgconf bash git zstd tar | |
git config --global --add safe.directory $(pwd) | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- uses: actions/cache/restore@v4 | |
id: restore-pvr-cache | |
with: | |
path: /vita/dependencies | |
key: SDL-vita-pvr-3.9 | |
- name: Download PVR_PSP2 (GLES) | |
if: ${{ !steps.restore-pvr-cache.outputs.cache-hit }} | |
run: | | |
pvr_psp2_version=3.9 | |
mkdir -p /vita/dependencies/include | |
mkdir -p /vita/dependencies/lib | |
mkdir -p /vita/dependencies/suprx | |
# Configure PVR_PSP2 headers | |
wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp | |
unzip /tmp/v$pvr_psp2_version.zip -d/tmp | |
cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* /vita/dependencies/include | |
rm /tmp/v$pvr_psp2_version.zip | |
# include guard of PVR_PSP2's khrplatform.h does not match the usual one | |
sed -i -e s/__drvkhrplatform_h_/__khrplatform_h_/ /vita/dependencies/include/KHR/khrplatform.h | |
# Configure PVR_PSP2 stub libraries | |
wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp | |
unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs | |
find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} /vita/dependencies/lib \; | |
rm /tmp/vitasdk_stubs.zip | |
rm -rf /tmp/pvr_psp2_stubs | |
# Configure PVR_PSP2 *.suprx | |
wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/PSVita_Release.zip -P/tmp | |
unzip /tmp/PSVita_Release.zip -d/tmp/PSVita_Release | |
rm /tmp/PSVita_Release/libGLESv1_CM.suprx | |
rm /tmp/PSVita_Release/libpvr2d.suprx | |
mv /tmp/PSVita_Release/*.suprx /vita/dependencies/suprx/ | |
rm -rf /tmp/PSVita_Release.zip | |
rm -rf /tmp/PSVita_Release | |
- uses: actions/cache/save@v4 | |
if: ${{ !steps.restore-pvr-cache.outputs.cache-hit }} | |
with: | |
path: /vita/dependencies | |
key: SDL-vita-pvr-3.9 | |
- name: Copy PVR_PSP2 (GLES) to vita toolchain dir | |
run: | | |
cp -rv /vita/dependencies/* ${VITASDK}/arm-vita-eabi | |
mv /vita/dependencies/suprx/*.suprx scripts/psv/module/ | |
ls -lah ${VITASDK}/arm-vita-eabi | |
ls -lah scripts/psv/module/ | |
- uses: actions/cache/restore@v4 | |
id: restore-common-deps-cache | |
with: | |
path: /vita/common_deps | |
key: Dep-vita-${{ hashFiles('**/VITABUILD') }} | |
- name: Install VDPM Dependencies | |
run: vdpm mbedtls libass harfbuzz fribidi freetype libpng libwebp | |
- name: Build Dependencies | |
if: ${{ !steps.restore-common-deps-cache.outputs.cache-hit }} | |
run: | | |
mkdir -p /vita/common_deps | |
apk add patch | |
adduser --gecos '' --disabled-password builder | |
echo 'builder ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/builder | |
chown -R builder:builder $(pwd)/scripts/psv | |
su - builder -c "cd $(pwd)/scripts/psv/ffmpeg && vita-makepkg" | |
su - builder -c "cd $(pwd)/scripts/psv/curl && vita-makepkg" | |
su - builder -c "cd $(pwd)/scripts/psv/sdl2 && vita-makepkg" | |
vdpm $(pwd)/scripts/psv/ffmpeg/*-arm.tar.xz | |
vdpm $(pwd)/scripts/psv/sdl2/*-arm.tar.xz | |
touch /tmp/vdpm_install_ffmpeg | |
touch /tmp/vdpm_install_sdl2 | |
su - builder -c "cd $(pwd)/scripts/psv/mpv && vita-makepkg" | |
mv $(pwd)/scripts/psv/curl/*-arm.tar.xz /vita/common_deps/ | |
mv $(pwd)/scripts/psv/sdl2/*-arm.tar.xz /vita/common_deps/ | |
mv $(pwd)/scripts/psv/ffmpeg/*-arm.tar.xz /vita/common_deps/ | |
mv $(pwd)/scripts/psv/mpv/*-arm.tar.xz /vita/common_deps/ | |
ls -lah /vita/common_deps/ | |
- uses: actions/cache/save@v4 | |
if: ${{ !steps.restore-common-deps-cache.outputs.cache-hit }} | |
with: | |
path: /vita/common_deps | |
key: Dep-vita-${{ hashFiles('**/VITABUILD') }} | |
- name: Install Dependencies | |
run: vdpm /vita/common_deps/*-arm.tar.xz | |
- name: Bulid wiliwili | |
run: | | |
cmake -S . -B build -G Ninja \ | |
-DPLATFORM_PSV=ON \ | |
-DUSE_SYSTEM_CURL=ON \ | |
-DUSE_SYSTEM_SDL2=ON \ | |
-DMPV_NO_FB=ON \ | |
-DSIMPLE_HIGHLIGHT=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DBRLS_UNITY_BUILD=${{ github.event.inputs.disable_unity_build == 'true' && 'OFF' || 'ON' }} \ | |
-DCMAKE_UNITY_BUILD_BATCH_SIZE=16 \ | |
-DCMAKE_CXX_FLAGS="-Wno-error=pedantic -Wno-psabi" | |
cmake --build build --verbose | |
mv build/wiliwili.self build/eboot.bin | |
- name: Upload vpk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wiliwili-PSVita-${{ needs.version.outputs.VERSION }} | |
path: build/wiliwili.vpk | |
- name: Upload eboot | |
uses: actions/upload-artifact@v4 | |
with: | |
name: psv_dev_eboot.bin | |
path: build/eboot.bin | |
- name: Upload elf | |
uses: actions/upload-artifact@v4 | |
with: | |
name: psv_dev_elf | |
path: build/wiliwili |