Skip to content

Commit

Permalink
Merge pull request #18616 from anr2me/manual_generate_uwp
Browse files Browse the repository at this point in the history
[Workflow] Manually Generate UWP MSIX/MSIXBundle on-demand
  • Loading branch information
hrydgard committed Dec 28, 2023
2 parents a9a670f + 7ea7515 commit 851be72
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/manual_generate_apk.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Manual Generate APK
name: Manual Generate Android APK
on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
cp android/build/*/apk/*/*/android-normal-debug.apk ppsspp/
fi
- name: Upload APK
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: android-${{ github.event.inputs.buildVariant }} build
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/manual_generate_ipa.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Manual Generate IPA
name: Manual Generate iOS IPA
on:
workflow_dispatch:
inputs:
Expand All @@ -14,7 +14,7 @@ on:

jobs:

apk:
ipa:
name: Generate ${{ github.event.inputs.buildVariant }} IPA
runs-on: macos-latest

Expand Down Expand Up @@ -50,6 +50,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ios
create-symlink: true

- name: Execute build
Expand All @@ -76,7 +77,7 @@ jobs:
cd -
fi
- name: Upload IPA
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: iOS-${{ github.event.inputs.buildVariant }} build
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/manual_generate_uwp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Manual Generate UWP MSIX/MSIXBundle
on:
workflow_dispatch:
inputs:

buildConfiguration:
type: choice
description: 'Build Configuration'
required: true
default: 'Release'
options:
- Release
- Debug

buildPlatform:
type: choice
description: 'Build Platform'
required: true
default: 'Bundle'
options:
- Bundle
- x64
- ARM64
- ARM

jobs:

build-uwp:
name: Generate ${{ github.event.inputs.buildConfiguration }} ${{ github.event.inputs.buildPlatform }} UWP
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1

#- name: Setup cache # We probably need something like MSBuildCache for MSBuild to be able to use cache properly
# id: cache-uwp
# uses: actions/cache@v3
# with:
# path: |
# UWP/${{ github.event.inputs.buildPlatform }}/${{ github.event.inputs.buildConfiguration }}/**
# key: uwp-${{ github.event.inputs.buildConfiguration }}-${{ github.event.inputs.buildPlatform }}

- name: Testing values
run: |
# Testing values ...
#env
echo "Content of [env.GITHUB_WORKSPACE] = ${env.GITHUB_WORKSPACE}"
echo "Content of [[env.GITHUB_WORKSPACE]] = ${{env.GITHUB_WORKSPACE}}"
echo "Content of [env:GITHUB_WORKSPACE] = ${env:GITHUB_WORKSPACE}"
echo "Content of [github.workspace] = ${github.workspace}"
echo "Content of [[github.workspace]] = ${{github.workspace}}"
echo "double ${{ github.event.inputs.buildConfiguration }}"
echo ${{github.workspace}}
echo "single ${ github.event.inputs.buildConfiguration }"
echo $env:GITHUB_WORKSPACE
- name: Execute MSIX build
working-directory: ${{ github.workspace }}
env:
INCLUDE_SYMBOLS: ${{ github.event.inputs.buildConfiguration == 'Debug' && 'true' || 'false' }}
if: ${{ github.event.inputs.buildPlatform != 'Bundle' }}
run: |
echo "include symbols = ${{ env.INCLUDE_SYMBOLS }}"
msbuild UWP/PPSSPP_UWP.sln /m /p:TrackFileAccess=false /p:Configuration=${{ github.event.inputs.buildConfiguration }} /p:Platform=${{ github.event.inputs.buildPlatform }} /p:IncludeSymbols=${{ env.INCLUDE_SYMBOLS }} /p:AppxSymbolPackageEnabled=${{ env.INCLUDE_SYMBOLS }} /p:AppxPackageSigningEnabled=true /p:PackageCertificateKeyFile=PPSSPP_UWP_TemporaryKey.pfx /p:AppxBundle=Never /p:UapAppxPackageBuildMode=SideloadOnly /p:AppxBundlePlatforms="${{ github.event.inputs.buildPlatform }}"
- name: Execute MSIXBundle build
working-directory: ${{ github.workspace }}
env:
INCLUDE_SYMBOLS: ${{ github.event.inputs.buildConfiguration == 'Debug' && 'true' || 'false' }}
if: ${{ github.event.inputs.buildPlatform == 'Bundle' }}
run: |
echo "include symbols = ${{ env.INCLUDE_SYMBOLS }}"
msbuild UWP/PPSSPP_UWP.sln /m /p:TrackFileAccess=false /p:Configuration=${{ github.event.inputs.buildConfiguration }} /p:Platform=x64 /p:IncludeSymbols=${{ env.INCLUDE_SYMBOLS }} /p:AppxSymbolPackageEnabled=${{ env.INCLUDE_SYMBOLS }} /p:AppxPackageSigningEnabled=true /p:PackageCertificateKeyFile=PPSSPP_UWP_TemporaryKey.pfx /p:AppxBundle=Always /p:UapAppxPackageBuildMode=SideloadOnly /p:AppxBundlePlatforms="x64|ARM64|ARM"
- name: Package build
working-directory: ${{ github.workspace }}
run: |
# Testing file location ...
#find . -name "PPSSPP*.exe"
#find . -name "*.appx*"
#find . -name "*.msix*"
mkdir ppsspp
#ls UWP/AppPackages/PPSSPP_UWP
cp -r UWP/AppPackages/PPSSPP_UWP/*.* ppsspp/
#ls ppsspp
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: UWP-${{ github.event.inputs.buildConfiguration }}-${{ github.event.inputs.buildPlatform }} build
path: ppsspp/

0 comments on commit 851be72

Please sign in to comment.