Skip to content

Commit

Permalink
Return appimage
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaraslaut committed Feb 29, 2024
1 parent df4a80b commit 27390e9
Showing 1 changed file with 71 additions and 71 deletions.
142 changes: 71 additions & 71 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -625,77 +625,77 @@ jobs:
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
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: "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=5" >> "$GITHUB_OUTPUT"
- name: "Install gcc-10"
run: sudo apt -y install gcc-10
- 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=5 -DCMAKE_CXX_COMPILER=g++-10"
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: "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.
DEBUG=1 QT_SELECT=5 linuxdeploy-x86_64.AppImage --output=appimage --appdir Appdir
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
# }}}
# {{{ Ubuntu 20.04 / 22.04
package_for_Ubuntu:
Expand Down

0 comments on commit 27390e9

Please sign in to comment.