2021-11-20 15:18:27 +00:00
|
|
|
name: Windows UWP CI
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-03-26 08:51:35 +00:00
|
|
|
runs-on: windows-latest
|
2021-11-20 15:18:27 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
2021-11-20 17:24:21 +00:00
|
|
|
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg/bincache
|
2021-11-20 15:18:27 +00:00
|
|
|
|
|
|
|
steps:
|
2021-12-23 21:31:13 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-20 15:18:27 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: bootstrap vcpkg
|
2021-11-20 17:24:21 +00:00
|
|
|
run: |
|
2021-11-20 15:18:27 +00:00
|
|
|
git clone https://github.com/microsoft/vcpkg
|
2021-11-20 17:24:21 +00:00
|
|
|
mkdir vcpkg\bincache
|
|
|
|
vcpkg\bootstrap-vcpkg.bat
|
|
|
|
|
2021-12-23 21:31:13 +00:00
|
|
|
- uses: actions/cache@v3
|
2021-11-20 17:24:21 +00:00
|
|
|
with:
|
|
|
|
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
|
|
|
|
key: vcpkg-${{ hashFiles( 'vcpkg.json' ) }}
|
2021-11-20 15:18:27 +00:00
|
|
|
|
|
|
|
- name: CMake
|
|
|
|
run: |
|
2022-07-01 10:16:30 +00:00
|
|
|
cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.22000.0 -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DCMAKE_CROSSCOMPILING=OFF -DUSE_VULKAN=OFF -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake
|
2021-11-20 15:18:27 +00:00
|
|
|
cmake --build build --config Release --parallel 2
|
|
|
|
shell: cmd
|
|
|
|
|
2021-11-20 18:13:55 +00:00
|
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
|
2021-11-20 15:18:27 +00:00
|
|
|
- name: Package app
|
|
|
|
run: |
|
|
|
|
mkdir build\artifact
|
2021-11-26 17:08:41 +00:00
|
|
|
cd build\AppPackages\flycast\flycast_*_x64_Test
|
2021-11-20 15:18:27 +00:00
|
|
|
mkdir tmp
|
2021-11-26 17:08:41 +00:00
|
|
|
ren *.msix flycast.msix
|
|
|
|
makeappx.exe unpack /p .\flycast.msix /d tmp
|
2021-11-20 15:18:27 +00:00
|
|
|
copy ..\..\..\Release\*.dll tmp
|
|
|
|
makeappx pack /d tmp /p ..\..\..\artifact\flycast.appx
|
2021-11-29 17:22:25 +00:00
|
|
|
|
|
|
|
- name: Sign app
|
|
|
|
run: signtool sign /f shell\uwp\sign_cert.pfx /p '${{ secrets.SIGN_CERT_PWD }}' /v /fd SHA256 build\artifact\flycast.appx
|
|
|
|
if: github.repository == 'flyinghead/flycast' && github.event_name == 'push'
|
2021-11-20 15:18:27 +00:00
|
|
|
|
2021-12-23 21:31:13 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-20 15:18:27 +00:00
|
|
|
with:
|
|
|
|
name: flycast-uwp
|
|
|
|
path: build/artifact
|
2021-12-18 10:50:03 +00:00
|
|
|
|
|
|
|
- name: Configure AWS Credentials
|
|
|
|
id: aws-credentials
|
|
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
with:
|
|
|
|
aws-access-key-id: AKIAJOZQS4H2PHQWYFCA
|
|
|
|
aws-secret-access-key: ${{ secrets.S3_SECRET_KEY }}
|
|
|
|
aws-region: us-east-2
|
|
|
|
if: github.repository == 'flyinghead/flycast' && github.event_name == 'push'
|
|
|
|
|
|
|
|
- name: Upload to S3
|
|
|
|
run: aws s3 sync build/artifact s3://flycast-builds/xbox/${GITHUB_REF#refs/}-$GITHUB_SHA --acl public-read --follow-symlinks
|
|
|
|
shell: bash
|
|
|
|
if: ${{ steps.aws-credentials.outputs.aws-account-id != '' }}
|