diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/install.sh | 8 | ||||
| -rwxr-xr-x | scripts/install_riscv.sh | 12 |
2 files changed, 16 insertions, 4 deletions
diff --git a/scripts/install.sh b/scripts/install.sh index cb80c899..57796c9f 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -10,6 +10,8 @@ # SPDX-License-Identifier: MIT ############################################################################## +# Portions of this file were generated with AI assistance. + # # Install necessary softwares for Ubuntu. @@ -48,6 +50,11 @@ if ! retry sudo "${TIMEOUT[@]}" apt-get "${APT_OPTIONS[@]}" update; then echo "install.sh: gate and fails if any package needed is unavailable." echo "" fi +# CMake is not installed from apt: the pip install at the end of this script +# provides it, and on a runner the image's own CMake comes first on PATH anyway. +# The apt package was never used, and with its data package it was 13 of the +# 34 MB this install fetched. On 23 Oct 2026 the mirror served it at about +# 90 KB/s, and all three attempts timed out inside that one file. retry sudo "${TIMEOUT[@]}" apt-get "${APT_OPTIONS[@]}" install -y \ gcc-multilib \ git \ @@ -58,7 +65,6 @@ retry sudo "${TIMEOUT[@]}" apt-get "${APT_OPTIONS[@]}" install -y \ p7zip-full \ tofrodos \ gawk \ - cmake \ software-properties-common || exit 1 retry "${TIMEOUT[@]}" python3 -m pip install --retries 3 --timeout 30 --upgrade pip || exit 1 diff --git a/scripts/install_riscv.sh b/scripts/install_riscv.sh index 21e3ac85..801885c6 100755 --- a/scripts/install_riscv.sh +++ b/scripts/install_riscv.sh @@ -56,11 +56,17 @@ fi # job that runs qemu-system-riscv64 headless. That download is what pushes the # install past its two-minute budget on a slow mirror, and a larger budget is # not available: TIMEOUT_LONG is already sized so three attempts fit the step cap. +# +# CMake is installed only when none is on PATH. The runner image carries a newer +# one in /usr/local/bin, which shadows the apt package, so on a runner that +# package was 13 MB downloaded and never run. +packages=(qemu-system-misc ninja-build) +if ! command -v cmake > /dev/null; then + packages+=(cmake) +fi retry sudo "${TIMEOUT[@]}" apt-get "${APT_OPTIONS[@]}" install -y \ --no-install-recommends \ - qemu-system-misc \ - ninja-build \ - cmake || exit 1 + "${packages[@]}" || exit 1 echo "=== Downloading RISC-V GCC toolchain (${RELEASE_TAG}) ===" |
