forked from kozec/sc-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(appimage): move tests to docker
- Loading branch information
1 parent
d13807a
commit 1a310ee
Showing
2 changed files
with
39 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG BASE_OS=ubuntu | ||
ARG BASE_CODENAME=noble | ||
FROM $BASE_OS:$BASE_CODENAME | ||
ARG APPIMAGE_APT_DISTRO | ||
WORKDIR /tmp | ||
COPY *.AppImage /opt/ | ||
RUN <<EOR | ||
set -eu | ||
|
||
handle_failure() { | ||
return_code="${1}" | ||
codename="${APPIMAGE_APT_DISTRO}" | ||
case "${codename}" in | ||
noble|trixie|bookworm) echo "Ignoring failure ${return_code} for ${codename} which is currently known to cause a segmentation fault" ;; | ||
*) return "${return_code}" ;; | ||
esac | ||
} | ||
|
||
find /opt/ -maxdepth 1 -type f -name '*.AppImage' | while read -r file; do | ||
echo "${file}" | ||
chmod +x "${file}" | ||
rm -rf squashfs-root/ | ||
"${file}" --appimage-extract >/dev/null | ||
( | ||
cd squashfs-root/runtime/compat | ||
../../AppRun dependency-check || handle_failure "$?" "${file}" | ||
) | ||
done | ||
EOR |