mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
7d37a255fe
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.3.2 to 2.3.3. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/72f2c25fcb47643c292f7107632f7a47c1df5cd8...6cbd405e2c4e67a21c47fa9e383d020e4e28b836) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: 2.3.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
488 lines
16 KiB
YAML
488 lines
16 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
# For testing.
|
|
- actions
|
|
tags:
|
|
- "v*.*"
|
|
paths-ignore:
|
|
- '*.{txt,md}'
|
|
- 'Tools/**'
|
|
- '.{editorconfig,gitattributes,gitignore}'
|
|
- 'appveyor.yml'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '*.{txt,md}'
|
|
- 'Tools/**'
|
|
- '.{editorconfig,gitattributes,gitignore}'
|
|
- 'appveyor.yml'
|
|
|
|
env:
|
|
BUILD_CONFIGURATION: Release
|
|
|
|
jobs:
|
|
build-windows:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [x64, ARM64]
|
|
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Add MSBuild to PATH
|
|
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
|
|
|
- name: Check Valid Version Tags
|
|
id: valid-tags
|
|
shell: bash
|
|
run: |
|
|
# This is required for git describe --always to work for git-version.cpp.
|
|
git fetch --deepen=15000 --no-recurse-submodules --tags || exit 0
|
|
echo "count=$(git tag -l 'v[0-9]*' | wc -l | tr -d ' ')" >> $GITHUB_OUTPUT # $env:GITHUB_OUTPUT on pwsh
|
|
|
|
- name: Fetch upstream tags # Fallback to fetching tags from upstream
|
|
if: steps.valid-tags.outputs.count == '0'
|
|
shell: bash
|
|
run: |
|
|
# TODO: should try to fetch tags from whereever this repo was forked from before fetching from official repo
|
|
git remote add upstream https://github.com/hrydgard/ppsspp.git
|
|
git fetch --deepen=15000 --no-recurse-submodules --tags --force upstream || exit 0
|
|
|
|
- name: Create git-version.cpp for Windows # Not sure why the one at git-version-gen.cmd couldn't get the version properly.
|
|
#if: github.ref_type == 'tag'
|
|
run: |
|
|
$GIT_VERSION=git describe --always
|
|
echo "Num of Valid Tags = ${{ steps.valid-tags.outputs.count }}"
|
|
echo "Test GitVer = ${{ github.ref_name }} / $GIT_VERSION / ${GITHUB_REF_NAME}"
|
|
echo "const char *PPSSPP_GIT_VERSION = `"$GIT_VERSION`";" > git-version.cpp
|
|
echo "#define PPSSPP_GIT_VERSION_NO_UPDATE 1" >> git-version.cpp
|
|
|
|
# Generate Windows/win-version.h too.
|
|
if ($GIT_VERSION.StartsWith("v")) {
|
|
$WIN_VERSION_COMMA=$GIT_VERSION -replace '^v', '' -replace '-g[0-9a-f]+$', '' -replace '[-\.]', ','
|
|
echo "Test WinVer = $WIN_VERSION_COMMA"
|
|
echo "#define PPSSPP_WIN_VERSION_STRING `"$GIT_VERSION`"" > Windows/win-version.h
|
|
echo "#define PPSSPP_WIN_VERSION_COMMA $WIN_VERSION_COMMA" >> Windows/win-version.h
|
|
echo "#define PPSSPP_WIN_VERSION_NO_UPDATE 1" >> Windows/win-version.h
|
|
}
|
|
|
|
- name: Build Windows
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: msbuild /m /p:TrackFileAccess=false /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ matrix.platform }} Windows/PPSSPP.sln
|
|
|
|
- name: Package build
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: |
|
|
mkdir ppsspp
|
|
cp PPSSPP*.exe ppsspp/
|
|
cp *.pdb ppsspp/
|
|
cp Windows/*.bat ppsspp/
|
|
cp -r assets ppsspp/assets
|
|
|
|
- name: Package headless (non-Win32)
|
|
if: matrix.platform != 'Win32'
|
|
run: cp Windows/${{ matrix.platform }}/Release/*.exe ppsspp/
|
|
|
|
- name: Package headless (Win32)
|
|
if: matrix.platform == 'Win32'
|
|
run: cp Windows/Release/*.exe ppsspp/
|
|
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Windows ${{ matrix.platform }} build
|
|
path: ppsspp/
|
|
|
|
- name: Create release
|
|
if: github.ref_type == 'tag'
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: |
|
|
rm ppsspp/PPSSPPHeadless*
|
|
rm ppsspp/UnitTest*
|
|
rm ppsspp/*.pdb
|
|
mkdir releases
|
|
Compress-Archive -Path "ppsspp/*" -Update -DestinationPath "releases/PPSSPP-${{ github.ref_name }}-Windows-${{ matrix.platform }}.zip"
|
|
|
|
- name: Upload release
|
|
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
|
if: github.ref_type == 'tag'
|
|
with:
|
|
files: releases/*.zip
|
|
|
|
build-uwp:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Add MSBuild to PATH
|
|
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
|
|
|
- name: Build UWP
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: msbuild /m /p:TrackFileAccess=false /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=x64 /p:AppxPackageSigningEnabled=false UWP/PPSSPP_UWP.sln
|
|
|
|
test-windows:
|
|
runs-on: windows-latest
|
|
needs: build-windows
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: false
|
|
|
|
- name: Fetch tests
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
# Doing this to avoid ffmpeg and other large submodules.
|
|
run: git submodule update --init pspautotests assets/lang
|
|
|
|
- name: Download build
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: Windows x64 build
|
|
path: ppsspp/
|
|
|
|
- name: Execute unit tests
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: ppsspp\\UnitTest.exe ALL
|
|
|
|
- name: Execute headless tests
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: python test.py -g --graphics=software
|
|
|
|
build:
|
|
name: build (${{ matrix.id }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
extra: test
|
|
cc: clang
|
|
cxx: clang++
|
|
args: ./b.sh --headless --unittest
|
|
id: clang-normal
|
|
- os: ubuntu-latest
|
|
cc: gcc
|
|
cxx: g++
|
|
args: ./b.sh --headless --unittest
|
|
id: gcc-normal
|
|
|
|
- os: ubuntu-latest
|
|
extra: android
|
|
cc: clang
|
|
cxx: clang++
|
|
args: cd android && ./ab.sh -j2 APP_ABI=arm64-v8a UNITTEST=1 HEADLESS=1
|
|
id: android-arm64
|
|
- os: ubuntu-latest
|
|
extra: android
|
|
cc: clang
|
|
cxx: clang++
|
|
args: cd android && ./ab.sh -j2 APP_ABI=armeabi-v7a UNITTEST=1 HEADLESS=1
|
|
id: android-arm32
|
|
- os: ubuntu-latest
|
|
extra: android
|
|
cc: clang
|
|
cxx: clang++
|
|
args: cd android && ./ab.sh -j2 APP_ABI=x86_64 UNITTEST=1 HEADLESS=1
|
|
id: android-x86_64
|
|
- os: ubuntu-latest
|
|
extra: android
|
|
cc: clang
|
|
cxx: clang++
|
|
args: cd android && ./ab.sh -j2 APP_ABI=arm64-v8a OPENXR=1
|
|
id: android-vr
|
|
- os: ubuntu-latest
|
|
extra: android
|
|
cc: clang
|
|
cxx: clang++
|
|
args: ./b.sh --libretro_android ppsspp_libretro
|
|
id: android-libretro
|
|
|
|
- os: ubuntu-latest
|
|
extra: qt
|
|
cc: gcc
|
|
cxx: g++
|
|
args: ./b.sh --qt
|
|
id: qt
|
|
- os: ubuntu-latest
|
|
extra: libretro
|
|
cc: gcc
|
|
cxx: g++
|
|
args: make -C libretro -f Makefile -j2
|
|
id: gcc-libretro
|
|
- os: ubuntu-latest
|
|
extra: libretro
|
|
cc: clang
|
|
cxx: clang++
|
|
args: make -C libretro -f Makefile -j2
|
|
id: clang-libretro
|
|
|
|
- os: macos-latest
|
|
extra: test
|
|
cc: clang
|
|
cxx: clang++
|
|
args: ./b.sh --headless --unittest --fat --no-png --no-sdl2
|
|
id: macos
|
|
- os: macos-latest
|
|
extra: ios
|
|
cc: clang
|
|
cxx: clang++
|
|
args: ./b-ios.sh
|
|
id: ios
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Fetch tags for macOS releases
|
|
if: runner.os == 'macOS'
|
|
# This is required for git describe --always to work for git-version.cpp.
|
|
run: |
|
|
git fetch --deepen=15000 --no-recurse-submodules --tags || exit 0
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005 # v4.3.0
|
|
if: matrix.extra == 'qt'
|
|
with:
|
|
cache: true
|
|
version: 5.15.2
|
|
|
|
- name: Setup Android NDK
|
|
uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 # v1.5.0
|
|
if: matrix.extra == 'android'
|
|
id: setup-ndk
|
|
with:
|
|
ndk-version: r21e
|
|
|
|
- name: Install Linux dependencies
|
|
if: runner.os == 'Linux' && matrix.extra != 'android'
|
|
run: |
|
|
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
|
|
sudo apt-get update -y -qq
|
|
sudo apt-get install libsdl2-dev libgl1-mesa-dev libglu1-mesa-dev libsdl2-ttf-dev libfontconfig1-dev
|
|
|
|
- name: Install iOS dependencies
|
|
if: matrix.id == 'ios'
|
|
run: |
|
|
brew install ldid dpkg pillow
|
|
# Check Xcode version
|
|
xcodebuild -version
|
|
# List available Xcode versions
|
|
ls /Applications | grep Xcode
|
|
sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
|
|
|
|
- name: Create iOS Version.txt file
|
|
if: matrix.id == 'ios'
|
|
run: |
|
|
# Create Version.txt file (should probably do this during building process)
|
|
mkdir -p build-ios/PPSSPP.app
|
|
GIT_VERSION=$(git describe --always --tags)
|
|
echo ${GIT_VERSION#v} > build-ios/PPSSPP.app/Version.txt
|
|
|
|
- name: Create macOS & iOS git-version.cpp for tagged release
|
|
if: github.ref_type == 'tag' && (matrix.id == 'macos' || matrix.id == 'ios')
|
|
run: |
|
|
echo "const char *PPSSPP_GIT_VERSION = \"${GITHUB_REF_NAME}\";" > git-version.cpp
|
|
echo "#define PPSSPP_GIT_VERSION_NO_UPDATE 1" >> git-version.cpp
|
|
|
|
- name: Setup ccache
|
|
uses: hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 # v1.2.18
|
|
# Disable ccache on macos for now, it's become buggy for some reason.
|
|
if: matrix.id != 'macos'
|
|
with:
|
|
key: ${{ matrix.id }}
|
|
|
|
- name: Execute build
|
|
env:
|
|
CC: ${{ matrix.cc }}
|
|
CXX: ${{ matrix.cxx }}
|
|
NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
NDK_CCACHE: ccache
|
|
USE_CCACHE: 1
|
|
run: |
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
export CCACHE_SLOPPINESS=clang_index_store,ivfsoverlay,include_file_ctime,include_file_mtime,modules,system_headers,time_macros
|
|
if [ "${{ matrix.extra }}" == "android" ]; then
|
|
export CCACHE_FILECLONE=true
|
|
export CCACHE_DEPEND=true
|
|
export CCACHE_COMPILERCHECK=content
|
|
elif [ "$RUNNER_OS" == "macOS" ]; then
|
|
export CCACHE_SLOPPINESS=pch_defines,$CCACHE_SLOPPINESS
|
|
export CCACHE_FILECLONE=true
|
|
export CCACHE_DEPEND=true
|
|
export CCACHE_COMPILERCHECK=content
|
|
fi
|
|
${{ matrix.args }}
|
|
|
|
- name: Package build
|
|
if: matrix.extra == 'test' || matrix.id == 'ios'
|
|
run: |
|
|
mkdir -p ppsspp
|
|
if [ -e build*/$BUILD_CONFIGURATION/PPSSPPSDL ]; then
|
|
cp build*/$BUILD_CONFIGURATION/PPSSPPSDL ppsspp/
|
|
elif [ -e build*/PPSSPPSDL.app ]; then
|
|
cp -a build*/PPSSPPSDL.app ppsspp/
|
|
# GitHub Actions zipping kills symlinks and permissions.
|
|
pushd ppsspp
|
|
zip -qry PPSSPPSDL.zip PPSSPPSDL.app
|
|
rm -rf PPSSPPSDL.app
|
|
popd
|
|
elif [ -e build-ios/PPSSPP.app ]; then
|
|
# Get the final files generated by b-ios.h script
|
|
find build -name 'PPSSPP*.ipa' -exec cp -a '{}' ppsspp/ \;
|
|
find build -name 'PPSSPP*.xcarchive' -exec cp -a '{}' ppsspp/ \;
|
|
find build -name 'PPSSPP*.deb' -exec cp -a '{}' ppsspp/ \;
|
|
find build -name 'org.ppsspp*.deb' -exec cp -a '{}' ppsspp/ \;
|
|
elif [ -e build*/PPSSPPSDL ]; then
|
|
cp build*/PPSSPPSDL ppsspp/
|
|
cp -r assets ppsspp/assets
|
|
fi
|
|
if [ -e build*/$BUILD_CONFIGURATION/PPSSPPHeadless ]; then
|
|
cp build*/$BUILD_CONFIGURATION/PPSSPPHeadless ppsspp/
|
|
elif [ -e build*/PPSSPPHeadless ]; then
|
|
cp build*/PPSSPPHeadless ppsspp/
|
|
fi
|
|
if [ -e build*/$BUILD_CONFIGURATION/PPSSPPUnitTest ]; then
|
|
cp build*/$BUILD_CONFIGURATION/PPSSPPUnitTest ppsspp/
|
|
elif [ -e build*/PPSSPPUnitTest ]; then
|
|
cp build*/PPSSPPUnitTest ppsspp/
|
|
fi
|
|
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v4
|
|
if: matrix.extra == 'test'
|
|
with:
|
|
name: ${{ matrix.os }} build
|
|
path: ppsspp/
|
|
|
|
- name: Upload iOS build
|
|
uses: actions/upload-artifact@v4
|
|
if: matrix.id == 'ios'
|
|
with:
|
|
name: ${{ matrix.id }} build
|
|
path: ppsspp/
|
|
|
|
- name: Create macOS release
|
|
if: github.ref_type == 'tag' && matrix.id == 'macos'
|
|
working-directory: ppsspp
|
|
run: mv PPSSPPSDL.zip PPSSPPSDL-macOS-${GITHUB_REF_NAME}.zip
|
|
|
|
- name: Upload macOS & iOS release
|
|
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
|
if: github.ref_type == 'tag' && (matrix.id == 'macos' || matrix.id == 'ios')
|
|
with:
|
|
files: |
|
|
ppsspp/*.zip
|
|
ppsspp/*.ipa
|
|
ppsspp/*.deb
|
|
body: >
|
|
PPSSPP is a cross-platform PSP emulator.
|
|
Visit PPSSPP [official website](https://ppsspp.org)
|
|
for a [full changelog](https://ppsspp.org/index.html#news)
|
|
as well as the [downloads section](https://ppsspp.org/downloads.html)
|
|
for other platforms.
|
|
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
needs: build
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: false
|
|
|
|
- name: Fetch tests
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
# Doing this to avoid ffmpeg and other large submodules.
|
|
run: git submodule update --init pspautotests assets/lang
|
|
|
|
- name: Install Linux dependencies
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
|
|
sudo apt-get update -y -qq
|
|
sudo apt-get install libsdl2-dev libgl1-mesa-dev libglu1-mesa-dev libsdl2-ttf-dev libfontconfig1-dev
|
|
|
|
- name: Install macOS dependencies
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
git submodule update --init SDL/macOS
|
|
|
|
- name: Download build
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: ${{ matrix.os }} build
|
|
path: ppsspp/
|
|
|
|
# Not sure where it's ending up, but test.py can't find it...
|
|
- name: Fix headless permissions
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: |
|
|
cp `find . -name PPSSPPHeadless` .
|
|
chmod +x PPSSPPHeadless
|
|
cp `find . -name PPSSPPUnitTest` .
|
|
chmod +x PPSSPPUnitTest
|
|
|
|
- name: Execute unit tests
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: ./PPSSPPUnitTest ALL
|
|
|
|
- name: Execute headless tests
|
|
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
|
run: python test.py -g --graphics=software
|
|
|
|
test-headless-alpine:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: alpine:latest
|
|
options: --shm-size=8g
|
|
steps:
|
|
- name: Install Linux dependencies (Alpine)
|
|
run: |
|
|
apk add build-base wget git bash cmake python3 glu-dev sdl2-dev
|
|
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Fix git detected dubious ownership in repository
|
|
run: |
|
|
chown -R $(id -u):$(id -g) $PWD
|
|
|
|
- name: Setup ccache
|
|
uses: hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 # v1.2.18
|
|
|
|
- name: Compile ffmpeg
|
|
run: |
|
|
cd ffmpeg && ./linux_x86-64.sh
|
|
|
|
- name: Build for testing
|
|
run: |
|
|
./b.sh --headless --unittest
|
|
|
|
- name: Execute unit tests
|
|
run: |
|
|
./build/PPSSPPUnitTest ALL
|
|
|
|
- name: Execute headless tests
|
|
run: |
|
|
python test.py -g --graphics=software
|