Skip to content

Commit

Permalink
Enable Ubuntu 22.04 builds
Browse files Browse the repository at this point in the history
* Enable Ubuntu 22.04 builds
* Added support for gcc-11 and clang-14 on 22.04
* Updated github workflow to still build on 18.04
* Added support for clang-10 on 20.04
  • Loading branch information
fabianoboril authored Nov 13, 2023
1 parent a556e38 commit be6b68b
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 36 deletions.
62 changes: 54 additions & 8 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
jobs:
ubuntu18job:
name: Ubuntu 18.04
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

strategy:
matrix:
Expand All @@ -28,11 +28,6 @@ jobs:
CC: /usr/bin/gcc-8
CXX: /usr/bin/g++-8
PYTHON_BINDING_VERSION: "3.6 -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6"
- compiler: gcc9
EXTRA_PACKAGES: g++-9
CC: /usr/bin/gcc-9
CXX: /usr/bin/g++-9
PYTHON_BINDING_VERSION: "3.6 -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6"
- compiler: clang7
EXTRA_PACKAGES: clang-7
CC: /usr/bin/clang-7
Expand All @@ -44,9 +39,16 @@ jobs:
CXX: /usr/bin/clang++-8
PYTHON_BINDING_VERSION: "3.6 -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.6"

container:
image: ubuntu:18.04

steps:
- uses: actions/checkout@v2
- name: Install base packages
run: apt update && apt install -y git sudo

- uses: actions/checkout@v1
with:
depth:
submodules: recursive

- name: Install Dependencies
Expand All @@ -59,10 +61,11 @@ jobs:
EXTRA_PACKAGES: ${{ matrix.EXTRA_PACKAGES }}
PYTHON_BINDING_VERSION: ${{ matrix.PYTHON_BINDING_VERSION }}
run: |
sudo apt-get install ${EXTRA_PACKAGES}
sudo apt-get install -y ${EXTRA_PACKAGES}
rm -rf log build install
eval CC=${CC} CXX=${CXX} ${BUILDCMD}
ubuntu20job:
name: Ubuntu 20.04
runs-on: ubuntu-20.04
Expand All @@ -75,6 +78,48 @@ jobs:
CC: ""
CXX: ""
PYTHON_BINDING_VERSION: "3.8"
- compiler: clang10
EXTRA_PACKAGES: clang-10
CC: /usr/bin/clang-10
CXX: /usr/bin/clang++-10
PYTHON_BINDING_VERSION: "3.8"

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Install Dependencies
run: bash .github/workflows/install_dependencies.sh

- name: Build and Test
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
EXTRA_PACKAGES: ${{ matrix.EXTRA_PACKAGES }}
PYTHON_BINDING_VERSION: ${{ matrix.PYTHON_BINDING_VERSION }}
run: |
sudo apt-get install ${EXTRA_PACKAGES}
rm -rf log build install
eval CC=${CC} CXX=${CXX} ${BUILDCMD}
ubuntu22job:
name: Ubuntu 22.04
runs-on: ubuntu-22.04

strategy:
matrix:
include:
- compiler: gcc11
EXTRA_PACKAGES: ""
CC: ""
CXX: ""
PYTHON_BINDING_VERSION: "3.10"
- compiler: clang14
EXTRA_PACKAGES: clang-14
CC: /usr/bin/clang-14
CXX: /usr/bin/clang++-14
PYTHON_BINDING_VERSION: "3.10"

steps:
- uses: actions/checkout@v2
Expand All @@ -94,3 +139,4 @@ jobs:
sudo apt-get install ${EXTRA_PACKAGES}
rm -rf log build install
eval CC=${CC} CXX=${CXX} ${BUILDCMD}
25 changes: 17 additions & 8 deletions .github/workflows/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
#!/bin/bash

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
python3_pkgs="libpython3-dev python3 python3-pip python3-setuptools python3-wheel"
python2_pkgs="libpython-dev python python-pip python-wheel python-setuptools"
other_pkgs="build-essential castxml cmake libboost-all-dev libgtest-dev liblapacke-dev libopenblas-dev libpugixml-dev sqlite3"

sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential castxml cmake libboost-all-dev libgtest-dev liblapacke-dev libopenblas-dev libproj-dev libpugixml-dev libpython3-dev python python-setuptools python3 python3-pip python3-setuptools python3-wheel
sudo apt-get install -y lsb-core

