Skip to content

Commit

Permalink
add appimage build
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Sep 20, 2022
1 parent 188e3c8 commit 2c29561
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 17 deletions.
55 changes: 38 additions & 17 deletions .github/scripts/all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -ev

BUILDDIR="$PWD/builddir"

sudo apt-get install -y gettext

USE_VALGRIND=""
Expand All @@ -21,26 +23,45 @@ else
sudo -H python3 -m pip install meson ninja
fi

meson builddir
cd builddir
ninja -v
ninja dist
meson $BUILDDIR
cd $BUILDDIR

if [ -n "$USE_VALGRIND" ]; then
meson test --setup=valgrind
fi
if [ -z "${MAKE_APPIMAGE}" ]; then
ninja -v
ninja dist

# fake media root
meson test --setup=fake_media_root --suite rmw
if [ -n "$USE_VALGRIND" ]; then
meson test --setup=valgrind
fi

# nls disabled
meson configure -Dnls=false
ninja -v
meson test -v
# fake media root
meson test --setup=fake_media_root --suite rmw

# curses disabled
meson configure -Dwithout-curses=true
if [ -n "$USE_VALGRIND" ]; then
# nls disabled
meson configure -Dnls=false
ninja -v
meson test --setup=valgrind
meson test -v

# curses disabled
meson configure -Dwithout-curses=true
if [ -n "$USE_VALGRIND" ]; then
ninja -v
meson test --setup=valgrind
fi
else
VERSION=${GITHUB_REF_NAME:1}
meson configure -Dbuildtype=release -Dstrip=true -Dprefix=/usr
DESTDIR=AppDir ninja install
cp /usr/bin/rm AppDir/usr/bin
cd -
wget -nv https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${ARCH}.AppImage
chmod +x linuxdeploy-${ARCH}.AppImage
./linuxdeploy-${ARCH}.AppImage \
-d packaging/rmw.desktop \
--icon-file=packaging/rmw_icon_32x32.png \
--icon-filename=rmw \
--executable ${BUILDDIR}/AppDir/usr/bin/rmw \
--appdir ${BUILDDIR}/AppDir \
--output appimage
sha256sum rmw-${VERSION}-${ARCH}.AppImage > rmw-${VERSION}-${ARCH}.AppImage.sha256sum
fi
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

on:
push:
tags:
- v**

jobs:
build:
runs-on: ubuntu-20.04
env:
MAKE_APPIMAGE: true
ARCH: x86_64
steps:
- uses: actions/checkout@v3
- name: Prepare AppImage
run: sh ./.github/scripts/all_tests.sh

- name: Release AppImage
uses: ncipollo/release-action@v1
with:
allowUpdates: True
artifacts: "rmw*.AppImage*"
token: ${{ secrets.GITHUB_TOKEN }}
omitNameDuringUpdate: True
omitBodyDuringUpdate: True
replacesArtifacts: false
- name: remove artifacts
run: rm rmw*.AppImage*

0 comments on commit 2c29561

Please sign in to comment.