Skip to content

Windows 11 (arm64) - PR Artifacts - Vulkan headers - CPack workaround #1866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 38 additions & 46 deletions .github/workflows/qt5_6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
- name: 📥 Install dependencies
uses: tecolicom/actions-use-homebrew-tools@v1
with:
tools: qt@${{ inputs.qt_version }} vulkan-headers coreutils
tools: qt@${{ inputs.qt_version }} coreutils
key: ${{ runner.os }}-${{ matrix.architecture }}-homebrew-packages-${{ inputs.qt_version }}

- name: 💾 Download Pre-Build Dependencies
Expand All @@ -146,25 +146,9 @@ jobs:
- name: 👷 Build ${{ env.HINT }}
shell: bash
run: |
# Remove once issue with Homebrew cache action is fixed
brew reinstall --formula cmake

# Build
cmake --preset macos-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }}
cmake --build --preset macos-${{ env.BUILD_TYPE }}
# CPack workaround for macOS 13
attempt=0
max_attempts=5
while [ $attempt -lt $max_attempts ]; do
if cd build && cpack; then
echo "Package created successfully"
break
else
echo "Failed to create package, retrying..."
sleep 10
fi
attempt=$((attempt + 1))
done
cmake --build --preset macos-${{ env.BUILD_TYPE }} --target package
env:
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}
HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }}
Expand All @@ -183,10 +167,20 @@ jobs:
######################

windows:
name: 🪟 Windows x64
runs-on: windows-2022
name: 🪟 Windows ${{ matrix.architecture }}
runs-on: ${{ matrix.architecture == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
env:
LIBJPEG_TURBO_VERSION: 3.0.1
LIBJPEG_TURBO_VERSION: 3.1.0
strategy:
fail-fast: false
matrix:
architecture: [ arm64, x64 ]
isQt5:
- ${{ inputs.qt_version == '5' }}
exclude:
- isQt5: true
architecture: arm64

steps:
- name: ⬇ Checkout
uses: actions/checkout@v4
Expand All @@ -198,63 +192,61 @@ jobs:
shell: bash
run: tr -d '\n' < .version > temp && mv temp .version && echo -n "+PR${{ inputs.pull_request_number }}" >> .version

- name: 💾 Restore DirectX SDK (if available)
- name: 💾 Restore DirectX SDK (x64)
if: matrix.architecture == 'x64'
uses: ethanjli/[email protected]
with:
url: https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe
destination: .\installer\dxsdk-jun10.exe
cache-key: dxsdk-jun10

- name: 💾 Restore libjpeg-turbo (if available)
uses: ethanjli/[email protected]
with:
url: https://sourceforge.net/projects/libjpeg-turbo/files/${{ env.LIBJPEG_TURBO_VERSION }}/libjpeg-turbo-${{ env.LIBJPEG_TURBO_VERSION }}-vc64.exe
destination: .\installer\libjpeg-turbo.exe
cache-key: libjpeg-turbo

- name: 📥 Extract DirectX SDK & libjpeg-turbo
- name: 📥 Extract DirectX SDK (x64)
if: matrix.architecture == 'x64'
run: |
7z x -aoa .\installer\dxsdk-jun10.exe DXSDK/Include DXSDK/Lib -oC:\
echo "DXSDK_DIR=C:\DXSDK" | Out-File -FilePath $env:GITHUB_ENV -Append
7z x -aoa .\installer\libjpeg-turbo.exe bin include lib -oC:\turbojpeg
echo "TURBOJPEG_DIR=C:\turbojpeg" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: 📥 Install Vulkan SDK
if: ${{ inputs.qt_version == '6' }}
uses: jakoch/install-vulkan-sdk-action@v1
with:
install_runtime: false
cache: true
stripdown: true

- name: 📥 Install Qt
uses: jurplel/install-qt-action@v4
# If the following PR is merged, you can switch back to jurplel/install-qt-action
# https://github.com/jurplel/install-qt-action/pull/273
uses: jdpurcell/install-qt-action@v5
with:
version: ${{ inputs.qt_version == '6' && '6.8' || '5.15.*' }}
version: ${{ inputs.qt_version == '6' && '6.8.*' || '5.15.*' }}
target: 'desktop'
modules: ${{ inputs.qt_version == '6' && 'qtserialport qtwebsockets' || '' }}
cache: 'true'
cache-key-prefix: 'cache-qt-windows'

- name: 📥 Install Python
uses: actions/setup-python@v5
with:
python-version: 3.13
architecture: ${{ matrix.architecture }}

- name: 📥 Install latest CMake and Ninja
uses: lukka/get-cmake@latest

- name: 🛠️ Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.architecture }}

