Skip to content

Commit

Permalink
Add AppImage to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
huxingyi committed Dec 13, 2022
1 parent ebc72f3 commit adc43e1
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/DEPLOYING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- pipeline
tags:
- '*'
pull_request:
Expand All @@ -27,15 +28,24 @@ jobs:
exit 1
fi
build:
runs-on: ubuntu-latest
# Use oldest ubuntu to make AppImage work
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
- name: Install Qt
run: |
sudo apt-get update
sudo apt-get install -y qtbase5-dev qt5-qmake libqt5svg5-dev
sudo apt-get install -y qt5-default libqt5svg5-dev
- name: Build application
run: |
cd ${GITHUB_WORKSPACE}/application
qmake
make
make -j`nproc`
- name: Generate AppImage
run: |
sudo apt-get install -y libfuse2
cd ${GITHUB_WORKSPACE} && sh ./ci/appimage/bundle.sh
- name: Archive AppImage
uses: actions/upload-artifact@v3
with:
path: Dust3D-x86_64.AppImage
19 changes: 19 additions & 0 deletions ci/appimage/bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Exit when any command fails
set -e

# Download appimage tools
wget --no-verbose -O ./ci/appimage/linuxdeployqt-continuous-x86_64.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x ./ci/appimage/linuxdeployqt-continuous-x86_64.AppImage

# Create appdir directories
mkdir -p appdir/usr/share/applications
mkdir -p appdir/usr/bin

# Copy application related files
cp ./ci/appimage/dust3d.png appdir/dust3d.png
cp ./ci/appimage/dust3d.desktop appdir/usr/share/applications/dust3d.desktop
cp ./application/dust3d appdir/usr/bin/dust3d

# Make bundle
./ci/appimage/linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage
mv Dust3D-*-x86_64.AppImage Dust3D-x86_64.AppImage
7 changes: 7 additions & 0 deletions ci/appimage/dust3d.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Dust3D
Icon=dust3d
Exec=dust3d
Categories=Graphics;
Comment=A quick 3D modeling tool
Binary file added ci/appimage/dust3d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ci/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit adc43e1

Please sign in to comment.