Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions .github/workflows/test_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,20 @@ jobs:
- name: Build AirLib
run: ./build.sh

- name: Build ROS Wrapper
- name: Build ROS2 Jammy Wrapper
if: matrix.os == 'ubuntu-22.04'
run: |
./tools/install_ros_deps.sh
chmod +x ./tools/install_ros2_deps.sh
./tools/install_ros2_deps.sh
source /opt/ros/*/setup.bash
cd ros
catkin build -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12
cd ros2
colcon build --cmake-args -DCMAKE_C_COMPILER=gcc-12 --cmake-args -DCMAKE_CXX_COMPILER=g++-12

- name: Build ROS2 Wrapper
if: matrix.os == 'ubuntu-22.04'
- name: Build ROS2 Foxy Wrapper
if: matrix.os == 'ubuntu-24.04'
run: |
chmod +x ./tools/install_ros2_deps.sh
./tools/install_ros2_deps.sh
source /opt/ros/*/setup.bash
cd ros2
colcon build --cmake-args -DCMAKE_C_COMPILER=gcc-12 --cmake-args -DCMAKE_CXX_COMPILER=g++-12

# Removing support for GazeboDrone. Gazebo is dead. Long live AirSim/Colosseum.
# - name: Build GazeboDrone
# run: |
# sudo apt-get install -qq libgazebo9-dev gcc-12 g++-12
# ./clean.sh && ./build.sh --gcc
# cd GazeboDrone
# mkdir build && cd build
# cmake -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 ..
# make
2 changes: 1 addition & 1 deletion build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build_dir=build
mkdir -p build
cd build

CC=/usr/bin/clang-18 CXX=/usr/bin/clang++-18 cmake ../cmake -DCMAKE_CXX_FLAGS='-stdlib=libc++ -I/usr/lib/llvm-17/include/c++/v1~'
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake ../cmake -DCMAKE_CXX_FLAGS='-stdlib=libc++'

make -j$(nproc)

Expand Down
39 changes: 28 additions & 11 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pushd "$SCRIPT_DIR" >/dev/null

downloadHighPolySuv=true

MIN_CMAKE_VERSION=3.10.0
MIN_CMAKE_VERSION=3.19.2
# On macOS, make sure we have a CMake that will support CMAKE_APPLE_SILICON_PROCESSOR.
if [ "$(uname)" == "Darwin" ]; then
MIN_CMAKE_VERSION=3.19.2
Expand Down Expand Up @@ -50,7 +50,7 @@ else #linux
software-properties-common \
wget \
libvulkan1 \
vulkan-utils
vulkan-tools

#install clang and build tools
VERSION=$(lsb_release -rs | cut -d. -f1)
Expand All @@ -60,7 +60,11 @@ else #linux
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
fi
sudo apt-get install -y clang-12 clang++-12 libc++-12-dev libc++abi-12-dev
if [ "$VERSION" == "22" ]; then
sudo apt-get install -y clang-14 clang++-14 libc++-14-dev libc++abi-14-dev
else
sudo apt-get install -y clang-17 clang++-17 libc++-17-dev libc++abi-17-dev
fi
fi

if ! which cmake; then
Expand Down Expand Up @@ -103,22 +107,35 @@ else #linux
if version_less_than_equal_to "$cmake_ver" "$MIN_CMAKE_VERSION"; then
# in ubuntu 18 docker CI, avoid building cmake from scratch to save time
# ref: https://apt.kitware.com/
if [ "$(lsb_release -rs)" == "18.04" ]; then
ubuntu_version="$(lsb_release -rs)"

if [[ "$ubuntu_version" == "22.04" ]]; then
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
gnupg
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get -y install --no-install-recommends \
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ jammy main"
sudo apt update && apt-get -y install --no-install-recommends \
make \
cmake

cmake \
openssl
elif [[ "$ubuntu_version" == "24.04" ]]; then
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
gnupg
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ noble main"
sudo apt update && apt-get -y install --no-install-recommends \
make \
cmake \
openssl
else
# For Ubuntu 16.04, or anything else, build CMake 3.10.2 from source
# For anything else, build CMake 3.10.2 from source
if [[ ! -d "cmake_build/bin" ]]; then
echo "Downloading cmake..."
wget https://cmake.org/files/v3.10/cmake-3.10.2.tar.gz \
wget https://cmake.org/files/v3.28/cmake-3.28.4.tar.gz \
-O cmake.tar.gz
tar -xzf cmake.tar.gz
rm cmake.tar.gz
Expand Down Expand Up @@ -201,5 +218,5 @@ popd >/dev/null
set +x
echo ""
echo "************************************"
echo "AirSim setup completed successfully!"
echo "Colosseum setup completed successfully!"
echo "************************************"
9 changes: 6 additions & 3 deletions tools/install_ros2_deps.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
set -x

DISTRO="$(lsb_release -sc)"
if [[ "$DISTRO" == "focal" ]]; then
ROS_DISTRO="galactic"
if [[ "$DISTRO" == "jammy" ]]; then
ROS_DISTRO="humble"

elif [[ "$DISTRO" == "noble" ]]; then
ROS_DISTRO="kilted"
else
echo "ROS2 support only ubuntu focal"
echo "ROS2 support only ubuntu jammy (22.04) and noble (24.04) at the moment."
exit 1
fi

Expand Down
Loading