Added VSCP bootloader functionality #420
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: AppImage | |
on: [push] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
VSCP_ROOT: ${{github.workspace}}/third_party/vscp/ | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally | |
# well on Windows or Mac. You can convert this to a matrix build if you need | |
# cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ubuntu-latest | |
#continue-on-error: true | |
steps: | |
# https://github.com/actions/checkout | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Update before installing packages | |
run: sudo apt-get update | |
- name: Install libmosquitto-dev manually | |
run: sudo apt-get install libmosquitto-dev | |
- name: Install libexpat-dev manually | |
run: sudo apt-get install libexpat-dev | |
- name: Install libssl-dev manually | |
run: sudo apt-get install libssl-dev | |
- name: Install curl manually | |
run: sudo apt-get install libcurl4-openssl-dev | |
- name: Install libwebsockets-dev | |
run: sudo apt install libwebsockets-dev | |
- name: Install FUSE manually | |
run: sudo apt install libfuse2 | |
- name: Install sqlite3 | |
run: sudo apt install libsqlite3-dev | |
# # https://forum.qt.io/topic/151452/what-qt-specific-files-exactly-do-i-need-to-add-when-deploying/34 | |
# - name: Install mysql client | |
# run: sudo apt install libmysqlclient-dev | |
# https://github.com/marketplace/actions/install-qt | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.5.3 | |
host: 'linux' | |
target: 'desktop' | |
arch: 'gcc_64' | |
modules: 'qtcharts qtconnectivity qtserialbus qtserialport qtwebsockets' | |
# extra: '--exclude-libs=libmimerapi' | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v2 | |
- name: Create Build Environment | |
run: | | |
mkdir build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DVSCP_ROOT=${{github.workspace}}/third_party/vscp/ -DVSCP_PATH=${{github.workspace}}/third_party/vscp/ .. | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
run: | | |
make -j$(nproc) | |
make install DESTDIR=AppDir | |
- name: get linuxdeploy | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# Install files | |
run: wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
- name: get qt plugin | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# Install files | |
run: wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | |
- name: Make appimage files executable | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# Install files | |
run: chmod +x linuxdeploy*.AppImage | |
- name: prepare AppRun | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# Prepare content not installed by cmake (AppRun) | |
run: | | |
cp ../install/AppRun AppDir | |
chmod a+x AppDir/AppRun | |
cp ../install/vscp-works-qt.desktop AppDir | |
cp ../icons/vscpworks.png AppDir | |
- name: prepare desktop/icon | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# Prepare content not installed by cmake (desktop/icon) | |
run: cp ../install/vscp-works-qt.desktop ./AppDir/ && cp ../icons/vscpworks.png ./AppDir/ | |
- name: build appimage | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# initialize AppDir, bundle shared libraries for QtQuickApp, use Qt plugin to bundle additional resources, and build AppImage, all in one single command | |
# https://forum.qt.io/topic/154845/libmimerapi-so-not-found/4 | |
run: ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: vscp-works-qt | |
path: ${{github.workspace}}/build/vscpworks*.AppImage |