2022-05-14 05:56:57 +00:00
|
|
|
name: Windows Build Steps - wxWidgets
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
jobName:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
os:
|
|
|
|
required: false
|
|
|
|
type: string
|
2022-11-20 05:03:59 +00:00
|
|
|
default: windows-2022
|
2022-05-14 05:56:57 +00:00
|
|
|
platform:
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
default: x64
|
|
|
|
simd:
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
default: AVX2
|
2022-05-23 03:33:32 +00:00
|
|
|
buildSystem:
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
default: msbuild
|
2022-05-14 05:56:57 +00:00
|
|
|
configuration:
|
|
|
|
required: true
|
|
|
|
type: string
|
2022-08-04 19:33:37 +00:00
|
|
|
cheats_url:
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
|
2022-05-14 05:56:57 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_windows_wx:
|
|
|
|
name: ${{ inputs.jobName }}
|
|
|
|
runs-on: ${{ inputs.os }}
|
|
|
|
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
|
|
|
|
timeout-minutes: 60
|
|
|
|
env:
|
|
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Prepare Artifact Metadata
|
|
|
|
id: artifact-metadata
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
OS: windows
|
2022-05-23 03:33:32 +00:00
|
|
|
BUILD_SYSTEM: ${{ inputs.buildSystem }}
|
2022-05-14 05:56:57 +00:00
|
|
|
GUI_FRAMEWORK: wxWidgets
|
|
|
|
ARCH: ${{ inputs.platform }}
|
|
|
|
SIMD: ${{ inputs.simd }}
|
|
|
|
EVENT_NAME: ${{ github.event_name }}
|
|
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
|
|
PR_NUM: ${{ github.event.pull_request.number }}
|
|
|
|
PR_SHA: ${{ github.event.pull_request.head.sha }}
|
|
|
|
run: ./.github/workflows/scripts/common/name-artifacts.sh
|
|
|
|
|
|
|
|
- name: Setup msbuild
|
|
|
|
if: inputs.configuration != 'CMake'
|
|
|
|
uses: microsoft/setup-msbuild@v1
|
|
|
|
|
2022-08-04 19:33:37 +00:00
|
|
|
- name: Download cheats
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
cd bin/resources
|
|
|
|
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
|
|
|
|
|
2022-05-14 05:56:57 +00:00
|
|
|
- name: Generate CMake
|
|
|
|
if: inputs.configuration == 'CMake'
|
|
|
|
id: cmake
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
if "${{ inputs.platform }}"=="Win32" (SET vcvars=vcvarsamd64_x86.bat) else (SET vcvars=vcvars64.bat)
|
2022-11-20 05:03:59 +00:00
|
|
|
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\%vcvars%"
|
2022-10-19 21:49:51 +00:00
|
|
|
echo vcvars=%vcvars%>> %GITHUB_OUTPUT%
|
2022-08-15 00:18:03 +00:00
|
|
|
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -G Ninja
|
2022-05-14 05:56:57 +00:00
|
|
|
|
|
|
|
- name: Build PCSX2
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
if "${{ inputs.configuration }}"=="CMake" (
|
2022-11-20 05:03:59 +00:00
|
|
|
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
|
2022-08-23 07:46:43 +00:00
|
|
|
cmake --build build --config Release || exit /b
|
2022-05-14 05:56:57 +00:00
|
|
|
cp build/pcsx2/pcsx2* bin/
|
|
|
|
) else (
|
|
|
|
msbuild "PCSX2_suite.sln" /m /v:m /p:Configuration="${{ inputs.configuration }}" /p:Platform="${{ inputs.platform }}"
|
|
|
|
)
|
|
|
|
|
|
|
|
- name: Run Tests
|
|
|
|
if: inputs.configuration == 'CMake'
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
2022-11-20 05:03:59 +00:00
|
|
|
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
|
2022-08-14 21:21:23 +00:00
|
|
|
cmake --build build --config Release --target unittests
|
2022-05-14 05:56:57 +00:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
|
|
|
|
path: |
|
|
|
|
./bin
|
|
|
|
!./bin/**/*.bsc
|
|
|
|
!./bin/**/*.exp
|
|
|
|
!./bin/**/*.ilk
|
|
|
|
!./bin/**/*.iobj
|
|
|
|
!./bin/**/*.ipdb
|
|
|
|
!./bin/**/*.pdb
|
|
|
|
!./bin/**/*.lib
|
|
|
|
|
|
|
|
- name: Upload artifact - with symbols
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ steps.artifact-metadata.outputs.artifact-name }}-symbols
|
|
|
|
path: ./bin/**/*.pdb
|