Skip to content

Commit 7be189b

Browse files
HenrZureneSchm
andauthored
1256 update min and latest Ubuntu version (#1257)
- Since Ubuntu 20.04 was retired, we had to update our min versions for the CI (Min: 22.04/ latest 24.04) - Update Compiler (GCC, Clang) versions Co-authored-by: reneSchm <49305466+reneSchm@users.noreply.github.com>
1 parent f3fae56 commit 7be189b

File tree

14 files changed

+105
-58
lines changed

14 files changed

+105
-58
lines changed

.github/actions/linux-build/action.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ runs:
4444
fi
4545
if [[ "${{ inputs.compiler }}" == "gcc" ]]; then
4646
if [[ "${{ inputs.version }}" == "min" ]]; then
47-
sudo apt-get -qq -y install gcc-9
48-
sudo apt-get -qq -y install g++-9
49-
else
5047
sudo apt-get -qq -y install gcc-11
5148
sudo apt-get -qq -y install g++-11
49+
else
50+
sudo apt-get -qq -y install gcc-13
51+
sudo apt-get -qq -y install g++-13
5252
fi
5353
elif [[ "${{ inputs.compiler }}" == "clang" ]]; then
5454
if [[ "${{ inputs.version }}" == "min" ]]; then
55-
sudo apt-get -qq -y install clang-6.0
56-
else
5755
sudo apt-get -qq -y install clang-14
56+
else
57+
sudo apt-get -qq -y install clang-17
5858
fi
5959
fi
6060
- name: ccache
@@ -78,19 +78,19 @@ runs:
7878
cd cpp
7979
if [[ "${{ inputs.compiler }}" == "gcc" ]]; then
8080
if [[ "${{ inputs.version }}" == "min" ]]; then
81-
export CC=/usr/bin/gcc-9
82-
export CXX=/usr/bin/g++-9
83-
else
8481
export CC=/usr/bin/gcc-11
8582
export CXX=/usr/bin/g++-11
83+
else
84+
export CC=/usr/bin/gcc-13
85+
export CXX=/usr/bin/g++-13
8686
fi
8787
elif [[ "${{ inputs.compiler }}" == "clang" ]]; then
8888
if [[ "${{ inputs.version }}" == "min" ]]; then
89-
export CC=/usr/bin/clang-6.0
90-
export CXX=/usr/bin/clang++-6.0
91-
else
9289
export CC=/usr/bin/clang-14
9390
export CXX=/usr/bin/clang++-14
91+
else
92+
export CC=/usr/bin/clang-17
93+
export CXX=/usr/bin/clang++-17
9494
fi
9595
else
9696
echo "unknown value for action input: compiler"

.github/actions/test-py/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
run: |
2121
sudo apt-get -qq update
2222
if [[ "${{ inputs.package }}" == "generation" ]]; then
23-
sudo apt-get -qq -y install python3-pip gnupg clang libclang-dev cmake
23+
sudo apt-get -qq -y install python3-pip gnupg clang-18 libclang-18-dev cmake
2424
else
2525
sudo apt-get -qq -y install python3-pip gnupg
2626
fi

.github/workflows/epidata_main.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
pre-commit:
23-
runs-on: ubuntu-22.04
23+
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v4
2626
- uses: actions/setup-python@v5
@@ -29,7 +29,7 @@ jobs:
2929
- uses: pre-commit/action@v3.0.1
3030

3131
build-py-epidata:
32-
runs-on: ubuntu-22.04
32+
runs-on: ubuntu-latest
3333
container: quay.io/pypa/manylinux_2_28_x86_64
3434
steps:
3535
- uses: actions/checkout@v4
@@ -39,7 +39,7 @@ jobs:
3939

4040
build-py-plot:
4141
if: github.event.pull_request.draft == false
42-
runs-on: ubuntu-22.04
42+
runs-on: ubuntu-latest
4343
container: quay.io/pypa/manylinux_2_28_x86_64
4444
steps:
4545
- uses: actions/checkout@v4
@@ -52,7 +52,7 @@ jobs:
5252
strategy:
5353
matrix:
5454
version: ["3.8", "3.11"]
55-
runs-on: ubuntu-22.04
55+
runs-on: ubuntu-latest
5656
steps:
5757
- uses: actions/checkout@v4
5858
- uses: ./.github/actions/test-py
@@ -67,7 +67,7 @@ jobs:
6767
strategy:
6868
matrix:
6969
version: ["3.8", "3.11"]
70-
runs-on: ubuntu-22.04
70+
runs-on: ubuntu-latest
7171
steps:
7272
- uses: actions/checkout@v4
7373
- uses: ./.github/actions/test-py
@@ -77,7 +77,7 @@ jobs:
7777
coverage: ON
7878

7979
merge-artifacts:
80-
runs-on: ubuntu-22.04
80+
runs-on: ubuntu-latest
8181
strategy:
8282
matrix:
8383
packages: [epidata, plot]
@@ -91,7 +91,7 @@ jobs:
9191

9292
test-pylint-epidata:
9393
needs: build-py-epidata
94-
runs-on: ubuntu-22.04
94+
runs-on: ubuntu-latest
9595
steps:
9696
- uses: actions/checkout@v4
9797
- uses: ./.github/actions/test-pylint
@@ -100,7 +100,7 @@ jobs:
100100

101101
test-pylint-plot:
102102
needs: build-py-plot
103-
runs-on: ubuntu-22.04
103+
runs-on: ubuntu-latest
104104
steps:
105105
- uses: actions/checkout@v4
106106
- uses: ./.github/actions/test-pylint
@@ -109,7 +109,7 @@ jobs:
109109

110110
download-data:
111111
needs: build-py-epidata
112-
runs-on: ubuntu-22.04
112+
runs-on: ubuntu-latest
113113
continue-on-error: true
114114
steps:
115115
- uses: actions/checkout@v4

.github/workflows/main.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919

2020
jobs:
2121
pre-commit:
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
2525
- uses: actions/setup-python@v5
@@ -36,9 +36,9 @@ jobs:
3636
version: ["latest", "min"]
3737
include:
3838
- version: "latest"
39-
os: "ubuntu-22.04"
39+
os: "ubuntu-latest"
4040
- version: "min"
41-
os: "ubuntu-20.04"
41+
os: "ubuntu-22.04"
4242
runs-on: ${{ matrix.os }}
4343
steps:
4444
- uses: actions/checkout@v4
@@ -52,7 +52,7 @@ jobs:
5252

5353
build-cpp-gcc-no-optional-deps:
5454
if: github.event.pull_request.draft == false
55-
runs-on: ubuntu-22.04
55+
runs-on: ubuntu-latest
5656
steps:
5757
- uses: actions/checkout@v4
5858
- uses: ./.github/actions/linux-build
@@ -64,7 +64,7 @@ jobs:
6464

6565
build-cpp-gcc-openmp:
6666
if: github.event.pull_request.draft == false
67-
runs-on: ubuntu-22.04
67+
runs-on: ubuntu-latest
6868
steps:
6969
- uses: actions/checkout@v4
7070
- uses: ./.github/actions/linux-build
@@ -114,9 +114,9 @@ jobs:
114114
version: ["latest", "min"]
115115
include:
116116
- version: "latest"
117-
os: "ubuntu-22.04"
117+
os: "ubuntu-latest"
118118
- version: "min"
119-
os: "ubuntu-20.04"
119+
os: "ubuntu-22.04"
120120
runs-on: ${{ matrix.os }}
121121
steps:
122122
- uses: actions/checkout@v4
@@ -127,7 +127,7 @@ jobs:
127127

128128
merge-test-artifacts:
129129
needs: [test-cpp-gcc_clang, test-cpp-msvc, test-py-surrogatemodel]
130-
runs-on: ubuntu-22.04
130+
runs-on: ubuntu-latest
131131
steps:
132132
- name: merge-coverage-artifacts
133133
uses: actions/upload-artifact/merge@v4
@@ -153,7 +153,7 @@ jobs:
153153
test-cpp-gcc-no-optional-deps:
154154
if: github.event.pull_request.draft == false
155155
needs: build-cpp-gcc-no-optional-deps
156-
runs-on: ubuntu-22.04
156+
runs-on: ubuntu-latest
157157
steps:
158158
- uses: actions/checkout@v4
159159
- uses: ./.github/actions/linux-test
@@ -164,7 +164,7 @@ jobs:
164164
test-cpp-gcc-openmp:
165165
if: github.event.pull_request.draft == false
166166
needs: build-cpp-gcc-openmp
167-
runs-on: ubuntu-22.04
167+
runs-on: ubuntu-latest
168168
timeout-minutes: 30
169169
env:
170170
OMP_NUM_THREADS: 4
@@ -216,9 +216,9 @@ jobs:
216216
version: ["latest", "min"]
217217
include:
218218
- version: "latest"
219-
os: "ubuntu-22.04"
219+
os: "ubuntu-latest"
220220
- version: "min"
221-
os: "ubuntu-20.04"
221+
os: "ubuntu-22.04"
222222
runs-on: ${{ matrix.os }}
223223
steps:
224224
- uses: actions/checkout@v4
@@ -247,7 +247,7 @@ jobs:
247247

248248
build-py-generation:
249249
if: github.event.pull_request.draft == false
250-
runs-on: ubuntu-22.04
250+
runs-on: ubuntu-latest
251251
container: quay.io/pypa/manylinux_2_28_x86_64
252252
steps:
253253
- uses: actions/checkout@v4
@@ -257,7 +257,7 @@ jobs:
257257

258258
build-py-simulation:
259259
if: github.event.pull_request.draft == false
260-
runs-on: ubuntu-22.04
260+
runs-on: ubuntu-latest
261261
container: quay.io/pypa/manylinux_2_28_x86_64
262262
steps:
263263
- uses: actions/checkout@v4
@@ -267,7 +267,7 @@ jobs:
267267

268268
build-py-surrogatemodel:
269269
if: github.event.pull_request.draft == false
270-
runs-on: ubuntu-22.04
270+
runs-on: ubuntu-latest
271271
container: quay.io/pypa/manylinux_2_28_x86_64
272272
steps:
273273
- uses: actions/checkout@v4
@@ -281,7 +281,7 @@ jobs:
281281
matrix:
282282
version: ["3.8", "3.11"]
283283
needs: build-py-generation
284-
runs-on: ubuntu-22.04
284+
runs-on: ubuntu-latest
285285
steps:
286286
- uses: actions/checkout@v4
287287
- uses: ./.github/actions/test-py
@@ -294,7 +294,7 @@ jobs:
294294
strategy:
295295
matrix:
296296
version: ["3.8", "3.11"]
297-
runs-on: ubuntu-22.04
297+
runs-on: ubuntu-latest
298298
steps:
299299
- uses: actions/checkout@v4
300300
- uses: ./.github/actions/test-py
@@ -307,7 +307,7 @@ jobs:
307307
strategy:
308308
matrix:
309309
version: ["3.8", "3.11"]
310-
runs-on: ubuntu-22.04
310+
runs-on: ubuntu-latest
311311
steps:
312312
- uses: actions/checkout@v4
313313
- uses: ./.github/actions/test-py
@@ -318,15 +318,15 @@ jobs:
318318

319319
test-docs:
320320
if: github.event.pull_request.draft == false
321-
runs-on: ubuntu-22.04
321+
runs-on: ubuntu-latest
322322
steps:
323323
- uses: actions/checkout@v4
324324
- uses: ./.github/actions/test-docs
325325

326326
codecov:
327327
if: github.event.pull_request.draft == false
328328
needs: merge-test-artifacts
329-
runs-on: ubuntu-22.04
329+
runs-on: ubuntu-latest
330330
steps:
331331
- uses: actions/checkout@v4
332332
- name: Install dependencies
@@ -354,7 +354,7 @@ jobs:
354354
permissions:
355355
contents: write
356356
needs: [test-docs, merge-test-artifacts]
357-
runs-on: ubuntu-22.04
357+
runs-on: ubuntu-latest
358358
steps:
359359
- uses: actions/checkout@v4
360360
- name: Install dependencies

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "2"
22

33
build:
4-
os: "ubuntu-22.04"
4+
os: "ubuntu-latest"
55
apt_packages:
66
- libmagic1
77
tools:

cpp/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "DEBUG")
8989
setup_target_for_coverage_lcov(
9090
NAME coverage
9191
EXECUTABLE memilio-test
92+
LCOV_ARGS --ignore-errors gcov,mismatch
9293
EXCLUDE "${CMAKE_SOURCE_DIR}/tests*" "${CMAKE_SOURCE_DIR}/simulations*" "${CMAKE_SOURCE_DIR}/examples*"
9394
"${CMAKE_SOURCE_DIR}/memilio/ad*" "${CMAKE_BINARY_DIR}/*" "/usr*" "${CMAKE_SOURCE_DIR}/*.F"
9495
)
@@ -127,10 +128,10 @@ endif()
127128

