Add AppImage packaging for Linux (#13) #2
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: CI-Linux | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '6.6' | |
modules: 'qtmultimedia' | |
- name: Install build dependencies | |
env: | |
FFMPEG_DEPS: > | |
libavutil-dev | |
libavcodec-dev | |
libavformat-dev | |
libavfilter-dev | |
libswscale-dev | |
libswresample-dev | |
libfuse2 | |
APPIMAGE_DEPS: > | |
libfuse2 | |
libxcb-cursor0 | |
run: sudo apt install -y $FFMPEG_DEPS $APPIMAGE_DEPS | |
- name: Build | |
run: | | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release | |
cmake --build ${{github.workspace}}/build | |
- name: Install linuxdeploy | |
run: | | |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | |
chmod +x linuxdeploy-x86_64.AppImage | |
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage | |
- name: Build AppImage | |
# Qt6_DIR is set by the install-qt-action | |
run: > | |
QMAKE=$Qt6_DIR/bin/qmake | |
PATH=$Qt6_DIR/libexec:$PATH | |
./linuxdeploy-x86_64.AppImage | |
--appdir AppDir | |
-e ${{github.workspace}}/build/app/si-edit | |
-i ${{github.workspace}}/app/res/icon.svg | |
-d ${{github.workspace}}/app/res/AppImage.desktop | |
--plugin qt | |
--output appimage | |
- name: 'Upload Artifact: libweaver' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libweaver-Linux | |
path: ${{github.workspace}}/build/lib/libweaver.so | |
if-no-files-found: error | |
- name: 'Upload Artifact: AppImage' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SI-Edit-Linux.AppImage | |
path: ${{github.workspace}}/SI_Edit*.AppImage | |
if-no-files-found: error | |