Skip to content

Commit fd0c62e

Browse files
authored
CI Update (#369)
* update upload-artifact * CI ubuntu 20 => 22 * bump oldest supported CMake in the CI to 3.15 * CI Centos7 => Rocky8 * CI actions/setup-python 1 => 5 * drop pyrhon 3.8 in the CI and add 3.12 and 3.13 * replace clang-11 with the default pacman clang in the CI * explicit void argument * add args to entry points * try handling C and C++ separately? * remove support for the legacy intel compiler * ancient C-style comments * fix intel installation * Can I omit unused argument names? - No, you can't. - Fine, but then you won't complain if I don't use them, right? - Oh you bet I will. * fix intel installation - round 2 * S T R I C T compiler * ばんさくつきた * more unused arguments * install python on rocky * more unused arguments * revert line move by mistake * don't install python on rocky, it should be included in the image * actions/checkout@v2 => actions/checkout@v4 * pick specific python version in rocky * rocky rocky in the CI, y u don't find version 3.8 of py? * Revert "rocky rocky in the CI, y u don't find version 3.8 of py?" This reverts commit 9420d94. * avoid using 'which' in rocky * invoke the correct python interpreter on rocky * move to ubuntu-latest * drop icx
1 parent 13cd344 commit fd0c62e

47 files changed

Lines changed: 216 additions & 97 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/docker_files/docker_file_ci_ubuntu_20_04/DockerFile renamed to .github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:focal
1+
FROM ubuntu:latest
22

33
ENV HOME /root
44

@@ -15,7 +15,7 @@ RUN apt-get update -y && apt-get upgrade -y && \
1515
apt-get -y update && \
1616
apt-get install -y \
1717
build-essential \
18-
clang-11 \
18+
clang \
1919
cmake \
2020
git \
2121
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \

.github/workflows/build_docker_images_for_ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
branches:
77
- 'master'
88
paths:
9-
- '.github/docker_files/docker_file_ci_ubuntu_20_04/*'
9+
- '.github/docker_files/docker_file_ci_ubuntu_22_04/*'
1010
- '.github/workflows/build_docker_images_for_ci.yml'
1111
pull_request:
1212
branches:
1313
- 'master'
1414
paths:
15-
- '.github/docker_files/docker_file_ci_ubuntu_20_04/*'
15+
- '.github/docker_files/docker_file_ci_ubuntu_22_04/*'
1616
- '.github/workflows/build_docker_images_for_ci.yml'
1717

1818
jobs:
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v2
2424
- name: Build the Docker image
25-
run: docker build . --file .github/docker_files/docker_file_ci_ubuntu_20_04/DockerFile --tag kratosmultiphysics/co-sim-io-image-ci-ubuntu-20-04
25+
run: docker build . --file .github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile --tag kratosmultiphysics/co-sim-io-image-ci-ubuntu-22-04
2626
- name: Docker Login
2727
uses: azure/docker-login@v1
2828
with:
@@ -31,4 +31,4 @@ jobs:
3131
- name: Publish the Docker image
3232
if: ${{ github.event_name == 'push'}}
3333
# only push the new image when the changes are merged to master
34-
run: docker push kratosmultiphysics/co-sim-io-image-ci-ubuntu-20-04
34+
run: docker push kratosmultiphysics/co-sim-io-image-ci-ubuntu-22-04

.github/workflows/ci.yml

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
compiler: [GCC, CLANG, ICC, ICX]
23+
compiler: [GCC, CLANG, ICPX]
2424
mpi: [OpenMPI, IntelMPI]
2525
exclude:
2626
# CLANG is not properly supported by Intel, better use LLVMIntel in the future
@@ -29,7 +29,7 @@ jobs:
2929
timeout-minutes: 30
3030

3131
steps:
32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v4
3333

3434
- name: Install dependencies
3535
run: |
@@ -44,14 +44,10 @@ jobs:
4444
4545
sudo apt-get install \
4646
valgrind \
47-
clang-11
48-
49-
- name: Install legacy Intel compiler
50-
if: ${{ matrix.compiler == 'ICC' }}
51-
run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
47+
clang
5248
5349
- name: Install Intel compiler
54-
if: ${{ matrix.compiler == 'ICX' }}
50+
if: ${{ matrix.compiler == 'ICPX' }}
5551
run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
5652

5753
- name: Install MPI
@@ -68,20 +64,17 @@ jobs:
6864
export CXX=/usr/bin/g++
6965
export CC=/usr/bin/gcc
7066
elif [ ${{ matrix.compiler }} = CLANG ]; then
71-
export CXX=/usr/bin/clang++-11
72-
export CC=/usr/bin/clang-11
73-
elif [ ${{ matrix.compiler }} = ICC ]; then
74-
export CXX=icpc
75-
export CC=icc
76-
elif [ ${{ matrix.compiler }} = ICX ]; then
67+
export CXX=/usr/bin/clang++
68+
export CC=/usr/bin/clang
69+
elif [ ${{ matrix.compiler }} = ICPX ]; then
7770
export CXX=icpx
7871
export CC=icx
7972
else
8073
echo 'Unsupported compiler: ${{ matrix.compiler }}'
8174
exit 1
8275
fi
8376
84-
if [ ${{ matrix.compiler }} = ICC ] || [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then
77+
if [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then
8578
source /opt/intel/oneapi/setvars.sh
8679
fi
8780
@@ -107,14 +100,14 @@ jobs:
107100
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin
108101
export PATH=${PATH}:${GITHUB_WORKSPACE}/bin # required for IntelMPI
109102
export PATH=${PATH}:${GITHUB_WORKSPACE}/bin/tests_c_mpi # required for IntelMPI
110-
if [ ${{ matrix.compiler }} = ICC ] || [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then
103+
if [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then
111104
source /opt/intel/oneapi/setvars.sh
112105
fi
113106
114107
cd build
115108
ctest -T memcheck --output-on-failure
116109
117-
- uses: actions/upload-artifact@v2
110+
- uses: actions/upload-artifact@v4
118111
if: failure()
119112
with:
120113
name: "CTest Log Ubuntu C++ & C (${{ matrix.compiler }}-${{ matrix.mpi }})"
@@ -127,15 +120,15 @@ jobs:
127120
strategy:
128121
fail-fast: false
129122
matrix:
130-
python-version: ["3.8", "3.9", "3.10", "3.11"]
131-
compiler: [GCC, ICC]
123+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
124+
compiler: [GCC, ICPX]
132125
timeout-minutes: 15
133126

134127
steps:
135-
- uses: actions/checkout@v2
128+
- uses: actions/checkout@v4
136129

137130
- name: Install Intel compiler
138-
if: ${{ matrix.compiler == 'ICC' }}
131+
if: ${{ matrix.compiler == 'ICPX' }}
139132
run: |
140133
# see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable
141134
cd /tmp
@@ -145,15 +138,15 @@ jobs:
145138
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
146139
147140
sudo apt-get update
148-
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
141+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
149142
150143
- name: Install MPI
151144
run: |
152145
sudo apt-get update
153146
sudo apt-get install libopenmpi-dev openmpi-bin
154147
155148
- name: Set up Python ${{ matrix.python-version }}
156-
uses: actions/setup-python@v1
149+
uses: actions/setup-python@v5
157150
with:
158151
python-version: ${{ matrix.python-version }}
159152

@@ -170,7 +163,7 @@ jobs:
170163
171164
- name: Running tests
172165
run: |
173-
if [ ${{ matrix.compiler }} = ICC ]; then
166+
if [ ${{ matrix.compiler }} = ICPX ]; then
174167
source /opt/intel/oneapi/setvars.sh
175168
fi
176169
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin
@@ -181,7 +174,7 @@ jobs:
181174
182175
- name: Running MPI tests
183176
run: |
184-
if [ ${{ matrix.compiler }} = ICC ]; then
177+
if [ ${{ matrix.compiler }} = ICPX ]; then
185178
source /opt/intel/oneapi/setvars.sh
186179
fi
187180
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin
@@ -198,7 +191,7 @@ jobs:
198191
timeout-minutes: 15
199192

200193
steps:
201-
- uses: actions/checkout@v2
194+
- uses: actions/checkout@v4
202195

203196
- name: Build CoSimIO
204197
run: |
@@ -221,14 +214,14 @@ jobs:
221214
strategy:
222215
fail-fast: false
223216
matrix:
224-
python-version: ["3.8", "3.9", "3.10", "3.11"]
217+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
225218
timeout-minutes: 15
226219

227220
steps:
228-
- uses: actions/checkout@v2
221+
- uses: actions/checkout@v4
229222

230223
- name: Set up Python ${{ matrix.python-version }}
231-
uses: actions/setup-python@v1
224+
uses: actions/setup-python@v5
232225
with:
233226
python-version: ${{ matrix.python-version }}
234227

@@ -257,7 +250,7 @@ jobs:
257250
timeout-minutes: 15
258251

259252
steps:
260-
- uses: actions/checkout@v2
253+
- uses: actions/checkout@v4
261254

262255
- name: Build CoSimIO
263256
shell: cmd
@@ -297,14 +290,14 @@ jobs:
297290
strategy:
298291
fail-fast: false
299292
matrix:
300-
python-version: ["3.8", "3.9", "3.10", "3.11"]
293+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
301294
timeout-minutes: 15
302295

303296
steps:
304-
- uses: actions/checkout@v2
297+
- uses: actions/checkout@v4
305298

306299
- name: Set up Python ${{ matrix.python-version }}
307-
uses: actions/setup-python@v1
300+
uses: actions/setup-python@v5
308301
with:
309302
python-version: ${{ matrix.python-version }}
310303

@@ -325,7 +318,7 @@ jobs:
325318
-G"Visual Studio 17 2022" ^
326319
-H"." ^
327320
-B"build" ^
328-
-DCO_SIM_IO_BUILD_PYTHON=ON ^
321+
-DCO_SIM_IO_BUILD_PYTHON=ON ^
329322
-DCO_SIM_IO_STRICT_COMPILER=ON || goto :error
330323
331324
cmake --build "build" --target install -- /p:Platform=x64 || goto :error
@@ -347,23 +340,25 @@ jobs:
347340
python run_python_tests.py
348341
349342
350-
CentOS-7:
343+
Rocky-8:
351344
runs-on: ubuntu-latest
352-
name: CentOS 7
345+
name: Rocky 8
353346

354347
container:
355-
image: kratosmultiphysics/kratos-image-ci-centos7:latest
348+
image: kratosmultiphysics/kratos-image-ci-rocky8:latest
349+
options: --user 1001
356350

357351
steps:
358-
- uses: actions/checkout@v2
352+
- uses: actions/checkout@v4
359353

360354
- name: Build CoSimIO
361355
run: |
362-
cmake -H"." -B"build" \
363-
-DCMAKE_BUILD_TYPE="Debug" \
364-
-DCO_SIM_IO_BUILD_C=ON \
365-
-DCO_SIM_IO_BUILD_PYTHON=ON \
366-
-DCO_SIM_IO_STRICT_COMPILER=ON
356+
cmake -H"." -B"build" \
357+
-DCMAKE_BUILD_TYPE="Debug" \
358+
-DCO_SIM_IO_BUILD_C=ON \
359+
-DCO_SIM_IO_BUILD_PYTHON=ON \
360+
-DCO_SIM_IO_STRICT_COMPILER=ON \
361+
-DPYTHON_EXECUTABLE=/usr/local/bin/python3.8
367362
368363
cmake --build "build" --target install -- -j2
369364
@@ -381,14 +376,14 @@ jobs:
381376
python3.8 run_python_tests.py
382377
383378
384-
Ubuntu-old-CMake:
379+
Ubuntu-minimum-CMake:
385380
runs-on: ubuntu-latest
386381

387382
steps:
388383
- name: Setup cmake
389-
uses: jwlawson/actions-setup-cmake@v1.10
384+
uses: jwlawson/actions-setup-cmake@v2
390385
with:
391-
cmake-version: '2.8.x'
386+
cmake-version: '3.15.x'
392387

393388
- name: Use cmake
394389
run: cmake --version
@@ -398,7 +393,7 @@ jobs:
398393
sudo apt-get update
399394
sudo apt-get install libopenmpi-dev openmpi-bin
400395
401-
- uses: actions/checkout@v2
396+
- uses: actions/checkout@v4
402397

403398
- name: Build CoSimIO
404399
run: |

co_sim_io/c/co_sim_io_c.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ enum CoSimIO_ConnectionStatus
3535
CoSimIO_DisconnectionError
3636
};
3737

38-
CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Hello();
38+
CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Hello(
39+
void);
3940

4041
CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Connect(
4142
const CoSimIO_Info I_Settings);

co_sim_io/c/co_sim_io_c_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ typedef struct CoSimIO_Info
2222
} CoSimIO_Info;
2323

2424

25-
CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CreateInfo();
25+
CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CreateInfo(void);
2626

2727
CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CopyInfo(const CoSimIO_Info I_Info);
2828

co_sim_io/sources/communication/base_socket_communication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace CoSimIO {
1919
namespace Internals {
2020

2121
template<class TSocketType>
22-
BaseSocketCommunication<TSocketType>::~BaseSocketCommunication<TSocketType>()
22+
BaseSocketCommunication<TSocketType>::~BaseSocketCommunication()
2323
{
2424
CO_SIM_IO_TRY
2525

tests/co_sim_io/c/checks.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
#include <math.h>
1818
#include <string.h>
1919

20+
21+
#define COSIMIO_UNUSED(variable_name) (void)(variable_name)
22+
2023
#define COSIMIO_CHECK_INT_EQUAL(a, b) \
2124
if (a != b) { \
2225
printf("in line %d: %d is not equal to %d", __LINE__, a, b); \

tests/co_sim_io/c/info/test_info_bool.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515

1616
#include "../checks.h"
1717

18-
int main()
18+
int main(int argc, const char** argv)
1919
{
2020
/* declaring variables */
2121
CoSimIO_Info info;
2222

23+
COSIMIO_UNUSED(argc);
24+
COSIMIO_UNUSED(argv);
25+
2326
info = CoSimIO_CreateInfo();
2427

2528
COSIMIO_CHECK_FALSE(CoSimIO_Info_Has(info, "is_converged"));

tests/co_sim_io/c/info/test_info_clear.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515

1616
#include "../checks.h"
1717

18-
int main()
18+
int main(int argc, const char** argv)
1919
{
2020
/* declaring variables */
2121
CoSimIO_Info info;
2222

23+
COSIMIO_UNUSED(argc);
24+
COSIMIO_UNUSED(argv);
25+
2326
info = CoSimIO_CreateInfo();
2427

2528
COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0);

tests/co_sim_io/c/info/test_info_copy.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515

1616
#include "../checks.h"
1717

18-
int main()
18+
int main(int argc, const char** argv)
1919
{
2020
/* declaring variables */
2121
CoSimIO_Info info, copied_info;
2222

23+
COSIMIO_UNUSED(argc);
24+
COSIMIO_UNUSED(argv);
25+
2326
info = CoSimIO_CreateInfo();
2427

2528
COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0);

0 commit comments

Comments
 (0)