Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/Tools/scripts/configure-ci.sh
Views: 1798
#!/usr/bin/env bash1# Install dependencies and configure the environment for CI build testing23set -ex45# Disable ccache for the configure phase, it's not worth it6export CCACHE_DISABLE="true"78ARM_ROOT="gcc-arm-none-eabi-10-2020-q4-major"9ARM_TARBALL="$ARM_ROOT-x86_64-linux.tar.bz2"1011RPI_ROOT="master"12RPI_TARBALL="$RPI_ROOT.tar.gz"1314MUSL_ROOT="arm-linux-musleabihf-cross"15MUSL_TBZ="$MUSL_ROOT.tgz"1617CCACHE_ROOT="ccache-3.4.2"18CCACHE_TARBALL="$CCACHE_ROOT.tar.bz2"1920mkdir -p $HOME/opt21pushd $HOME2223# STM32 toolchain24dir=$ARM_ROOT25if [ ! -d "$HOME/opt/$dir" -o ! -x "$HOME/opt/$dir/bin/arm-none-eabi-g++" ]; then26wget https://firmware.ardupilot.org/Tools/STM32-tools/$ARM_TARBALL27tar -xf $ARM_TARBALL -C opt28fi2930# RPi/BBB toolchain31dir="tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64"32if [ ! -d "$HOME/opt/$dir" -o ! -x "$HOME/opt/$dir/bin/arm-linux-gnueabihf-g++" ]; then33wget https://firmware.ardupilot.org/Tools/Travis/NavIO/$RPI_TARBALL34tar -xf $RPI_TARBALL -C opt $dir35fi3637# musl toolchain38dir=$MUSL_ROOT39if [ ! -d "$HOME/opt/$dir" -o ! -x "$HOME/opt/$dir/bin/arm-linux-musleabihf-g++" ]; then40wget https://musl.cc/$MUSL_TBZ41tar -xf $MUSL_TBZ -C opt42fi4344# ccache45dir=$CCACHE_ROOT46if [ ! -d "$HOME/opt/$dir" ]; then47# if version 3.4 isn't there, try to remove older v3.3 folders from CI cache48rm -rf "$HOME/opt"/ccache-3.3*4950wget https://www.samba.org/ftp/ccache/$CCACHE_TARBALL51tar -xf $CCACHE_TARBALL52pushd $CCACHE_ROOT53./configure --prefix="/tmp" --bindir="$HOME/opt/$dir"54make55make install56popd57fi5859popd6061mkdir -p $HOME/bin6263# symlink to compiler versions64ln -s /usr/bin/clang-7 ~/bin/clang65ln -s /usr/bin/clang++-7 ~/bin/clang++66ln -s /usr/bin/llvm-ar-7 ~/bin/llvm-ar6768mkdir -p $HOME/ccache6970# configure ccache71ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/g++72ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/gcc73ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-none-eabi-g++74ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-none-eabi-gcc75ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-gnueabihf-g++76ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-gnueabihf-gcc77ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-musleabihf-gcc78ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-musleabihf-g++79ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/clang++80ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/clang8182exportline="export PATH=$HOME/ccache"83exportline="${exportline}:$HOME/bin"84exportline="${exportline}:$HOME/.local/bin"85exportline="${exportline}:$HOME/opt/gcc-arm-none-eabi-10-2020-q4-major/bin"86exportline="${exportline}:$HOME/opt/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin"87exportline="${exportline}:$HOME/opt/arm-linux-musleabihf-cross/bin"88exportline="${exportline}:$HOME/opt/$CCACHE_ROOT"89exportline="${exportline}:\$PATH"9091if grep -Fxq "$exportline" ~/.profile; then92echo "nothing to do";93else94echo $exportline >> ~/.profile;95fi9697. ~/.profile9899python -m pip install --progress-bar off --user -U argparse pyserial pexpect future lxml100python -m pip install --progress-bar off --user -U intelhex101python -m pip install --progress-bar off --user -U numpy102python -m pip install --progress-bar off --user -U edn_format103python -m pip install --progress-bar off --user -U empy==3.3.4104105106