diff --git a/.github/workflows/build_all_targets.yml b/.github/workflows/build_all_targets.yml index 264502229c..06c79d233b 100644 --- a/.github/workflows/build_all_targets.yml +++ b/.github/workflows/build_all_targets.yml @@ -92,13 +92,6 @@ jobs: ccache -s ccache -z - - name: Missing dependencies for ${{ matrix.arch }} - if: contains(fromJSON('["aarch64", "armhf"]'), matrix.arch) - run: | - apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \ - g++-aarch64-linux-gnu \ - g++-arm-linux-gnueabihf - - name: Building [${{ matrix.group }}] run: | ./Tools/ci/build_all_runner.sh ${{matrix.targets}} ${{matrix.arch}} diff --git a/Tools/setup/docker-entrypoint.sh b/Tools/setup/docker-entrypoint.sh index 0412558902..083a4c9f24 100755 --- a/Tools/setup/docker-entrypoint.sh +++ b/Tools/setup/docker-entrypoint.sh @@ -1,19 +1,27 @@ #!/bin/bash +GREEN='\033[0;32m' +NC='\033[0m' # No Color +FILE_DESCRIPTOR="${GREEN}[docker-entrypoint.sh]${NC}" + +echo -e "$FILE_DESCRIPTOR Starting" + # Start virtual X server in the background # - DISPLAY default is :99, set in dockerfile # - Users can override with `-e DISPLAY=` in `docker run` command to avoid # running Xvfb and attach their screen if [[ -x "$(command -v Xvfb)" && "$DISPLAY" == ":99" ]]; then - echo "[docker-entrypoint.sh] Starting Xvfb" + echo -e "$FILE_DESCRIPTOR Starting Xvfb" Xvfb :99 -screen 0 1600x1200x24+32 & fi # Check if the ROS_DISTRO is passed and use it # to source the ROS environment if [ -n "${ROS_DISTRO}" ]; then - echo "[docker-entrypoint.sh] ROS: ${ROS_DISTRO}" + echo -e "$FILE_DESCRIPTOR ROS: ${ROS_DISTRO}" source "/opt/ros/$ROS_DISTRO/setup.bash" fi +echo -e "$FILE_DESCRIPTOR ($( uname -m ))" + exec "$@" diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index e641a82da3..1df4e415b5 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -27,9 +27,12 @@ do fi done +echo "[ubuntu.sh] Starting..." +echo "[ubuntu.sh] arch: ${GREEN}$INSTALL_ARCH${NC}" + # detect if running in docker if [ -f /.dockerenv ]; then - echo "Running within docker, installing initial dependencies"; + echo "[ubuntu.sh] Running within docker, installing initial dependencies"; apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \ ca-certificates \ gnupg \ @@ -47,7 +50,7 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # check requirements.txt exists (script not run in source tree) REQUIREMENTS_FILE="requirements.txt" if [[ ! -f "${DIR}/${REQUIREMENTS_FILE}" ]]; then - echo "FAILED: ${REQUIREMENTS_FILE} needed in same directory as ubuntu.sh (${DIR})." + echo "[ubuntu.sh] FAILED: ${REQUIREMENTS_FILE} needed in same directory as ubuntu.sh (${DIR})." return 1 fi @@ -55,10 +58,8 @@ fi # check ubuntu version # otherwise warn and point to docker? UBUNTU_RELEASE="`lsb_release -rs`" -echo "Ubuntu ${UBUNTU_RELEASE}" - -echo -echo "Installing PX4 general dependencies" +echo "[ubuntu.sh] Ubuntu ${GREEN}${UBUNTU_RELEASE}${NC}" +echo "[ubuntu.sh] Installing PX4 general dependencies" sudo apt-get update -y --quiet sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ @@ -91,7 +92,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends i # Python3 dependencies echo -echo "Installing PX4 Python3 dependencies" +echo "[ubuntu.sh] Installing PX4 Python3 dependencies" PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}') REQUIRED_VERSION="3.11" if [[ "$(printf '%s\n' "$REQUIRED_VERSION" "$PYTHON_VERSION" | sort -V | head -n1)" == "$REQUIRED_VERSION" ]]; then @@ -109,8 +110,8 @@ fi if [[ $INSTALL_NUTTX == "true" ]]; then echo - echo "Installing NuttX dependencies" - + echo "[ubuntu.sh] NuttX Installing Dependencies" + sudo apt-get update -y --quiet sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ automake \ binutils-dev \ @@ -118,9 +119,6 @@ if [[ $INSTALL_NUTTX == "true" ]]; then build-essential \ curl \ flex \ - g++-multilib \ - gcc-arm-none-eabi \ - gcc-multilib \ gdb-multiarch \ genromfs \ gettext \ @@ -147,6 +145,25 @@ if [[ $INSTALL_NUTTX == "true" ]]; then vim-common \ ; + + echo + echo "[ubuntu.sh] NuttX Installing Dependencies ($INSTALL_ARCH)" + + if [[ "${INSTALL_ARCH}" == "x86_64" ]]; then + sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ + g++-multilib \ + gcc-arm-none-eabi \ + gcc-multilib \ + ; + fi + + if [[ "${INSTALL_ARCH}" == "aarch64" ]]; then + sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ + g++-aarch64-linux-gnu \ + g++-arm-linux-gnueabihf \ + ; + fi + if [ -n "$USER" ]; then # add user to dialout group (serial port access) sudo usermod -aG dialout $USER @@ -157,7 +174,7 @@ fi if [[ $INSTALL_SIM == "true" ]]; then echo - echo "Installing PX4 simulation dependencies" + echo "[ubuntu.sh] Installing PX4 simulation dependencies" # General simulation dependencies sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ @@ -182,8 +199,8 @@ if [[ $INSTALL_SIM == "true" ]]; then fi else # Expects Ubuntu 22.04 > by default - echo "Gazebo (Harmonic) will be installed" - echo "Earlier versions will be removed" + echo "[ubuntu.sh] Gazebo (Harmonic) will be installed" + echo "[ubuntu.sh] Earlier versions will be removed" # Add Gazebo binary repository sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null