[CI] Check runtime dependencies

This commit is contained in:
Mehdi Chinoune
2022-02-20 11:02:09 +01:00
parent 08a1d6e16b
commit 51e1982d72
2 changed files with 29 additions and 0 deletions

View File

@@ -81,6 +81,17 @@ for package in "${packages[@]}"; do
diff -Nur <(pacman -Fl "$pkgname" | sed -e 's|^[^ ]* |/|' | sort) <(pacman -Ql "$pkgname" | sed -e 's|^[^/]*||' | sort) || true
echo "::endgroup::"
echo "::group::[runtime-dependencies] ${pkgname}"
message "Runtime dependencies for ${pkgname}"
declare -a binaries=($(pacman -Ql $pkgname | sed -e 's|^[^ ]* ||' | grep -E ${MINGW_PREFIX}/bin/[^/]+\.\(dll\|exe\)$))
if [ "${#binaries[@]}" -ne 0 ]; then
for binary in ${binaries[@]}; do
echo "${binary}:"
ntldd -R ${binary} | grep -v "ext-ms\|api-ms\|WINDOWS\|Windows\|HvsiFileTrust\|wpaxholder"
done
fi
echo "::endgroup::"
echo "::group::[uninstall] ${pkgname}"
message "Uninstalling $pkgname"
repo-add $PWD/../artifacts/ci.db.tar.gz $PWD/$pkg
@@ -107,6 +118,23 @@ for package in "${packages[@]}"; do
cd - > /dev/null
echo "::endgroup::"
echo "::group::[runtime-dependencies] ${package}"
cd "$package"
for pkg in *.pkg.tar.*; do
pkgname="$(echo "$pkg" | rev | cut -d- -f4- | rev)"
message "Runtime dependencies for ${pkgname}"
declare -a binaries=($(pacman -Ql $pkgname | sed -e 's|^[^ ]* ||' | grep -E ${MINGW_PREFIX}/bin/[^/]+\.\(dll\|exe\)$))
if [ "${#binaries[@]}" -ne 0 ]; then
for binary in ${binaries[@]}; do
echo "${binary}:"
ntldd -R ${binary} | grep -v "ext-ms\|api-ms\|WINDOWS\|Windows\|HvsiFileTrust\|wpaxholder"
done
fi
done
cd - > /dev/null
echo "::endgroup::"
echo "::group::[uninstall] ${package}"
repo-add $PWD/artifacts/ci.db.tar.gz "${package}"/*.pkg.tar.*
pacman -Sy

View File

@@ -71,6 +71,7 @@ jobs:
shell: msys2 {0}
id: build
run: |
pacman -S --noconfirm ${MINGW_PACKAGE_PREFIX}-ntldd
cd /C/_
if [[ "$MSYSTEM" != "${{ matrix.msystem }}" ]]; then
MSYSTEM=${{ matrix.msystem }}