128129
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
129130
string(APPEND MEMILIO_CXX_FLAGS_ENABLE_WARNING_ERRORS
130-
"-Wno-unknown-warning;-Wno-pragmas;-Wno-deprecated-copy;-Wno-expansion-to-defined;")
131+
"-Wno-unknown-warning;-Wno-pragmas;-Wno-deprecated-copy;-Wno-expansion-to-defined;-Wno-stringop-overread;")
131132
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
132133
string(APPEND MEMILIO_CXX_FLAGS_ENABLE_WARNING_ERRORS
133-
"-Wno-unknown-warning-option;-Wno-deprecated;-Wno-gnu-zero-variadic-macro-arguments;")
134+
"-Wno-unknown-warning-option;-Wno-deprecated;-Wno-gnu-zero-variadic-macro-arguments;-Wno-stringop-overread;")
134135
endif()
135136

136137
if(MEMILIO_ENABLE_WARNINGS_AS_ERRORS)

cpp/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Directory structure:
1717
MEmilio C++ uses CMake as a build configuration system (https://cmake.org/)
1818

1919
MEmilio C++ is regularly tested with the following compilers (list will be extended over time):
20-
- GCC, versions 9.4 and 11.4
21-
- Clang, version 6.0 and 14.0
20+
- GCC, versions 11 and 13
21+
- Clang, version 14 and 17
2222
- MSVC, versions 19.29 (Visual Studio 2019) - 19.38 (Visual Studio 2022)
2323

24-
MEmilio C++ is regularly tested on gitlub runners using Ubuntu 18.04 and 20.04 and Windows Server 2016 and 2019. It is expected to run on any comparable Linux or Windows system. It is currently not tested on MacOS.
24+
MEmilio C++ is regularly tested on gitlub runners using Ubuntu 22.04 and 24.04 and Windows Server 2019 and 2022. It is expected to run on any comparable Linux or Windows system. It is currently not tested on MacOS.
2525

2626
The following table lists the dependencies that are used. Most of them are required, but some are optional. The library can be used without them but with slightly reduced features. CMake will warn about them during configuration. Most of them are bundled with this library and do not need to be installed manually. Bundled libraries are either included with this project or loaded from the web on demand. For each dependency, there is a CMake option to use an installed version instead. Version compatibility needs to be ensured by the user, the version we currently use is included in the table.
2727

cpp/tests/test_io_cli.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "memilio/config.h"
2121
#include "memilio/io/cli.h"
2222
#include "temp_file_register.h"
23+
#include "utils.h"
2324

2425
#ifdef MEMILIO_HAS_JSONCPP
2526

@@ -149,7 +150,7 @@ using Params = mio::ParameterSet<A, B, C, D>;
149150
// using BadParams = mio::ParameterSet<A, CollisionA>;
150151
TEST(TestCLI, test_option_verifier)
151152
{
152-
GTEST_FLAG_SET(death_test_style, "threadsafe");
153+
mio::set_death_test_mode();
153154

154155
EXPECT_DEBUG_DEATH(mio::details::cli::verify_options(mio::ParameterSet<A, NameCollision>()),
155156
".*Options may not have duplicate fields\\. \\(field required\\)");
@@ -212,7 +213,7 @@ TEST(TestCLI, test_set_param)
212213

213214
TEST(TestCLI, test_write_help)
214215
{
215-
GTEST_FLAG_SET(death_test_style, "threadsafe");
216+
mio::set_death_test_mode();
216217

217218
std::stringstream ss;
218219
const std::string help =
@@ -239,7 +240,7 @@ TEST(TestCLI, test_write_help)
239240

240241
TEST(TestCLI, test_print_options)
241242
{
242-
GTEST_FLAG_SET(death_test_style, "threadsafe");
243+
mio::set_death_test_mode();
243244

244245
const std::vector<std::string> args{"", "--print_option", "a", "D"};
245246
const int argc = (int)args.size();

0 commit comments

Comments
 (0)