Skip to content

Commit

Permalink
Add CI for AppImage release
Browse files Browse the repository at this point in the history
  • Loading branch information
Maarrk committed Jun 20, 2024
1 parent 540c40c commit a676b87
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .github/workflows/linux_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Linux Release

on:
push:
branches:
- "dev"

defaults:
run:
shell: bash

env:
SOURCE_DIR: ${{ github.workspace }}
ARTIFACT: marsh-mgr.AppImage
QT_VERSION: 6.5

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: recursive

- name: Generate MAVLink dialect
run: |
pip3 install future
python3 ${{ env.SOURCE_DIR }}/scripts/update_mavlink.py
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: linux
target: desktop
arch: gcc_64
dir: ${{ runner.temp }}
setup-python: false

- name: Install AppImage prerequisites
run: sudo apt install libfuse2

- name: Install LinuxDeploy
uses: miurahr/install-linuxdeploy-action@v1
with:
plugins: qt appimage
dir: ${{ github.workspace }}/tools

- name: Build AppImage
run: |
cp ${{ github.workspace }}/tools/linuxdeploy-x86_64.AppImage ${{ github.workspace }}/tools/linuxdeploy
Qt6_DIR=${QT_ROOT_DIR} PATH=${{ github.workspace }}/tools:$PATH ./scripts/build_appimage.sh
- name: Linux artefact
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.SOURCE_DIR }}/MARSH_Manager-x86_64.AppImage
3 changes: 2 additions & 1 deletion scripts/build_appimage.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#! /bin/bash
# based on https://docs.appimage.org/packaging-guide/from-source/native-binaries.html#using-cmake-and-make-install
# accepts a single argument for build type, by default Release

set -x
set -e
Expand Down Expand Up @@ -44,7 +45,7 @@ pushd "$BUILD_DIR"

# configure build files with CMake
# we need to explicitly set the install prefix, as CMake's default is /usr/local for some reason...
cmake "$REPO_ROOT" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
cmake "$REPO_ROOT" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${1:-Release}

# build project and install files into AppDir
make -j$(nproc)
Expand Down
5 changes: 5 additions & 0 deletions scripts/update_mavlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"""
Generates required libraries based on the message definitions in mavlink submodule.
Doesn't accept any arguments by design.
Requires future package, example of installation:
```
pip install future
```
"""

from os import path, makedirs
Expand Down

0 comments on commit a676b87

Please sign in to comment.