Cleanup/Fix: Fix list order list to reflect new ordering, use new pre… #2227
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 Windows Psf | |
on: [push, pull_request] | |
jobs: | |
build_windows_psf: | |
strategy: | |
matrix: | |
aot-build: ['off', 'on'] | |
build-type: ['Visual Studio 16 2019'] | |
target-platform: ['x64'] | |
arch-type: ['x86_64'] | |
installer-script: ['installer64.nsi'] | |
runs-on: windows-2019 | |
steps: | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Force Fetch Git Tags | |
run: git fetch --tags --force | |
- name: Cache DirectX SDK | |
if: ${{ matrix.aot-build == 'off' }} | |
uses: actions/cache@v3 | |
id: cache-directx | |
with: | |
path: DXSDK_Jun10.exe | |
key: ${{ runner.os }}-DXSDK_Jun10 | |
- name: Download DirectX SDK | |
if: ${{ matrix.aot-build == 'off' }} && steps.cache-directx.outputs.cache-hit != 'true' | |
run: curl -L --silent --show-error --output DXSDK_Jun10.exe https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe | |
- name: Install DirectX SDK | |
if: ${{ matrix.aot-build == 'off' }} | |
run: cmd.exe /c start /wait .\DXSDK_Jun10.exe /U /O /F /S /P "${{ github.workspace }}\DX_SDK" | |
- name: Install OpenAL | |
if: ${{ matrix.aot-build == 'off' }} | |
uses: crazy-max/ghaction-chocolatey@v3 | |
with: | |
args: install -y openalsdk | |
- name: Set SHORT_HASH | |
run: | | |
$short_hash = "${{ env.LONG_HASH }}".substring(0, 8) | |
echo "VALUE=$short_hash" >> $env:GITHUB_OUTPUT | |
id: short_hash | |
env: | |
LONG_HASH: ${{ github.sha }} | |
- name: Generate CMake Project | |
run: | | |
mkdir build | |
cd build | |
cmake .. -G"${{ matrix.build-type }}" -A ${{ matrix.target-platform }} -T v141_xp -DBUILD_PLAY=off -DBUILD_TESTS=off -DBUILD_PSFPLAYER=on -DBUILD_AOT_CACHE=${{ matrix.aot-build }} | |
env: | |
DXSDK_DIR: '${{ github.workspace }}\DX_SDK' | |
- name: Build | |
run: | | |
cd build | |
cmake --build . --config Release | |
- name: PsfPlayer Prepare Installer Package | |
if: ${{ matrix.aot-build == 'off' }} | |
run: makensis.exe ./tools/PsfPlayer/installer_win32/${{ matrix.installer-script }} | |
- name: Upload PsfPlayer Build Artifact Installer | |
if: ${{ matrix.aot-build == 'off' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PsfPlayer_Windows_${{ matrix.target-platform }}_Installer | |
path: tools/PsfPlayer/installer_win32/*.exe | |
- name: Upload PsfAot Build Artifact Installer | |
if: ${{ matrix.aot-build == 'on' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PsfAot_Windows_${{ matrix.target-platform }} | |
path: build\tools\PsfPlayer\Source\ui_aot\Release\PsfAot.exe | |
- name: Upload to S3 | |
if: ${{ env.AWS_ACCESS_KEY_ID != null && matrix.aot-build == 'off' }} | |
run: | | |
aws s3 cp tools/PsfPlayer/installer_win32/ s3://playbuilds/${{ env.SHORT_HASH }}/ --acl public-read --recursive --exclude "*" --include "*.exe" | |
env: | |
ARCH_TYPE: ${{ matrix.arch-type }} | |
SHORT_HASH: ${{ steps.short_hash.outputs.VALUE }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: 'us-east-2' |