Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into hyperion-project#1633
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Grey committed Nov 17, 2023
2 parents 287ff99 + 9127096 commit 3613186
Show file tree
Hide file tree
Showing 163 changed files with 1,884 additions and 2,893 deletions.
71 changes: 0 additions & 71 deletions .ci/ci_build.sh

This file was deleted.

40 changes: 0 additions & 40 deletions .ci/ci_install.sh

This file was deleted.

37 changes: 21 additions & 16 deletions .devcontainer.json
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"
}
59 changes: 59 additions & 0 deletions .github/scripts/build.sh
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
154 changes: 0 additions & 154 deletions .github/workflows/apt.yml

This file was deleted.

Loading

0 comments on commit 3613186

Please sign in to comment.