Skip to content

Commit

Permalink
gha: Add job to build Talipot AppImage with Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
anlambert committed May 17, 2024
1 parent 1c22b93 commit 524f20f
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 14 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/appimage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ jobs:
fail-fast: false
matrix:
config:
- name: Talipot AppImage build on CentOS 8
- name: Talipot AppImage build on CentOS 8 Stream
docker-image: tgagor/centos-stream:8
centos-version: centos8
- name: Talipot AppImage build on CentOS 9 Stream
docker-image: dokken/centos-stream-9
centos-version: centos9
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand Down Expand Up @@ -90,7 +94,7 @@ jobs:
- name: Upload Taliot AppImage to GitHub Actions artifacts
uses: actions/upload-artifact@v4
with:
name: Talipot-AppImage
name: Talipot-AppImage-${{ matrix.config.centos-version }}
path: ./build/Talipot*.AppImage
- name: Upload Talipot bundle to dev-latest prerelease
if: github.ref == 'refs/tags/dev-latest'
Expand Down
9 changes: 9 additions & 0 deletions bundlers/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ ADD_CUSTOM_TARGET(
-e DISPLAY=$DISPLAY tgagor/centos-stream:8 /bin/bash -c
"bash -xe /talipot/bundlers/linux/talipot_appimage_centos_build.sh"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

ADD_CUSTOM_TARGET(
bundle-qt6
COMMAND
docker run --rm=true -it -v ${CMAKE_SOURCE_DIR}:/talipot:rw -v
${CMAKE_BINARY_DIR}:/talipot_host_build:rw -v /tmp/.X11-unix:/tmp/.X11-unix
-e DISPLAY=$DISPLAY dokken/centos-stream-9 /bin/bash -c
"bash -xe /talipot/bundlers/linux/talipot_appimage_centos_build.sh"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
6 changes: 3 additions & 3 deletions bundlers/linux/talipot.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<name>Talipot</name>
<summary>Display, analyze and edit relational data</summary>
<description>
<p>Talipot is an information visualization framework dedicated to the analysis and visualization of relational data.</p>
<p>Talipot is an information visualization framework dedicated to the analysis and visualization
of relational data.</p>
</description>
<icon type="cached">Talipot.png</icon>
<launchable type="desktop-id">talipot.desktop</launchable>
<url type="homepage">https://github.com/anlambert/talipot</url>
<provides>
<id>talipot.desktop</id>
</provides>
</component>
</component>
42 changes: 33 additions & 9 deletions bundlers/linux/talipot_appimage_centos_build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash

# this script should only be run in a CentOS Stream 8.x docker image
# this script should only be run in a CentOS Stream [8|9].x docker image

centos8=true
centos9=false
if grep -q "CentOS Stream release 9" /etc/centos-release
then
centos8=false
centos9=true
fi

cd

Expand All @@ -12,22 +20,37 @@ yum -y update
# install base build system
yum -y install epel-release
yum -y install xz tar gzip make wget ccache
yum -y install dnf-plugins-core

if [ "$centos8" = true ]
then
# add extra CentOS 8 repositories to get some build dependencies
yum config-manager --set-enabled powertools
yum -y install https://pkgs.dyn.su/el8/base/x86_64/raven-release-1.0-2.el8.noarch.rpm
talipot_use_qt6=OFF
qmake=qmake-qt5
else
# add extra CentOS 9 repositories to get some build dependencies
yum config-manager --set-enabled crb
talipot_use_qt6=ON
qmake=qmake
fi

# add extra CentOS 8 repositories to get some build dependencies
yum -y install dnf-plugins-core
yum config-manager --set-enabled powertools
yum -y install https://pkgs.dyn.su/el8/base/x86_64/raven-release-1.0-2.el8.noarch.rpm
yum -y install cmake


# install talipot deps
yum -y install zlib-devel libzstd-devel qhull-devel yajl-devel \
graphviz-devel libgit2-devel binutils-devel
yum -y install freetype-devel fontconfig-devel glew-devel fribidi-devel
yum -y install qt5-qtbase-devel qt5-qtimageformats qt5-qtsvg \
quazip-qt5-devel qt5-qtwebkit-devel --enablerepo=epel-testing --nobest

if [ "$centos8" = true ]
then
yum -y install qt5-qtbase-devel qt5-qtimageformats qt5-qtsvg \
quazip-qt5-devel qt5-qtwebkit-devel --enablerepo=epel-testing --nobest
else
yum -y install qt6-qtbase-devel qt6-qtimageformats qt6-qtsvg \
qt6-qtwebengine-devel qt6-qt5compat-devel
fi

# install Python 3, Sphinx and SIP
yum -y install python3.11-devel python3.11-pip
Expand Down Expand Up @@ -60,6 +83,7 @@ cmake -DCMAKE_BUILD_TYPE=Release \
-DTALIPOT_USE_CCACHE=ON \
-DTALIPOT_BUILD_FOR_APPIMAGE=ON \
-DTALIPOT_BUILD_TESTS=ON \
-DTALIPOT_USE_QT6=$talipot_use_qt6 \
-DOpenMP_C_FLAGS=-fopenmp \
-DOpenMP_CXX_FLAGS=-fopenmp ..

Expand All @@ -77,7 +101,7 @@ continuous/appimagetool-$(uname -p).AppImage"
chmod a+x appimagetool-$(uname -p).AppImage

# finally build the portable app
TALIPOT_APPIMAGE=Talipot-$(sh talipot-config --version)-$(uname -p).AppImage
TALIPOT_APPIMAGE=Talipot-$(sh talipot-config --version)-$(uname -p)-qt$($qmake -query QT_VERSION).AppImage
./appimagetool-$(uname -p).AppImage --appimage-extract-and-run Talipot.AppDir $TALIPOT_APPIMAGE
chmod +x $TALIPOT_APPIMAGE

Expand Down

0 comments on commit 524f20f

Please sign in to comment.