Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppImage packaging for Qt6 and Ubuntu 22.04 #1481

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 73 additions & 73 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -628,78 +628,78 @@ jobs:
test/images
retention-days: 1
# }}}
# {{{ Linux AppImage (Using Ubuntu 20.04 as base).
# package_for_AppImage:
# name: "Packaging for AppImage"
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1.2
# with:
# key: "ccache-ubuntu2004-AppImage"
# max-size: 256M
# - name: Installing xmllint for ci-set-vars
# run: sudo apt -qy install libxml2-utils
# - name: "set environment variables"
# id: set_vars
# run: ./scripts/ci-set-vars.sh
# env:
# REPOSITORY: ${{ github.event.repository.name }}
# - name: "install linuxdeploy"
# run: |
# wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O /usr/local/bin/linuxdeploy
# chmod 0755 /usr/local/bin/linuxdeploy
# wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -O /usr/local/bin/linuxdeploy-plugin-qt-x86_64.AppImage
# chmod 0755 /usr/local/bin/linuxdeploy-plugin-qt-x86_64.AppImage
# - name: "install libfuse2 (Dependency of AppImage programs)"
# run: sudo apt -qy install libfuse2
# - name: "install dependencies"
# run: sudo ./scripts/install-deps.sh
# - name: "Post-fix embedded dependency permissions."
# run: sudo find _deps/sources -exec chown $UID {} \;
# - name: CMake version
# run: cmake --version
# - name: "cmake"
# run: |
# mkdir build
# BUILD_DIR="build" \
# CXX="g++-10" \
# CMAKE_BUILD_TYPE=RelWithDebInfo \
# EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS \
# -DCMAKE_INSTALL_PREFIX="/usr" \
# -DCONTOUR_INSTALL_TOOLS=ON \
# -DPEDANTIC_COMPILER=ON \
# -DPEDANTIC_COMPILER_WERROR=OFF \
# " \
# ./scripts/ci-prepare-contour.sh
# - name: "build"
# run: cmake --build build/ -- -j3
# - name: "test: crispy"
# run: ./build/src/crispy/crispy_test
# - name: "test: vtparser"
# run: ./build/src/vtparser/vtparser_test
# - name: "test: vtbackend"
# run: ./build/src/vtbackend/vtbackend_test
# - name: "test: vtrasterizer"
# run: ./build/src/vtrasterizer/vtrasterizer_test
# - name: "linuxdeploy: Creating AppImage"
# run: |
# set -ex
# cd build
# make install DESTDIR=AppDir
# # NB: The appdir path must be given absolute rather than relative, as otherwise the qt plugin won't work.
# DEBUG=1 QT_SELECT=5 linuxdeploy --appdir "$(pwd)/AppDir" --plugin qt --output appimage
# mv -v *.AppImage ../contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage
# - name: "Testing AppImage"
# run: ./contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage version
# - name: "Uploading AppImage"
# uses: actions/upload-artifact@v3
# with:
# name: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage"
# path: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage"
# if-no-files-found: error
# retention-days: 7
# {{{ Linux AppImage (Using Ubuntu 22.04 as base).
package_for_AppImage:
name: "Packaging for AppImage"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: "ccache-ubuntu2004-AppImage"
max-size: 256M
- name: "Update apt database"
run: sudo apt-get update
- name: Installing xmllint for ci-set-vars
run: sudo apt-get -qy install libxml2-utils
- name: Install LinuxDeploy
uses: miurahr/install-linuxdeploy-action@v1
with:
plugins: qt appimage
- name: "set environment variables"
id: set_vars
run: ./scripts/ci-set-vars.sh
env:
REPOSITORY: ${{ github.event.repository.name }}
- name: set QTVER
id: set_qtver
run: echo "QTVER=6" >> "$GITHUB_OUTPUT"
- name: "install dependencies"
run: sudo env QTVER="${{ steps.set_qtver.outputs.QTVER }}" ./scripts/install-deps.sh
- name: "Post-fix embedded dependency permissions."
run: sudo find _deps/sources -exec chown $UID {} \;
- name: "create build directory"
run: mkdir build
- name: Install CMake
uses: ssrobins/install-cmake@v1
- name: CMake version
run: cmake --version
- name: "cmake"
run: |
# TODO: turn on -Werror again, that requires some code changes.
CMAKE_CXX_STANDARD=20
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DCONTOUR_QT_VERSION=6"
BUILD_DIR="build" \
CMAKE_BUILD_TYPE=RelWithDebInfo \
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS \
-DCMAKE_CXX_STANDARD=$CMAKE_CXX_STANDARD \
-DCMAKE_INSTALL_PREFIX="$(pwd)/AppDir" \
-DCONTOUR_TESTING=ON \
" \
./scripts/ci-prepare-contour.sh
- name: "build"
run: cmake --build --preset linux-release / -- -j3
- name: "tests"
run: cmake --build --preset linux-release --target test
- name: "install libfuse2 (Dependency of AppImage programs)"
run: sudo apt -qy install libfuse2
- name: "linuxdeploy: Creating AppImage"
run: |
set -ex
cmake --build --preset linux-release --target install
# NB: The appdir path must be given absolute rather than relative, as otherwise the qt plugin won't work.
QML_SOURCES_PATHS=./src/contour/ui QMAKE=qmake6 DEBUG=1 QT_SELECT=6 linuxdeploy-x86_64.AppImage --output=appimage --appdir AppDir -e ./AppDir/bin/contour --plugin qt --icon-file=./AppDir/share/icons/hicolor/512x512/apps/org.contourterminal.Contour.png --desktop-file=./AppDir/share/applications/org.contourterminal.Contour.desktop
mv -v Contour-x86_64.AppImage contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage
- name: "Testing AppImage"
run: ./contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage version
- name: "Uploading AppImage"
uses: actions/upload-artifact@v3
with:
name: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage"
path: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage"
if-no-files-found: error
retention-days: 7
# }}}
# {{{ Ubuntu 20.04 / 22.04
package_for_Ubuntu:
Expand Down Expand Up @@ -1295,5 +1295,5 @@ jobs:
*.msi
*.zst
*.zip
# *.AppImage
*.AppImage
# }}}
1 change: 1 addition & 0 deletions metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
<description>
<ul>
<li>Add 'early_exit_threshold' config option (#1460)</li>
<li>Add AppImage package with Qt6 support (#586)</li>
<li>Add ability to customize the indicator statusline through configuration (#687)</li>
<li>Add generation of config file from internal state (#1282)</li>
<li>Add SGRSAVE and SGRRESTORE VT sequences to save and restore SGR state (They intentionally conflict with XTPUSHSGR and XTPOPSGR)</li>
Expand Down
Loading