if [ `lsb_release -a | grep Release | grep 20.04 | wc -l` == 1 ]; then
sudo apt-get install -y --no-install-recommends python-is-python3
else
sudo apt-get install -y --no-install-recommends python-pip python-wheel
if [ `lsb_release -a | grep Release | grep 18.04 | wc -l` == 1 ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
fi

sudo apt-get update
sudo apt-get install -y --no-install-recommends ${other_pkgs} ${python3_pkgs}

sudo pip3 install --upgrade setuptools==51.1.2
sudo pip3 install colcon-common-extensions xmlrunner pygccxml pyplusplus

if [ `lsb_release -a | grep Release | grep 20.04 | wc -l` != 1 ]; then
if [ `lsb_release -a | grep Release | grep 18.04 | wc -l` == 1 ]; then
sudo apt-get install -y --no-install-recommends ${python2_pkgs}
sudo pip2 install --upgrade setuptools==41.1.0
sudo pip2 install pygccxml pyplusplus xmlrunner
sudo pip2 install pygccxml==2.2.1 pyplusplus==1.8.4 xmlrunner
else
sudo apt-get install -y --no-install-recommends "python-is-python3"
fi

6 changes: 2 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
wheels:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python_binding_version: [2.7, 3.6, 3.7, 3.8]
Expand All @@ -25,12 +25,10 @@ jobs:
with:
fetch-depth: 1
submodules: recursive
- name: Prepare PROJ
run: |
git clone --depth=1 -b 4.9.3 https://github.com/OSGeo/PROJ.git dependencies/PROJ
- name: Build wheels
shell: bash
run: |
apt-get update && apt-get install sqlite3 -y
colcon build --packages-select PROJ4 --event-handlers console_direct+ --cmake-args -DCMAKE_POSITION_INDEPENDENT_CODE=ON
source install/setup.bash
colcon build --packages-up-to ad_rss_map_integration --meta colcon_python.meta --event-handlers console_direct+ --cmake-args -DPYTHON_BINDING_VERSION=${PYTHON_BINDING_VERSION}
Expand Down
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ Note: The RSS module in this library does not initiate evasive manuevers. At the
## Getting started <a name="started"></a>

#### Installation of dependencies
Currently, the focused operating systems are Ubuntu 18.04 and Ubuntu 20.04. Nevertheless, the library should work in a similar way for any other Linux OS.
To install the basic dependencies for Ubuntu 18.04/20.04 execute the following command:
Currently, the focused operating systems are Ubuntu 18.04, Ubuntu 20.04 and Ubuntu 22.04. Nevertheless, the library should work in a similar way for any other Linux OS.
To install the basic dependencies for Ubuntu 18.04/20.04/22.04 execute the following command:
```bash
user$> sudo apt-get install git build-essential cmake libboost-dev libpugixml-dev libgtest-dev libpython-dev libproj-dev
```
Expand All @@ -135,16 +135,23 @@ To download the library, you may run:
```

#### Supported systems <a name="systems"></a>
Development systems are Ubuntu 18.04 and Ubuntu 20.04.
Following compiler combinations are [tested continously](https://github.com/intel/ad-rss-lib/blob/master/.travis.yml):

| | Ubuntu 18.04 | Ubuntu 20.04 |
|:---------------:|:------------:|:------------:|
| Clang 7 | x | |
| Clang 8 | x | |
| GCC 7 | x | |
| GCC 8 | x | |
| GCC 9 | x | x |
Development systems are Ubuntu 18.04, Ubuntu 20.04 and Ubuntu 22.04
Following compiler and Python combinations are [tested continously](https://github.com/intel/ad-rss-lib/blob/master/.travis.yml):

| | Ubuntu 18.04 | Ubuntu 20.04 | Ubuntu 22.04 |
|:---------------:|:------------:|:------------:|:------------:|
| Clang 7 | x | | |
| Clang 8 | x | | |
| GCC 7 | x | | |
| GCC 8 | x | | |
| GCC 9 | | x | |
| Clang 10 | | x | |
| GCC 11 | | | x |
| Clang 14 | | | x |
| Python 2.7 | x | | |
| Python 3.6 | x | | |
| Python 3.8 | | x | |
| Python 3.10 | | | x |

Important: cmake is required to be at least version 3.5!

Expand Down
3 changes: 2 additions & 1 deletion ad_rss/python/generate_python_lib.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def main():

additional_replacements = {
# RoadSegment: vector<vector>>, set name manually, tool doesn't understand correctly
("\"vector_less__ad_scope_rss_scope_world_scope_LaneSegment__greater_\"", "\"RoadSegment\"")
("\"vector_less__ad_scope_rss_scope_world_scope_LaneSegment__greater_\"", "\"RoadSegment\""),
("\"vector_less_ad_scope_rss_scope_world_scope_LaneSegment_greater_\"", "\"RoadSegment\"")
}

for component in ["core", "situation", "state", "unstructured", "world"]:
Expand Down
1 change: 1 addition & 0 deletions ad_rss_map_integration/tests/RssSceneCreationTest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <ad/rss/world/WorldModelValidInputRange.hpp>
#include <gtest/gtest.h>

#include <algorithm>
#include <fstream>
#include <streambuf>

Expand Down
2 changes: 1 addition & 1 deletion colcon.meta
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cmake-args": ["-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DSPDLOG_BUILD_TESTS=OFF", "-DSPDLOG_BUILD_EXAMPLE=Off"]
},
"ad_map_opendrive_reader": {
"dependencies": ["odrSpiral"]
"dependencies": ["odrSpiral", "PROJ4"]
}
}
}
2 changes: 1 addition & 1 deletion colcon_python.meta
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"cmake-args": ["-DBUILD_PYTHON_BINDING=ON"]
},
"ad_map_opendrive_reader": {
"dependencies": ["odrSpiral"]
"dependencies": ["odrSpiral", "PROJ4"]
},
"ad_map_access": {
"cmake-args": ["-DBUILD_PYTHON_BINDING=ON"]
Expand Down

0 comments on commit be6b68b

Please sign in to comment.