forked from hyperion-project/hyperion.ng
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into hyperion-project#1633
- Loading branch information
Showing
163 changed files
with
1,884 additions
and
2,893 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
{ | ||
"name": "Hyperion.ng Linux", | ||
"extensions": [ | ||
"twxs.cmake", | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cmake-tools", | ||
"spmeesseman.vscode-taskexplorer", | ||
"yzhang.markdown-all-in-one", | ||
"CoenraadS.bracket-pair-colorizer", | ||
"vscode-icons-team.vscode-icons", | ||
"editorconfig.editorconfig" | ||
], | ||
"settings": { | ||
"editor.formatOnSave": false, | ||
"cmake.environment": { | ||
}, | ||
}, | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"extensions": [ | ||
"twxs.cmake", | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cmake-tools", | ||
"spmeesseman.vscode-taskexplorer", | ||
"yzhang.markdown-all-in-one", | ||
"CoenraadS.bracket-pair-colorizer", | ||
"vscode-icons-team.vscode-icons", | ||
"editorconfig.editorconfig", | ||
"RVSmartPorting.rpm-spec-ext" | ||
], | ||
"settings": { | ||
"editor.formatOnSave": false, | ||
"cmake.environment": { } | ||
} | ||
} | ||
}, | ||
"forwardPorts": [8090, 8092], | ||
"postCreateCommand": "git submodule update --recursive --init && sudo apt-get update && sudo apt-get install -y git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev" | ||
"postCreateCommand": "git submodule update --recursive --init && sudo apt-get update && sudo apt-get install -y git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev libasound2-dev" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/bash | ||
|
||
# set environment variables if not exists | ||
[ -z "${BUILD_TYPE}" ] && BUILD_TYPE="Debug" | ||
[ -z "${TARGET_ARCH}" ] && TARGET_ARCH="linux/amd64" | ||
[ -z "${PLATFORM}" ] && PLATFORM="x11" | ||
|
||
# Determine cmake build type; tag builds are Release, else Debug (-dev appends to platform) | ||
if [[ $GITHUB_REF == *"refs/tags"* ]]; then | ||
BUILD_TYPE=Release | ||
else | ||
PLATFORM=${PLATFORM}-dev | ||
fi | ||
|
||
echo "Compile Hyperion on '${RUNNER_OS}' with build type '${BUILD_TYPE}' and platform '${PLATFORM}'" | ||
|
||
# Build the package on MacOS, Windows or Linux | ||
if [[ "$RUNNER_OS" == 'macOS' ]]; then | ||
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 ${GITHUB_WORKSPACE} && source /${GITHUB_WORKSPACE}/test/testrunner.sh || exit 4 | ||
exit 0; | ||
exit 1 || { echo "---> Hyperion compilation failed! Abort"; exit 5; } | ||
elif [[ $RUNNER_OS == "Windows" ]]; then | ||
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="Release" ../ || 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 [[ "$RUNNER_OS" == 'Linux' ]]; then | ||
echo "Docker arguments used: DOCKER_IMAGE=${DOCKER_IMAGE}, DOCKER_TAG=${DOCKER_TAG}, TARGET_ARCH=${TARGET_ARCH}" | ||
# verification bypass of external dependencies | ||
git config --global --add safe.directory "${GITHUB_WORKSPACE}/dependencies/external/*" | ||
# set GitHub Container Registry url | ||
REGISTRY_URL="ghcr.io/hyperion-project/${DOCKER_IMAGE}" | ||
# take ownership of deploy dir | ||
mkdir ${GITHUB_WORKSPACE}/deploy | ||
|
||
# run docker | ||
docker run --rm --platform=${TARGET_ARCH} \ | ||
-v "${GITHUB_WORKSPACE}/deploy:/deploy" \ | ||
-v "${GITHUB_WORKSPACE}:/source:rw" \ | ||
$REGISTRY_URL:$DOCKER_TAG \ | ||
/bin/bash -c "mkdir -p /source/build && cd /source/build && | ||
cmake -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ../ || exit 2 && | ||
cmake --build /source/build --target package -- -j $(nproc) || exit 3 && | ||
cp /source/build/bin/h* /deploy/ 2>/dev/null || : && | ||
cp /source/build/Hyperion-* /deploy/ 2>/dev/null || : && | ||
cd /source && source /source/test/testrunner.sh || exit 5 && | ||
exit 0; | ||
exit 1 " || { echo "---> Hyperion compilation failed! Abort"; exit 5; } | ||
|
||
# overwrite file owner to current user | ||
sudo chown -fR $(stat -c "%U:%G" ${GITHUB_WORKSPACE}/deploy) ${GITHUB_WORKSPACE}/deploy | ||
fi |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.