Update to 2.0.16 #161
Workflow file for this run
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
name: WebOS build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
env: | |
TOOLCHAIN_URL: https://github.com/openlgtv/buildroot-nc4/releases/download/webos-d7ed7ee/arm-webos-linux-gnueabi_sdk-buildroot.tar.gz | |
TOOLCHAIN_DIR: /opt/arm-webos-linux-gnueabi_sdk-buildroot | |
TOOLCHAIN_ENV_FILE: /opt/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup | |
TOOLCHAIN_FILE: /opt/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake | |
BUILD_DIR_NATIVE: build-x86x64 | |
BUILD_DIR_CROSS: build-cross | |
CCACHE_DIR_NATIVE: .ccache-build-x86x64 | |
CCACHE_DIR_CROSS: .ccache-build-cross | |
CCACHE_COMPRESS: true | |
CCACHE_COMPRESSLEVEL: 6 | |
CCACHE_MAXSIZE: 600M | |
jobs: | |
build_hyperion_ng: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./hyperion.ng | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: hyperion-project/hyperion.ng | |
ref: 2.0.16 | |
path: hyperion.ng | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Restore/Cache build directories | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ github.workspace }}/${{ env.CCACHE_DIR_NATIVE }} | |
${{ github.workspace }}/${{ env.CCACHE_DIR_CROSS }} | |
key: ccache-${{ runner.os }}-${{github.run_id}} | |
restore-keys: | | |
ccache-${{ runner.os }} | |
- name: Create build directories | |
run: | | |
mkdir -p ./${{ env.BUILD_DIR_NATIVE }} | |
mkdir -p ./${{ env.BUILD_DIR_CROSS }} | |
- name: Cache toolchain dir | |
id: cache-toolchain | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.TOOLCHAIN_DIR }} | |
key: ${{ runner.os }}-${{ env.TOOLCHAIN_URL }} | |
- name: Download and unpack toolchain | |
if: steps.cache-toolchain.outputs.cache-hit != 'true' | |
working-directory: /opt | |
run: | | |
wget -q -O toolchain.tar.gz ${TOOLCHAIN_URL} | |
tar xf toolchain.tar.gz | |
pushd ${TOOLCHAIN_DIR} | |
./relocate-sdk.sh | |
popd | |
find ${TOOLCHAIN_DIR}/bin -type f -iname "perl*" -delete | |
- name: Install native dependencies | |
env: | |
apt_deps: ccache git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev python3-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libturbojpeg0-dev libssl-dev libmbedtls-dev | |
run: | | |
sudo apt update | |
sudo apt install -y ${{ env.apt_deps }} | |
- name: Build native | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/${{ env.CCACHE_DIR_NATIVE }} | |
run: | | |
pushd ./${{ env.BUILD_DIR_NATIVE }} | |
cmake .. \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DENABLE_FLATBUF_SERVER=OFF \ | |
-DENABLE_DISPMANX=OFF \ | |
-DENABLE_FB=OFF \ | |
-DENABLE_V4L2=OFF \ | |
-DENABLE_X11=OFF \ | |
-DENABLE_XCB=OFF \ | |
-DENABLE_AUDIO=OFF \ | |
-DENABLE_BOBLIGHT_SERVER=OFF \ | |
-DENABLE_CEC=OFF \ | |
-DENABLE_DEV_NETWORK=OFF \ | |
-DENABLE_DEV_SERIAL=OFF \ | |
-DENABLE_DEV_TINKERFORGE=OFF \ | |
-DENABLE_DEV_USB_HID=OFF \ | |
-DENABLE_EFFECTENGINE=OFF \ | |
-DENABLE_REMOTE_CTL=OFF \ | |
-DENABLE_QT=OFF \ | |
-DENABLE_FORWARDER=OFF \ | |
-DENABLE_DEV_SPI=OFF \ | |
-DENABLE_MDNS=OFF \ | |
-DENABLE_FLATBUF_CONNECT=ON \ | |
-DENABLE_PROTOBUF_SERVER=OFF \ | |
-Wno-dev | |
make | |
popd | |
- name: Build cross (webos arm) | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/${{ env.CCACHE_DIR_CROSS }} | |
run: | | |
pushd ./${{ env.BUILD_DIR_CROSS }} | |
cmake .. \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DPLATFORM=rpi \ | |
-DHYPERION_LIGHT=ON \ | |
-DENABLE_QT=OFF \ | |
-DENABLE_AUDIO=OFF \ | |
-DENABLE_EFFECTENGINE=ON \ | |
-DENABLE_JSONCHECKS=ON \ | |
-DENABLE_DEV_SERIAL=ON \ | |
-DENABLE_DEV_USB_HID=ON \ | |
-DENABLE_DEV_WS281XPWM=OFF \ | |
-DENABLE_DEV_TINKERFORGE=ON \ | |
-DENABLE_MDNS=ON \ | |
-DENABLE_DEPLOY_DEPENDENCIES=OFF \ | |
-DENABLE_BOBLIGHT_SERVER=ON \ | |
-DENABLE_FLATBUF_SERVER=ON \ | |
-DENABLE_PROTOBUF_SERVER=OFF \ | |
-DENABLE_FORWARDER=ON \ | |
-DENABLE_FLATBUF_CONNECT=ON \ | |
-DIMPORT_FLATC=${GITHUB_WORKSPACE}/hyperion.ng/${BUILD_DIR_NATIVE}/flatc_export.cmake | |
make | |
popd | |
- name: Copy built binaries to release/ | |
run: | | |
mkdir ./release | |
cp -r ./${{ env.BUILD_DIR_CROSS }}/bin/* ./release/ | |
find ./release | |
- name: Copy dependencies to release/ | |
env: | |
dependency_libs: libpython3.10.so.1.0 libpng16.so.16 libjpeg.so.8 libcrypto.so.1.1 libz.so.1 libssl.so.1.1 libpcre2-16.so.0 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libk5crypto.so.3 libatomic.so.1 libQt5Core.so.5 libkrb5support.so.0 libcom_err.so.3 libstdc++.so.6 libkrb5.so.3 libQt5Sql.so.5 libgssapi_krb5.so.2 libQt5SerialPort.so.5 libusb-1.0.so.0 libudev.so.1 | |
run: | | |
for i in ${{ env.dependency_libs }}; do find ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/ -name $i -exec cp {} ./release/ \;; done | |
mkdir -p ./release/sqldrivers | |
mkdir -p ./release/imageformats | |
mkdir -p ./release/python/lib | |
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/sqldrivers/libqsqlite.so ./release/sqldrivers/ | |
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqico.so ./release/imageformats/ | |
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqjpeg.so ./release/imageformats/ | |
cp -r ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/python3.10 ./release/python/lib/ | |
find ./release | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hyperion.ng-build | |
path: ${{ github.workspace }}/hyperion.ng/release/* | |
if-no-files-found: error | |
build_ipk: | |
runs-on: ubuntu-latest | |
needs: build_hyperion_ng | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/download-artifact@v4 | |
with: | |
name: hyperion.ng-build | |
path: hyperion.ng-build | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: npm | |
- name: Restore toolchain cache | |
id: cache-toolchain | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.TOOLCHAIN_DIR }} | |
key: ${{ runner.os }}-${{ env.TOOLCHAIN_URL }} | |
- name: Install native dependencies | |
env: | |
apt_deps: cmake build-essential | |
run: | | |
sudo apt update | |
sudo apt install -y ${{ env.apt_deps }} | |
- name: Reconfigure git to use HTTP authentication | |
run: > | |
git config --global url."https://github.com/".insteadOf | |
ssh://[email protected]/ | |
- run: npm ci | |
- run: npm run lint | |
- run: npm run build -- --env production | |
- name: Build service | |
run: | | |
mkdir -p ./dist/service | |
rm -rf ./dist/service/* | |
mkdir -p ./service/build | |
pushd service/build | |
cmake .. \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} | |
make | |
popd | |
cp -r ./service/build/dist/* ./dist/service/ | |
- name: Copy hyperion.ng into dist/service/hyperion | |
run: | | |
ls -R | |
install -D -m 0755 -t ./dist/service/hyperion/ ./hyperion.ng-build/{hyperiond,hyperion-remote} | |
ls -R | |
- name: Ensure executables +x | |
run: | | |
chmod +x ./dist/service/autostart.sh | |
chmod +x ./dist/service/loader_service | |
chmod +x ./dist/service/start_hyperiond | |
- run: npm run package | |
- run: npm run gen-manifest | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hyperion.ng-ipk | |
path: | | |
${{github.workspace}}/*.ipk | |
- uses: marvinpinto/action-automatic-releases@latest | |
if: "github.ref == 'refs/heads/master'" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: latest | |
prerelease: true | |
title: "Development Build" | |
files: | | |
${{github.workspace}}/*.ipk | |
${{github.workspace}}/org.webosbrew.hyperion.ng.loader.manifest.json | |
- uses: marvinpinto/action-automatic-releases@latest | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
title: ${{ github.ref_name }} | |
files: | | |
${{github.workspace}}/*.ipk | |
${{github.workspace}}/org.webosbrew.hyperion.ng.loader.manifest.json |