1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-28 07:23:37 +02:00

Make toolchain persistent accross runs

This commit is contained in:
Guillaume Chatelet 2018-02-14 09:59:29 +01:00
parent a25b5cbe7e
commit 5e016e4f1b
3 changed files with 7 additions and 3 deletions

View File

@ -5,6 +5,7 @@ sudo: false
cache:
directories:
- $HOME/qemu
- $HOME/toolchains
matrix:
include:

View File

@ -14,7 +14,7 @@ if [[ -n "${CROSS_COMPILE}" ]]; then
: "${QEMU_ARCH:?Need to set QEMU_ARCH non-empty}"
${SCRIPT_FOLDER}/setup_qemu.sh
${SCRIPT_FOLDER}/setup_toolchain.sh
export TOOLCHAIN=${HOME}/${TOOLCHAIN_NAME}
export TOOLCHAIN=${HOME}/toolchains/${TOOLCHAIN_NAME}
export PATH=${TOOLCHAIN}/bin:${HOME}/qemu/bin:${PATH}
export CMAKE_TOOLCHAIN_FILE=cmake/${TARGET}.cmake
if [[ ! -f ${CMAKE_TOOLCHAIN_FILE} ]]; then

View File

@ -4,7 +4,8 @@ set -e
: "${TOOLCHAIN_NAME:?Need to set TOOLCHAIN_NAME non-empty}"
: "${TARGET:?Need to set TARGET non-empty}"
if [[ -d "$HOME/${TOOLCHAIN_NAME}/${TARGET}" ]] ; then
if [[ -d "$HOME/toolchains/${TOOLCHAIN_NAME}/${TARGET}" ]] ; then
echo "toolchain ${TOOLCHAIN_NAME} ${TARGET} exists!"
exit 0
fi
@ -14,7 +15,9 @@ export ARCHIVE_NAME=${TOOLCHAIN_NAME}.tar.xz
echo "TOOLCHAIN: $TOOLCHAIN_NAME"
echo "TARGET : $TARGET"
cd $HOME
mkdir -p $HOME/toolchains
cd $HOME/toolchains
test -f "${ARCHIVE_NAME}" || wget https://releases.linaro.org/components/toolchain/binaries/latest/${TARGET}/${ARCHIVE_NAME}
tar -xJf ${ARCHIVE_NAME}
rm ${ARCHIVE_NAME}