-
Notifications
You must be signed in to change notification settings - Fork 3
Convert Travis CLI AppImage Build Script to GitHub Actions Script #5
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: Build AppImage | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - master | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-22.04 | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get update -qq | ||
| sudo apt-get -y install git pkg-config build-essential fuse libfuse2 qt5-qmake \ | ||
| libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \ | ||
| qtdeclarative5-dev qtwebengine5-dev libxtst-dev liblzo2-dev libbz2-dev \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. QtWebEngine is not a dependency of GoldenDict master, only of goldendict#1542. So I do not think it should be here. libqtwebkit-dev probably refers to the Qt4 WebKit, so it isn't needed either. libqt5webkit5-dev (below) is sufficient. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does installing the unnecessary dependency
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct. |
||
| libao-dev libavutil-dev libavformat-dev libswresample-dev libtiff5-dev libeb16-dev \ | ||
| libqt5webkit5-dev libqt5svg5-dev libqt5x11extras5-dev qttools5-dev \ | ||
| qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins libopencc-dev liblzma-dev libzstd-dev doxygen cmake | ||
|
|
||
| - name: Build OpenCC | ||
| run: | | ||
| git clone https://github.com/BYVoid/OpenCC | ||
| cd OpenCC/ | ||
| make PREFIX=/usr -j$(nproc) | ||
| sudo make install | ||
|
|
||
| - name: Build GoldenDict | ||
| run: | | ||
| qmake CONFIG+=release PREFIX=/usr CONFIG+=old_hunspell CONFIG+=zim_support | ||
| make -j$(nproc) | ||
| make INSTALL_ROOT=appdir -j$(nproc) install | ||
| find appdir/ | ||
|
|
||
| - name: Download and prepare linuxdeployqt | ||
| run: | | ||
| wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | ||
| chmod a+x linuxdeployqt-continuous-x86_64.AppImage | ||
| unset QTDIR | ||
| unset QT_PLUGIN_PATH | ||
| unset LD_LIBRARY_PATH | ||
| mkdir -p appdir/usr/lib/ | ||
| cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 appdir/usr/lib/ || \ | ||
| cp /usr/lib/x86_64-linux-gnu/libssl.so.3 appdir/usr/lib/ || true | ||
| cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 appdir/usr/lib/ || \ | ||
| cp /usr/lib/x86_64-linux-gnu/libcrypto.so.3 appdir/usr/lib/ || true | ||
| ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage | ||
|
|
||
| - name: Inspect linked libraries | ||
| if: success() | ||
| run: | | ||
| find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq | ||
|
|
||
| - name: Upload AppImage artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: GoldenDict-AppImage | ||
| path: GoldenDict*.AppImage* | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Abs62 - This "on" section tells GitHub when to run this build. Right now I have it set to run "when a maintainer asks for it" ("workflow_dispatch") and when "master" branch is pushed. You can also set it up to run on pull requests, new releases, etc. See the full set of triggering option here: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows