File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -40,38 +40,30 @@ jobs:
4040 run : |
4141 set -euo pipefail
4242
43- sudo dpkg --add-architecture ${{ matrix.platform.arch }}
4443 sudo apt-get update -y -qq
4544
46- CANDIDATES="$(apt-cache search '^liblua[0-9]+\.[0-9]+-dev$' | awk '{print $1}' )"
45+ CANDIDATES="$(apt-cache pkgnames | grep -E '^liblua[0-9]+\.[0-9]+-dev$' || true )"
4746
4847 if [ -z "$CANDIDATES" ]; then
4948 echo "No libluaX.Y-dev package found"
5049 exit 1
5150 fi
5251
53- VALID_PACKAGES=""
54- for pkg in $CANDIDATES; do
55- if apt-cache show "${pkg}:${{ matrix.platform.arch }}" >/dev/null 2>&1; then
56- VALID_PACKAGES="${VALID_PACKAGES}${pkg}"$'\n'
57- fi
58- done
59-
60- if [ -z "$VALID_PACKAGES" ]; then
61- echo "No Lua package available for architecture ${{ matrix.platform.arch }}"
62- exit 1
63- fi
64-
6552 BEST_PKG="$(
66- printf '%s\n' "$VALID_PACKAGES " \
53+ printf '%s\n' "$CANDIDATES " \
6754 | sed -E 's/^liblua([0-9]+\.[0-9]+)-dev$/\1 &/' \
6855 | sort -V \
6956 | tail -n1 \
7057 | awk '{print $2}'
7158 )"
7259
60+ if [ -z "$BEST_PKG" ]; then
61+ echo "Failed to determine Lua package"
62+ exit 1
63+ fi
64+
7365 echo "lua_pkg=$BEST_PKG" >> "$GITHUB_OUTPUT"
74- echo "Using $BEST_PKG for ${{ matrix.platform.arch }} "
66+ echo "Using $BEST_PKG"
7567
7668 - name : Setup Dependencies (common)
7769 run : |
You can’t perform that action at this time.
0 commit comments