Skip to content

Commit

Permalink
[CI] Added CI script for UWP target platform.
Browse files Browse the repository at this point in the history
- Added ci_uwp.yml script.
- Diversified D3D11/D3D12 build configurations for Windows CI script (11.3/12.2 for VS 2022, and 11.0/12.0 for VS 2019).
- Updated README.md document with UWP CI badge.
  • Loading branch information
LukasBanana committed May 20, 2024
1 parent f2879ef commit 38b5710
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci_uwp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: MS UWP

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build_uwp:
strategy:
matrix:
target: [ UWP-8_1, UWP-10_0 ]
arch: [x64]
lib: [Shared, Static]
config: [Release, Debug]
fail-fast: false

runs-on: 'windows-latest'

env:
README: ${{ github.workspace }}/README.txt
GENERATOR: 'Visual Studio 17 2022'

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

# See https://github.com/actions/runner-images/issues/842
- name: Install Windows 8.1 SDK
if: matrix.target == 'UWP-8_1'
shell: python
run: |
import subprocess
import urllib.request
urllib.request.urlretrieve("https://go.microsoft.com/fwlink/p/?LinkId=323507", "sdksetup.exe")
subprocess.run(["sdksetup.exe", "/q", "/norestart", "/features", "OptionId.WindowsDesktopSoftwareDevelopmentKit", "OptionId.NetFxSoftwareDevelopmentKit"], check=True, capture_output=True)
- name: Configure CMake
run: >
cmake -G "${{ env.GENERATOR }}" -A "${{ matrix.arch }}" -S . -B ${{ github.workspace }}/${{ matrix.arch }}
-DCMAKE_TOOLCHAIN_FILE="cmake/Toolchains/Toolchain.${{ matrix.target }}.cmake"
-DLLGL_BUILD_STATIC_LIB=${{ matrix.lib == 'Static' && 'ON' || 'OFF' }}
-DLLGL_BUILD_RENDERER_DIRECT3D11=ON
-DLLGL_BUILD_RENDERER_DIRECT3D12=ON
-DLLGL_BUILD_EXAMPLES=ON
"-DLLGL_D3D11_ENABLE_FEATURELEVEL=${{ matrix.config == 'Release' && 'Direct3D 11.3' || 'Direct3D 11.0'}}"
"-DLLGL_D3D12_ENABLE_FEATURELEVEL=${{ matrix.config == 'Release' && 'Direct3D 12.2' || 'Direct3D 12.0'}}"
- name: Build
run: |
cmake --build ${{ github.workspace }}/${{ matrix.arch }} --config ${{ matrix.config }}
echo "LLGL built with ${{ env.GENERATOR }} for ${{ matrix.arch }} on $(date)." > ${{ env.README }}
echo "Place at root of LLGL repository to run examples and testbed." >> ${{ env.README }}
- name: Upload Binaries
uses: actions/upload-artifact@v4
if: matrix.arch == 'x64' && matrix.lib == 'Shared' && matrix.config == 'Release'
with:
name: LLGL-${{ matrix.target }}-${{ matrix.config }}-${{ matrix.arch }}
path: |
${{ env.README }}
${{ github.workspace }}/${{ matrix.arch }}/build/${{ matrix.config }}/LLGL*.dll
${{ github.workspace }}/${{ matrix.arch }}/build/${{ matrix.config }}/Example_*.exe
3 changes: 2 additions & 1 deletion .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
-DLLGL_BUILD_WRAPPER_CSHARP=ON
-DLLGL_VK_ENABLE_SPIRV_REFLECT=ON
-DLLGL_GL_ENABLE_OPENGL2X=ON
"-DLLGL_D3D11_ENABLE_FEATURELEVEL=Direct3D 11.3"
"-DLLGL_D3D11_ENABLE_FEATURELEVEL=${{ matrix.generator == 'Visual Studio 17 2022' && 'Direct3D 11.3' || 'Direct3D 11.0' }}"
"-DLLGL_D3D11_ENABLE_FEATURELEVEL=${{ matrix.generator == 'Visual Studio 17 2022' && 'Direct3D 12.2' || 'Direct3D 12.0' }}"
- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ with Introduction, Hello Triangle Tutorial, and Extensibility Example with [GLFW
| Platform | CI | D3D12 | D3D11 | Vulkan | GL/GLES3 | Metal |
|----------|:--:|:-----:|:-----:|:------:|:--------:|:-----:|
| <img src="docu/Icons/windows.svg" height="20" /> Windows | <p>[![MSVC16+ CI](https://github.com/LukasBanana/LLGL/actions/workflows/ci_windows.yml/badge.svg)](https://github.com/LukasBanana/LLGL/actions/workflows/ci_windows.yml)</p> <p>[![MSVC14 CI](https://ci.appveyor.com/api/projects/status/j09x8n07u3byfky0?svg=true)](https://ci.appveyor.com/project/LukasBanana/llgl)</p> | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | N/A |
| <img src="docu/Icons/windows.svg" height="20" /> UWP | N/A | :heavy_check_mark: | :heavy_check_mark: | N/A | N/A | N/A |
| <img src="docu/Icons/windows.svg" height="20" /> UWP | [![UWP CI](https://github.com/LukasBanana/LLGL/actions/workflows/ci_uwp.yml/badge.svg)](https://github.com/LukasBanana/LLGL/actions/workflows/ci_uwp.yml) | :heavy_check_mark: | :heavy_check_mark: | N/A | N/A | N/A |
| <img src="docu/Icons/linux.svg" height="20" /> GNU/Linux | [![GNU/Linux CI](https://github.com/LukasBanana/LLGL/actions/workflows/ci_linux.yml/badge.svg)](https://github.com/LukasBanana/LLGL/actions/workflows/ci_linux.yml) | N/A | N/A | :heavy_check_mark: | :heavy_check_mark: | N/A |
| <img src="docu/Icons/macos.svg" height="20" /> macOS | [![macOS CI](https://github.com/LukasBanana/LLGL/actions/workflows/ci_macos.yml/badge.svg)](https://github.com/LukasBanana/LLGL/actions/workflows/ci_macos.yml) | N/A | N/A | N/A | :heavy_check_mark: | :heavy_check_mark: |
| <img src="docu/Icons/ios.svg" height="20" /> iOS | [![iOS CI](https://github.com/LukasBanana/LLGL/actions/workflows/ci_ios.yml/badge.svg)](https://github.com/LukasBanana/LLGL/actions/workflows/ci_ios.yml) | N/A | N/A | N/A | :heavy_check_mark: | :heavy_check_mark: |
Expand Down

0 comments on commit 38b5710

Please sign in to comment.