fix CI build pipeline
This commit is contained in:
1 parent
b60e18fe6b
commit
c19cd28de8
9 files changed
+99
-17
No files matched your search
@@ -5,8 +5,8 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates clang cmake ninja-build pkg-config libgtk-3-dev \
|
||||
librsvg2-dev libgirepository1.0-dev libgdk-pixbuf-2.0-dev libgtk-3-bin \
|
||||
libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-dev binutils patchelf curl jq \
|
||||
file desktop-file-utils xdg-user-dirs git rsync unzip xz-utils make g++ \
|
||||
libgdk-pixbuf2.0-bin binutils patchelf curl jq \
|
||||
file desktop-file-utils xdg-user-dirs git rsync unzip xz-utils make g++ dpkg-dev \
|
||||
libssl-dev libunwind-dev libvulkan-dev libgl1-mesa-dev libglu1-mesa-dev \
|
||||
libasound2-dev libsecret-1-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -50,4 +50,60 @@ assert_fails download_verified "file://$temporary/input" \
|
||||
printf 'corruption\n' >> "$temporary/cache/tool"
|
||||
assert_fails download_verified "file://$temporary/input" "$checksum" "$temporary/cache/tool"
|
||||
|
||||
mkdir -p "$temporary/project/scripts/appimage"
|
||||
touch "$temporary/project/pubspec.lock"
|
||||
cp "$project/scripts/appimage/Dockerfile" "$temporary/project/scripts/appimage/"
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
podman() {
|
||||
case "$1" in
|
||||
info) [[ "$mock_engine" == podman ]] ;;
|
||||
image) return 0 ;;
|
||||
run) printf '%s\n' "$@" > "$temporary/container-arguments" ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
docker() {
|
||||
case "$1" in
|
||||
info|image) return 0 ;;
|
||||
run) printf '%s\n' "$@" > "$temporary/container-arguments" ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
mock_engine=podman
|
||||
package_container "$temporary/project" "$temporary/output" \
|
||||
"$project/scripts/appimage-tools.json" "$temporary/container-cache"
|
||||
grep -Fxq -- '--userns=keep-id' "$temporary/container-arguments"
|
||||
grep -Fxq -- "$(id -u):$(id -g)" "$temporary/container-arguments"
|
||||
|
||||
mock_engine=docker
|
||||
package_container "$temporary/project" "$temporary/output" \
|
||||
"$project/scripts/appimage-tools.json" "$temporary/container-cache"
|
||||
assert_fails grep -Fxq -- '--userns=keep-id' "$temporary/container-arguments"
|
||||
grep -Fxq -- "$(id -u):$(id -g)" "$temporary/container-arguments"
|
||||
unset -f podman docker
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
readelf() {
|
||||
printf '%s\n' "$mock_interpreter"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
getconf() {
|
||||
printf 'glibc %s\n' "$mock_glibc"
|
||||
}
|
||||
|
||||
mock_interpreter=/lib64/ld-linux-x86-64.so.2
|
||||
mock_glibc=2.39
|
||||
assert_fails requires_container_rebuild "$temporary/bundle/meshcore_open" 2.39
|
||||
mock_glibc=2.43
|
||||
requires_container_rebuild "$temporary/bundle/meshcore_open" 2.39
|
||||
mock_interpreter=/nix/store/glibc/lib/ld-linux-x86-64.so.2
|
||||
mock_glibc=2.39
|
||||
requires_container_rebuild "$temporary/bundle/meshcore_open" 2.39
|
||||
unset -f readelf getconf
|
||||
|
||||
printf 'AppImage packaging contract tests passed\n'
|
||||
Reference in new issue
Block a user