test #385
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}}/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 | |
# https://github.com/marketplace/actions/install-qt | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.8.0 | |
host: 'linux' | |
target: 'desktop' | |
arch: 'linux_gcc_64' | |
modules: 'qtcharts qtconnectivity qtserialbus qtserialport qtwebsockets' | |
- name: Checkout vscp repo | |
uses: actions/checkout@v4 | |
with: | |
repository: grodansparadis/vscp | |
path: vscp | |
ref: development | |
submodules: recursive | |
- name: Checkout eclipse paho repo | |
uses: actions/checkout@v4 | |
with: | |
repository: eclipse/paho.mqtt.c | |
path: paho | |
- 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 paho manually | |
run: cd paho && mkdir build && cd build && sudo cmake -DPAHO_WITH_SSL=true .. && sudo make install | |
- 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: 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}}/vscp2/ -DVSCP_PATH=${{github.workspace}}/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 | |
run: ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage --exclude-libs=libqsqlmimer | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: vscp-works-qt | |
path: ${{github.workspace}}/build/vscpworks*.AppImage |