Add Windows ARM64 workflow.

This commit is contained in:
Miku AuahDark
2022-10-17 00:30:01 +08:00
parent 9deaa06a73
commit 0f82f6c7b3
+64 -15
View File
@@ -40,18 +40,54 @@ jobs:
shell: cmd
strategy:
matrix:
platform: [Win32, x64]
platform: [Win32, x64, ARM64]
install: [compat, modern]
include:
- platform: Win32
arch: x86
- platform: x64
arch: x64
upload_jitmodules: true
- install: compat
compatdef: -DLOVE_INSTALL_UCRT=ON
compatname: -compat
exclude:
- platform: ARM64
install: compat
continue-on-error: ${{ matrix.platform == 'ARM64' }}
steps:
- name: Define Variables
id: vars
run: |
rem Compat/Modern switch
if "${{ matrix.install }}" == "compat" (
echo moredef=-DLOVE_INSTALL_UCRT=ON >> "%GITHUB_OUTPUT%"
echo compatname=-compat >> "%GITHUB_OUTPUT%"
) else (
echo moredef= >> "%GITHUB_OUTPUT%"
echo compatname= >> "%GITHUB_OUTPUT%"
)
rem JIT Modules
if "${{ matrix.platform }}-${{ matrix.install }}" == "x64-modern" (
echo jitmodules=1 >> "%GITHUB_OUTPUT%"
) else (
echo jitmodules=0 >> "%GITHUB_OUTPUT%"
)
rem Architecture-Specific Switch
goto ${{ matrix.platform }}
exit /b 1
:Win32
echo arch=x86 >> "%GITHUB_OUTPUT%"
echo angle=0 >> "%GITHUB_OUTPUT%"
echo nofiles=warn >> "%GITHUB_OUTPUT%"
exit /b 0
:x64
echo arch=x64 >> "%GITHUB_OUTPUT%"
echo angle=0 >> "%GITHUB_OUTPUT%"
echo nofiles=warn >> "%GITHUB_OUTPUT%"
exit /b 0
:ARM64
echo arch=arm64 >> "%GITHUB_OUTPUT%"
echo angle=1 >> "%GITHUB_OUTPUT%"
echo nofiles=ignore >> "%GITHUB_OUTPUT%"
echo moredef=-DLOVE_EXTRA_DLLS=%CD%\angle\libEGL.dll;%CD%\angle\libGLESv2.dll
exit /b 0
- name: Clone Megasource
uses: actions/checkout@v2
with:
@@ -68,21 +104,34 @@ jobs:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Download ANGLE
uses: robinraju/release-downloader@v1.5
if: steps.vars.outputs.angle == '1'
with:
repository: MikuAuahDark/angle-winbuild
tag: cr_5249
fileName: angle-win-${{ steps.vars.outputs.arch }}.zip
tarBall: false
zipBall: false
out-file-path: angle
- name: Extract ANGLE
if: steps.vars.outputs.angle == '1'
working-directory: angle
run: 7z x angle-win-${{ steps.vars.outputs.arch }}.zip
- name: Configure
env:
PLATFORM: ${{ matrix.platform }}
run: cmake -Bbuild -Hmegasource -T v142 -A %PLATFORM% ${{ matrix.compatdef }} -DCMAKE_INSTALL_PREFIX=%CD%\install
run: cmake -Bbuild -Hmegasource -T v142 -A ${{ matrix.platform }} -DCMAKE_INSTALL_PREFIX=%CD%\install ${{ steps.vars.outputs.moredef }}
- name: Install
run: cmake --build build --target PACKAGE --config Release -j2
- name: Artifact
uses: actions/upload-artifact@v2
with:
name: love-windows-${{ matrix.arch }}${{ matrix.compatname }}
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}
path: |
build/*.zip
build/*.exe
if-no-files-found: ${{ steps.vars.outputs.nofiles }}
- name: Artifact JIT Modules
if: matrix.upload_jitmodules
if: steps.vars.outputs.jitmodules == '1'
uses: actions/upload-artifact@v2
with:
name: love-windows-jitmodules