mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
160c5d0b3a
* Stop Web-Capture when priority changes * Remote control UI: Treat duration=0 as endless * Stop Web-Capture on non-Image events changes * LED Matrix Layout - Support vertical cabling direction * Additional Yeelight models * Treat http headers case insensitive * Update change log * Treat http headers case insensitive (consider Qt version) * API - Consider provided format when setImage * UI - Support Boblight configuration per LED instance * Support multiple Boblight clients with different priorities * Update changelog * Simplify isGUI rules allowing for QT only builds * Sysinfo: Fix indents * LED-Devices: Show warning, if get properties failed * Qt-Grabber: Fixed position handling of multiple monitors * LED layout: Remove indention limitations * Yeelight: Test YLTD003 * hyperion-remote: Provide image filename to muxer/UI * Refactor PriorityMuxer and related * Temp: Build under Windows 2019 * Yeelight: Remove YLTD003 as it is not working without additional changes * Test Windows-latest with out removing redistributables/new MSVC * correct workflows * correct CI script * Build Windows with Qt 5.15.2 * Priority Muxer: Updates after testing * Fix Typo * Update BGHandler * QTGrabber - Reactivate windows code to avoid cursor issues * Emit prioritiesChanged when autoselect was changed by user Co-authored-by: Paulchen Panther <Paulchen-Panter@protonmail.com>
67 lines
2.5 KiB
Bash
Executable File
67 lines
2.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# detect CI
|
|
if [ "$HOME" != "" ]; then
|
|
# GitHub Actions
|
|
CI_NAME="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
|
CI_BUILD_DIR="$GITHUB_WORKSPACE"
|
|
else
|
|
# for executing in non ci environment
|
|
CI_NAME="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
|
fi
|
|
|
|
# set environment variables if not exists
|
|
[ -z "${BUILD_TYPE}" ] && BUILD_TYPE="Debug"
|
|
|
|
# Determine cmake build type; tag builds are Release, else Debug (-dev appends to platform)
|
|
if [[ $BUILD_SOURCEBRANCH == *"refs/tags"* || $GITHUB_REF == *"refs/tags"* ]]; then
|
|
BUILD_TYPE=Release
|
|
else
|
|
PLATFORM=${PLATFORM}-dev
|
|
fi
|
|
|
|
# Build the package on osx or linux
|
|
if [[ "$CI_NAME" == 'osx' || "$CI_NAME" == 'darwin' ]]; then
|
|
# compile prepare
|
|
mkdir build || exit 1
|
|
cd build
|
|
cmake -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../ || exit 2
|
|
make -j $(sysctl -n hw.ncpu) package || exit 3
|
|
cd ${CI_BUILD_DIR} && source /${CI_BUILD_DIR}/test/testrunner.sh || exit 4
|
|
exit 0;
|
|
exit 1 || { echo "---> Hyperion compilation failed! Abort"; exit 5; }
|
|
elif [[ $CI_NAME == *"mingw64_nt"* || "$CI_NAME" == 'windows_nt' ]]; then
|
|
# compile prepare
|
|
echo "Number of Cores $NUMBER_OF_PROCESSORS"
|
|
mkdir build || exit 1
|
|
cd build
|
|
cmake -G "Visual Studio 17 2022" -A x64 -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ../ || exit 2
|
|
cmake --build . --target package --config Release -- -nologo -v:m -maxcpucount || exit 3
|
|
exit 0;
|
|
exit 1 || { echo "---> Hyperion compilation failed! Abort"; exit 5; }
|
|
elif [[ "$CI_NAME" == 'linux' ]]; then
|
|
echo "Compile Hyperion with DOCKER_IMAGE = ${DOCKER_IMAGE}, DOCKER_TAG = ${DOCKER_TAG} and friendly name DOCKER_NAME = ${DOCKER_NAME}"
|
|
# set GitHub Container Registry url
|
|
REGISTRY_URL="ghcr.io/hyperion-project/${DOCKER_IMAGE}"
|
|
# take ownership of deploy dir
|
|
mkdir ${CI_BUILD_DIR}/deploy
|
|
|
|
# run docker
|
|
docker run --rm \
|
|
-v "${CI_BUILD_DIR}/deploy:/deploy" \
|
|
-v "${CI_BUILD_DIR}:/source:ro" \
|
|
$REGISTRY_URL:$DOCKER_TAG \
|
|
/bin/bash -c "mkdir hyperion && cp -r source/. /hyperion &&
|
|
cd /hyperion && mkdir build && cd build &&
|
|
cmake -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ../ || exit 2 &&
|
|
make -j $(nproc) package || exit 3 &&
|
|
cp /hyperion/build/bin/h* /deploy/ 2>/dev/null || : &&
|
|
cp /hyperion/build/Hyperion-* /deploy/ 2>/dev/null || : &&
|
|
cd /hyperion && source /hyperion/test/testrunner.sh || exit 4 &&
|
|
exit 0;
|
|
exit 1 " || { echo "---> Hyperion compilation failed! Abort"; exit 5; }
|
|
|
|
# overwrite file owner to current user
|
|
sudo chown -fR $(stat -c "%U:%G" ${CI_BUILD_DIR}/deploy) ${CI_BUILD_DIR}/deploy
|
|
fi
|