Skip to content

Commit 093d1f9

Browse files
Switch CI to ubuntu 22.04
Following github actions changes. For more details, see: actions/runner-images#11101 Relates-To: DATASDK-73 Signed-off-by: Rustam Gamidov <[email protected]>
1 parent ac33d9f commit 093d1f9

File tree

3 files changed

+43
-42
lines changed

3 files changed

+43
-42
lines changed

.github/workflows/psv_pipelines.yml

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,21 @@ env:
1212
SEGFAULT_SIGNALS: all
1313

1414
jobs:
15-
psv-linux-20-04-gcc7-build-cpplint:
16-
name: PSV.Linux.20.04.gcc7.Cpplint
17-
runs-on: ubuntu-20.04
15+
psv-linux-22-04-gcc9-build-cpplint:
16+
name: PSV.Linux.22.04.gcc9.Cpplint
17+
runs-on: ubuntu-22.04
1818
env:
19-
LD_PRELOAD: /lib/x86_64-linux-gnu/libSegFault.so
2019
BUILD_TYPE: RelWithDebInfo
21-
CC: gcc-7
22-
CXX: g++-7
20+
CC: gcc-9
21+
CXX: g++-9
2322
steps:
2423
- name: Check out repository
2524
uses: actions/checkout@v4
2625
- name: "C++ Lint checker script"
2726
run: ./scripts/misc/cpplint_ci.sh
2827
shell: bash
2928
- name: Install Ubuntu dependencies
30-
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-7 g++-7 --no-install-recommends
29+
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-9 g++-9 --no-install-recommends
3130
shell: bash
3231
- name: Compile project with cmake and ccache
3332
run: gcc --version && ./scripts/linux/psv/build_psv.sh
@@ -60,19 +59,18 @@ jobs:
6059
env:
6160
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6261

63-
psv-linux-20-04-gcc7-build-no-cache:
64-
name: PSV.Linux.20.04.gcc7.OLP_SDK_ENABLE_DEFAULT_CACHE=OFF
65-
runs-on: ubuntu-20.04
62+
psv-linux-22-04-gcc9-build-no-cache:
63+
name: PSV.Linux.22.04.gcc9.OLP_SDK_ENABLE_DEFAULT_CACHE=OFF
64+
runs-on: ubuntu-22.04
6665
env:
67-
LD_PRELOAD: /lib/x86_64-linux-gnu/libSegFault.so
6866
BUILD_TYPE: RelWithDebInfo
69-
CC: gcc-7
70-
CXX: g++-7
67+
CC: gcc-9
68+
CXX: g++-9
7169
steps:
7270
- name: Check out repository
7371
uses: actions/checkout@v4
7472
- name: Install Ubuntu dependencies
75-
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev gcc-7 g++-7 --no-install-recommends
73+
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev gcc-9 g++-9 --no-install-recommends
7674
shell: bash
7775
- name: Compile project without cache
7876
run: ./scripts/linux/psv/build_psv_no_cache.sh
@@ -142,29 +140,28 @@ jobs:
142140
run: ./scripts/linux/psv/build_psv_no_cache.sh
143141
shell: bash
144142

145-
psv-linux-20-04-clang-build:
146-
name: PSV.Linux.20.04.clang
147-
runs-on: ubuntu-20.04
143+
psv-linux-22-04-clang-build:
144+
name: PSV.Linux.22.04.clang
145+
runs-on: ubuntu-22.04
148146
env:
149-
LD_PRELOAD: /lib/x86_64-linux-gnu/libSegFault.so
150147
BUILD_TYPE: RelWithDebInfo
151-
CC: clang-7
152-
CXX: clang++-7
148+
CC: clang-11
149+
CXX: clang++-11
150+
CXXFLAGS: -Wno-deprecated-copy
153151
steps:
154152
- name: Check out repository
155153
uses: actions/checkout@v4
156154
- name: Install Ubuntu dependencies
157-
run: sudo apt-get update -y && sudo apt-get install clang-7 ccache libcurl4-openssl-dev -y --no-install-recommends --fix-missing
155+
run: sudo apt-get update -y && sudo apt-get install clang-11 ccache libcurl4-openssl-dev -y --no-install-recommends --fix-missing
158156
shell: bash
159157
- name: Compile project on Clang
160158
run: scripts/linux/psv/build_psv.sh
161159
shell: bash
162160

163-
psv-android-20-04-build:
164-
name: PSV.Linux.Android.20.04
165-
runs-on: ubuntu-20.04
161+
psv-android-22-04-build:
162+
name: PSV.Linux.Android.22.04
163+
runs-on: ubuntu-22.04
166164
env:
167-
LD_PRELOAD: /lib/x86_64-linux-gnu/libSegFault.so
168165
BUILD_TYPE: RelWithDebInfo
169166
steps:
170167
- name: Check out repository
@@ -263,7 +260,7 @@ jobs:
263260

