use rusEFI pruned ARM GCC 11.3 (#4763)

* use rusEFI pruned ARM GCC 11.3

* fix Firmware at GHA: avoid dash

* avoid double decompress in provide_gcc.sh

also ensure TMP_DIR, avoiding strange woes about GHA CI: ./firmware/provide_gcc.sh: 23: pushd: not found
This commit is contained in:
Nathan Schulte 2022-11-09 06:18:40 -06:00 committed by GitHub
parent b52c80ad6b
commit 00e43f9a46
2 changed files with 23 additions and 12 deletions

View File

@ -319,7 +319,7 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
sh ./firmware/provide_gcc.sh
./firmware/provide_gcc.sh
echo "::add-path::`pwd`/gcc-arm-none-eabi/bin"
# Make sure the compiler we just downloaded works - just print out the version
@ -440,7 +440,7 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
sh ./firmware/provide_gcc.sh
./firmware/provide_gcc.sh
echo "::add-path::`pwd`/gcc-arm-none-eabi/bin"
# Make sure the compiler we just downloaded works - just print out the version

View File

@ -4,20 +4,31 @@
set -e
URL="https://github.com/rusefi/build_support/raw/master/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz"
ARCHIVE="${URL##*/}"
DIR="gcc-arm-none-eabi"
# URL to download original toolchain from
URL="https://github.com/rusefi/build_support/raw/master/rusefi-arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz"
# colloquial directory name, to afford re-use of script
COLLOQUIAL="gcc-arm-none-eabi"
# temporary working directory
TMP_DIR="/tmp/rusefi-provide_gcc"
# Delete existing archive
rm -rf ${ARCHIVE}
archive="${URL##*/}"
# Cleanup prior [failed] runs
rm -rf "${TMP_DIR}"
# Download and extract archive
curl -L -o ${ARCHIVE} ${URL}
tar -xavf ${ARCHIVE}
echo Downloading and extracting ${archive}
mkdir -p "${TMP_DIR}"
cd "${TMP_DIR}"
curl -L -o "${archive}" "${URL}"
tar -xaf "${archive}"
rm "${archive}"
# Create colloquially named link
ARCHIVE_DIR=$(tar --exclude="*/*" -tf ${ARCHIVE})
ln -s ${ARCHIVE_DIR%/} ${DIR}
archive_dir="$(echo *)"
cd - >/dev/null
mv "${TMP_DIR}/${archive_dir}" "$(pwd)"
ln -s "${archive_dir%/}" "${COLLOQUIAL}"
# Delete downloaded archive
rm ${ARCHIVE}
rm -rf "${TMP_DIR}"