fix(actions): fixed runner tooling setup and version parsing

- Updated Rust toolchain checks to use a prefix-aware grep pattern when validating installed components.
- Simplified the Zig installer action to extract into ~/.local and add the archive directory directly to PATH.
- Adjusted runner checks to parse sccache and gh version output via positional shell fields for stability.
This commit is contained in:
can1357
2026-06-15 01:15:25 +02:00
parent 551c599672
commit a6aa0c4ae8
4 changed files with 12 additions and 13 deletions
@@ -41,7 +41,7 @@ runs:
IFS=',' read -r -a wanted_components <<< "$COMPONENTS"
for component in "${wanted_components[@]}"; do
[ -z "$component" ] && continue
if ! rustup component list --toolchain "$TOOLCHAIN" --installed | grep -qx "$component"; then
if ! rustup component list --toolchain "$TOOLCHAIN" --installed | grep -qE "^${component}(-|$)"; then
missing_components+=("$component")
fi
done
+8 -9
View File
@@ -29,12 +29,11 @@ runs:
;;
esac
tmpdir="${RUNNER_TEMP:-/tmp}/zig-${ZIG_VERSION}"
bindir="${HOME}/.local/bin"
rm -rf "$tmpdir"
mkdir -p "$tmpdir" "$bindir"
curl -fsSL "https://ziglang.org/download/${ZIG_VERSION}/${archive}.tar.xz" -o "$tmpdir/zig.tar.xz"
tar -xJf "$tmpdir/zig.tar.xz" -C "$tmpdir"
install -m755 "$tmpdir/${archive}/zig" "$bindir/zig"
echo "$bindir" >> "$GITHUB_PATH"
echo "Installed zig $("$bindir/zig" version)"
destdir="${HOME}/.local"
mkdir -p "$destdir"
rm -rf "${destdir:?}/${archive}"
curl -fsSL "https://ziglang.org/download/${ZIG_VERSION}/${archive}.tar.xz" -o "${destdir}/zig.tar.xz"
tar -xJf "${destdir}/zig.tar.xz" -C "$destdir"
rm -f "${destdir}/zig.tar.xz"
echo "${destdir}/${archive}" >> "$GITHUB_PATH"
echo "Installed zig $("${destdir}/${archive}/zig" version)"