264261
psv-commit-checker:
265262
name: PSV.Commit.Checker
266-
runs-on: ubuntu-20.04
263+
runs-on: ubuntu-22.04
267264
if: github.ref_name != 'master'
268265
steps:
269266
- uses: actions/checkout@v4

olp-cpp-sdk-core/include/olp/core/math/Vector.h

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2019-2021 HERE Europe B.V.
2+
* Copyright (C) 2019-2025 HERE Europe B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,10 +25,12 @@ namespace math {
2525
template <typename T>
2626
/// Represents 2D vectors and points.
2727
struct Vector2 {
28-
Vector2() {}
28+
Vector2() = default;
29+
Vector2(const Vector2& other) = default;
30+
2931
/**
3032
* @brief Creates a `Vector2` instance with the given X and Y components.
31-
*
33+
*
3234
* @param a The `X` component of the vector.
3335
* @param b The `Y` component of the vector.
3436
*/
@@ -39,7 +41,7 @@ struct Vector2 {
3941

4042
/**
4143
* @brief Assigns components of one vector to another vector.
42-
*
44+
*
4345
* @param v The vector to take components from.
4446
*/
4547
Vector2<T>& operator=(Vector2<T> const& v) {
@@ -50,7 +52,7 @@ struct Vector2 {
5052

5153
/**
5254
* @brief Multiplies each vector component by a number.
53-
*
55+
*
5456
* @param s The number to multiply by.
5557
*/
5658
Vector2<T> operator*(T const& s) const { return Vector2<T>(x * s, y * s); }
@@ -59,7 +61,7 @@ struct Vector2 {
5961

6062
/**
6163
* @brief Subtracts one vector from another.
62-
*
64+
*
6365
* @param v The vector to substruct from.
6466
*/
6567
Vector2<T> operator-(Vector2<T> const& v) const {
@@ -68,7 +70,7 @@ struct Vector2 {
6870

6971
/**
7072
* @brief Adds corresponding components of two vectors.
71-
*
73+
*
7274
* @param v The vector to add.
7375
*/
7476
Vector2<T> operator+(Vector2<T> const& v) const {
@@ -84,10 +86,12 @@ struct Vector2 {
8486
template <typename T>
8587
/// Represents 3D vectors and points.
8688
struct Vector3 {
87-
Vector3() {}
89+
Vector3() = default;
90+
Vector3(const Vector3& other) = default;
91+
8892
/**
8993
* @brief Creates a `Vector3` instance with the given X, Y, and Z components.
90-
*
94+
*
9195
* @param a The `X` component of the vector.
9296
* @param b The `Y` component of the vector.
9397
* @param c The `Z` component of the vector.
@@ -99,14 +103,14 @@ struct Vector3 {
99103
}
100104
/**
101105
* @brief Creates a `Vector3` instance.
102-
*
106+
*
103107
* @param s The constant to initialize the vector components.
104108
*/
105109
explicit Vector3(T const& s) : x(s), y(s), z(s) {}
106110

107111
/**
108112
* @brief Multiplies each vector component by a number.
109-
*
113+
*
110114
* @param s The number to multiply by.
111115
*/
112116
Vector3<T> operator*(T const& s) const {
@@ -117,16 +121,16 @@ struct Vector3 {
117121

118122
/**
119123
* @brief Subtracts one vector from another.
120-
*
121-
* @param v The vector to substruct from.
124+
*
125+
* @param v The vector to substruct from.
122126
*/
123127
Vector3<T> operator-(Vector3<T> const& v) const {
124128
return Vector3<T>(x - v.x, y - v.y, z - v.z);
125129
}
126130

127131
/**
128132
* @brief Adds corresponding components of two vectors.
129-
*
133+
*
130134
* @param v The vector to add.
131135
*/
132136
Vector3<T> operator+(Vector3<T> const& v) const {
@@ -136,7 +140,7 @@ struct Vector3 {
136140
/**
137141
* @brief Checks whether the parameters of one vector
138142
* are less than the parameters of the other vector.
139-
*
143+
*
140144
* @param v The vector to compare to.
141145
*/
142146
Vector3<bool> LessThan(Vector3<T> const& v) const {

scripts/linux/psv/build_psv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ulimit -c unlimited
2626
mkdir -p build
2727
cd build
2828
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
29-
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror" \
29+
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror $CXXFLAGS" \
3030
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
3131
-DOLP_SDK_BUILD_EXAMPLES=ON \
3232
-DBUILD_SHARED_LIBS=ON \

0 commit comments

Comments
 (0)