- name: 💾 Download Pre-Build Dependencies
id: dependencies
uses: ./.github/actions/download-pre-built-deps
with:
os: 'windows'
architecture: 'x64'
architecture: ${{ matrix.architecture }}
qt_version: ${{ inputs.qt_version }}
build_type: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}
build_type: ${{ inputs.event_name == 'pull_request' && 'relwithdebinfo' || 'release' }}

- name: 👷 Build ${{ env.HINT }}
shell: cmd
run: |
cmake --preset windows-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }}
cmake --build --preset windows-${{ env.BUILD_TYPE }} --target package
env:
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'relwithdebinfo' || 'release' }}
HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }}

- name: 📦 Upload
Expand All @@ -264,7 +256,7 @@ jobs:
name: ${{ inputs.event_name == 'pull_request' && env.NAME || format('artifact-{0}', env.NAME) }}
path: ${{ inputs.event_name == 'pull_request' && 'build/*.exe' || 'build/Hyperion-*' }}
env:
NAME: ${{ inputs.qt_version == '6' && 'windows_x64_qt6' || 'windows_x64' }}
NAME: ${{ inputs.qt_version == '6' && format('windows_{0}_qt6', matrix.architecture) || format('windows_{0}', matrix.architecture) }}

#####################################
###### Publish GitHub Releases ######
Expand Down
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Systray: Support multiple instances
- UI: Validate that key ports do not overlap across editors and pages
- UI: Provide additional details in error dialogue
- UI: LED preview - show instance's name the preview is applicable to
- UI: LED preview - show instance's name the preview is applicable to
- Http-Server: Support Cross-Origin Resource Sharing (CORS) (#1496)
- GitHub: Windows 11 (arm64) has been added to the Qt6 workflow build

**JSON-API**
- New subscription support for event updates, i.e. `Suspend, Resume, Idle, idleResume, Restart, Quit`.
Expand All @@ -37,7 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Overview](https://github.com/hyperion-project/hyperion.ng/blob/API_Auth/doc/development/JSON-API%20_Commands_Overview.md) of API commands and subscription updates
- Support to query for a dedicated set of configuration items for a set of instances
- Support to save a dedicated set of configuration items for a set of instances
- Limit update emission frequency: Images (25Hz), raw LED-Colors (40Hz) & LED-Device data (200Hz)
- Limit update emission frequency: Images (25Hz), raw LED-Colors (40Hz) & LED-Device data (200Hz)
- Support for requesting instance-data via JSON-API. Implemented requesting the current image in different formats or led colors.

### Changed
Expand Down Expand Up @@ -72,7 +73,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed Last update of an effect event is not removed in sources overview
- Fixed Removed stale _logger object
- Fixed Smoothing (#1863)
- UI: Instance listings are sorted, enabled instances are high-lighted in drop-downs
- UI: Instance listings are sorted, enabled instances are high-lighted in drop-downs
- GitHub: For Windows, Pull request artifacts are now built with RelWithDebInfo (#1865 )

**JSON-API**
- Refactored JSON-API to ensure consistent authorization behaviour across sessions and single requests with token authorization.
Expand Down
18 changes: 15 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ if(${CMAKE_SYSTEM} MATCHES "Linux")
set(DEFAULT_DEV_TINKERFORGE ON)
set(DEFAULT_CEC ON)
elseif (WIN32)
set(DEFAULT_DX ON)
set(DEFAULT_DDA ON)
set(DEFAULT_MF ON)
else()
Expand Down Expand Up @@ -204,6 +203,10 @@ if("${PLATFORM}" MATCHES "osx")
set(DEFAULT_OSX ON)
set(DEFAULT_AUDIO OFF)

elseif ("${PLATFORM}" MATCHES "windows")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386|i686|amd64|x86_64|AMD64")
set(DEFAULT_DX ON)
endif()
elseif ("${PLATFORM}" MATCHES "rpi")
set(DEFAULT_DISPMANX ON)
set(DEFAULT_DEV_WS281XPWM ON)
Expand Down Expand Up @@ -576,7 +579,7 @@ endif()
# Search for Windows SDK
if(MSVC)
find_package(WindowsSDK REQUIRED)
message(STATUS "WINDOWS SDK: ${WINDOWSSDK_LATEST_DIR} ${WINDOWSSDK_LATEST_NAME}")
message(STATUS "WINDOWS SDK: ${WINDOWSSDK_LATEST_DIR} (${WINDOWSSDK_LATEST_NAME})")
message(STATUS "MSVC VERSION: ${MSVC_VERSION}")
endif()

Expand Down Expand Up @@ -605,7 +608,11 @@ if(NOT DEFINED QTDIR)
if(MSVC)
FIRSTSUBDIR(SUBDIRQT "C:/Qt")
if(NOT ${SUBDIRQT} STREQUAL "")
set(QTDIR "${SUBDIRQT}/msvc2019_64")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64|ARM64|arm64")
set(QTDIR "${SUBDIRQT}/msvc2019_arm64")
else()
set(QTDIR "${SUBDIRQT}/msvc2019_64")
endif()
endif()
elseif ("${PLATFORM}" MATCHES "osx")
foreach(QT_VERSION 6 5)
Expand Down Expand Up @@ -651,6 +658,11 @@ if("${QT_VERSION}" VERSION_LESS "${QT_MIN_VERSION}")
message(FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}")
endif()

# Pseydo target WrapVulkanHeaders::WrapVulkanHeaders for Qt6
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6 AND NOT TARGET WrapVulkanHeaders::WrapVulkanHeaders)
add_library(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE IMPORTED)
endif()

find_package(Qt${QT_VERSION_MAJOR} ${QT_VERSION} COMPONENTS Core Gui Network Sql Widgets REQUIRED)

message(STATUS "Qt version used: ${QT_VERSION}")
Expand Down
31 changes: 31 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "relwithdebinfo",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "ninja-base",
"hidden": true,
Expand Down Expand Up @@ -166,6 +173,17 @@
"rhs": "Windows"
}
},
{
"name": "windows-relwithdebinfo",
"displayName": "Windows (RelWithDebInfo) (msvc)",
"description": "Build with MSVC's CL as Release with Debug Symbols",
"inherits": [ "base", "relwithdebinfo", "msvc" ],
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "windows-debug",
"displayName": "Windows (debug) (msvc)",
Expand Down Expand Up @@ -238,6 +256,19 @@
"rhs": "Windows"
}
},
{
"name": "windows-relwithdebinfo",
"displayName": "Windows (RelWithDebInfo) (msvc)",
"description": "Build with MSVC's CL as Release with Debug Symbols",
"configuration": "RelWithDebInfo",
"targets": "all",
"configurePreset": "windows-relwithdebinfo",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "windows-debug",
"displayName": "Windows (debug) (msvc)",
Expand Down
23 changes: 0 additions & 23 deletions cmake/FindDebBuilder.cmake

This file was deleted.

23 changes: 0 additions & 23 deletions cmake/FindRpmBuilder.cmake

This file was deleted.

18 changes: 10 additions & 8 deletions cmake/FindTurboJPEG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,29 @@
# TurboJPEG_INCLUDE_DIR
# TurboJPEG_LIBRARY

set(TurboJPEG_PATHS
"$ENV{TURBOJPEG_DIR}"
"C:/libjpeg-turbo64"
)
set(TURBOJPEG_ROOT_DIR "${TURBOJPEG_ROOT_DIR}" CACHE PATH "Root directory to search for TurboJPEG")

find_path(TurboJPEG_INCLUDE_DIR
NAMES
turbojpeg.h
PATHS
${TurboJPEG_PATHS}
"C:/libjpeg-turbo64"
HINTS
${TURBOJPEG_ROOT_DIR}
PATH_SUFFIXES
include
)

find_library(TurboJPEG_LIBRARY
NAMES
libturbojpeg
turbojpeg
turbojpeg-static
turbojpeg
libturbojpeg-static
libturbojpeg
PATHS
${TurboJPEG_PATHS}
"C:/libjpeg-turbo64"
HINTS
${TURBOJPEG_ROOT_DIR}
PATH_SUFFIXES
bin
lib
Expand Down
Loading