Skip to content

Commit

Permalink
Enable Ubuntu 22.04 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianoboril committed Nov 11, 2023
1 parent cc9618f commit 09fbda6
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 22 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ 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
Expand All @@ -94,3 +99,42 @@ jobs:
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
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}
20 changes: 13 additions & 7 deletions .github/workflows/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
#!/bin/bash

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
python3_pkgs="libpython3-dev python3 python3-pip python3-setuptools python3-wheel python-is-python3"
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"

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 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 --no-install-recommends ${other_pkgs} ${python3_pkgs}

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 22.04 | wc -l` != 1 ]; then
sudo add-get install -y --no-install-recommends ${python2_pkgs}
fi

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 pip2 install --upgrade setuptools==41.1.0
sudo pip2 install pygccxml pyplusplus xmlrunner
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: true
- 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 update && apt 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_map_access --meta colcon_python.meta --event-handlers console_direct+ --cmake-args -DPYTHON_BINDING_VERSION=${PYTHON_BINDING_VERSION}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheels/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
autoconf \
automake \
sqlite3 \
castxml \
libpugixml-dev \
libproj-dev && \
libpugixml-dev && \
rm -rf /var/lib/apt/lists/*

RUN \
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "dependencies/odrSpiral"]
path = dependencies/odrSpiral
url = https://github.com/DLR-TS/odrSpiral
[submodule "dependencies/PROJ4"]
path = dependencies/PROJ4
url = https://github.com/OSGeo/PROJ.git
6 changes: 3 additions & 3 deletions ad_map_access/tests/opendrive/OpenDriveAccessTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ struct OpenDriveAccessTests : ::testing::Test
}
}
EXPECT_NE(expectedLanes.size(), 0u);
for (auto const matchedPosition : mapMatchedPositions0)
for (auto const &matchedPosition : mapMatchedPositions0)
{
EXPECT_TRUE(lanesTestArea.find(matchedPosition.lanePoint.paraPoint.laneId) != lanesTestArea.end());
expectedLanes.erase(matchedPosition.lanePoint.paraPoint.laneId);
}
for (auto const matchedPosition : mapMatchedPositions1)
for (auto const &matchedPosition : mapMatchedPositions1)
{
EXPECT_TRUE(lanesTestArea.find(matchedPosition.lanePoint.paraPoint.laneId) != lanesTestArea.end());
expectedLanes.erase(matchedPosition.lanePoint.paraPoint.laneId);
Expand Down Expand Up @@ -492,4 +492,4 @@ TEST_F(OpenDriveAccessTests, read_karlsruhe_map_with_other_proj_string)
const auto refPoint = access::getENUReferencePoint();
ASSERT_EQ(refPoint.latitude, ad::map::point::Latitude(49.02067835));
ASSERT_EQ(refPoint.longitude, ad::map::point::Longitude(8.43531364));
}
}
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
1 change: 1 addition & 0 deletions dependencies/PROJ4
Submodule PROJ4 added at da2d67
2 changes: 1 addition & 1 deletion tools/map_maker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ set(CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#todo add -Wshadow
add_compile_options(-Wall -Wextra -Werror -Wconversion -pedantic)
add_compile_options(-Wall -Wextra -Werror -Wconversion -pedantic -Wno-final-dtor-non-final-class)

#####################################################################
# Libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#pragma once

#include <cstdint>
#include <vector>
#include "ad/map/maker/geometry/Line2d.hpp"
#include "ad/map/maker/geometry/Point2d.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ struct Intersection : MapDataElement
std::vector<MapDataId> mRoads; //!< list of internal roads

Intersection() = delete;
Intersection &operator=(Intersection const &other) = delete;

Intersection(MapDataStore &dataStore, common::LogFactory &logFactory);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ struct Road : MapDataElement
MapDataId mSuccessor{InvalidId}; //! ID of succeeding element (if any), can be another road or an intersection

Road() = delete;
Road &operator=(Road const &other) = delete;

Road(MapDataStore &dataStore, common::LogChannel &logChannel);

Expand Down
2 changes: 1 addition & 1 deletion tools/map_maker/map_data/src/BigIntersectionGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void BigIntersectionGenerator::generateBigIntersections(double interpolationStep
std::unordered_map<uint32_t, std::vector<MapDataId>> bigIntersectionsIdMap;
detectBigIntersections(specialIntersectionsSet, bigIntersectionsIdMap);

for (auto const bigIntersectionIds : bigIntersectionsIdMap)
for (auto const &bigIntersectionIds : bigIntersectionsIdMap)
{
generateBigIntersection(bigIntersectionIds.second, interpolationStepSize, fullInterpolation);
}
Expand Down

0 comments on commit 09fbda6

Please sign in to comment.