Skip to content

test-homebrew-linux-appimage #2

test-homebrew-linux-appimage

test-homebrew-linux-appimage #2

name: test-homebrew-linux-appimage
on:
workflow_dispatch:
env:
REF_TAG: v1.1.1
jobs:
build:
runs-on: ubuntu-22.04
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
with:
repository: ctlcltd/e2-sat-editor
# ref: ${{ env.REF_TAG }}
path: e2-sat-editor
- name: Setup Aptitude
run: |
sudo apt-get install libgl1-mesa-dev libglvnd-dev libxcb-xkb-dev libxkbcommon-x11-dev libvulkan-dev
- name: Setup Homebrew
run: |
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
brew install cmake ninja qt6 curl
- name: Configure CMake
working-directory: ${{github.workspace}}/e2-sat-editor/src
run: |
PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
LD_LIBRARY_PATH=/home/linuxbrew/.linuxbrew/lib:$LD_LIBRARY_PATH
cmake \
-G Ninja \
-B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DWITHOUT_CLI=ON
- name: Build
working-directory: ${{github.workspace}}/e2-sat-editor/src
run: cmake --build build --config ${{ env.BUILD_TYPE }}
- name: Download tools
run: |
sudo apt-get install fuse wget
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
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
mv linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy
mv linuxdeploy-plugin-qt-x86_64.AppImage /usr/local/bin/linuxdeploy-plugin-qt
mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
- name: Deploy
working-directory: ${{github.workspace}}/e2-sat-editor/src
continue-on-error: true
run: |
PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
DESTDIR=../AppDir ninja -C build install
# copy translations
mkdir -p AppDir/usr/share/qt/translations
cp /home/linuxbrew/.linuxbrew/opt/qt/share/qt/translations/qt_*.qm AppDir/usr/share/qt/translations
cp /home/linuxbrew/.linuxbrew/opt/qt/share/qt/qtbase_*.qm AppDir/usr/share/qt/translations
rm -R AppDir/usr/share/qt/translations/qt_help_*.qm
# pre actions
rm AppDir/usr/share/applications/e2se-cli.desktop
mv AppDir/usr/share/applications/e2-sat-editor.desktop AppDir/usr/share/applications/io.github.ctlcltd.e2se.desktop
mv AppDir/usr/share/metainfo/io.github.ctlcltd.e2se.metainfo.xml AppDir/usr/share/metainfo/io.github.ctlcltd.e2se.appdata.xml
mkdir -p AppDir/usr/share/doc/e2-sat-editor
mv AppDir/usr/share/e2-sat-editor/Readme.txt.in AppDir/usr/share/doc/e2-sat-editor/readme
mv AppDir/usr/share/e2-sat-editor/COPYING AppDir/usr/share/doc/e2-sat-editor/copyright
# run linuxdeploy
LD_LIBRARY_PATH=/home/linuxbrew/.linuxbrew/lib:$LD_LIBRARY_PATH
linuxdeploy --appdir AppDir --plugin qt --output appimage
# package
mv e2_SAT_Editor-x86_64.AppImage ../artifact
chmod +x ../artifact
# - name: Test
# working-directory: ${{github.workspace}}/e2-sat-editor
# continue-on-error: true
# timeout-minutes: 1
# run: |
# DEBUG=1 QT_QPA_PLATFORM=minimal ./artifact
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact