Skip to content

Commit 60d4fcc

Browse files
committed
Merge branch 'master' into feature/ecco
2 parents 79b0a14 + bfd7093 commit 60d4fcc

Some content is hidden

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

62 files changed

+38032
-13222
lines changed

.github/workflows/ci-cmake.yml

Lines changed: 41 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,56 @@
1-
name: libcosim CI CMake
1+
name: CI without Conan
22

33
# This workflow is triggered on pushes to the repository.
44
on: [push]
55

6-
env:
7-
CONAN_LOGIN_USERNAME_OSP: ${{ secrets.osp_artifactory_usr }}
8-
CONAN_PASSWORD_OSP: ${{ secrets.osp_artifactory_pwd }}
9-
CONAN_REVISIONS_ENABLED: 1
10-
CONAN_NON_INTERACTIVE: 1
11-
126
jobs:
13-
cmake-on-linux:
14-
name: CMake
15-
runs-on: ${{ matrix.os }}
16-
env:
17-
CC: gcc-${{ matrix.compiler_version }}
18-
CXX: g++-${{ matrix.compiler_version }}
7+
linux:
8+
name: Linux
9+
runs-on: ubuntu-latest
1910
strategy:
2011
fail-fast: false
2112
matrix:
22-
os: [ubuntu-20.04]
2313
build_type: [Debug, Release]
24-
compiler_version: [9]
25-
shared_libs: [ON, OFF]
14+
shared_libs: [SHARED_LIBS=ON, SHARED_LIBS=OFF]
2615
timeout-minutes: 35
2716

2817
steps:
29-
- uses: actions/checkout@v3
30-
- name: Install prerequisites
31-
run: |
32-
sudo apt-get install -y --no-install-recommends \
33-
doxygen \
34-
libboost-all-dev \
35-
libmsgsl-dev \
36-
libyaml-cpp-dev \
37-
libxerces-c-dev \
38-
libzip-dev
39-
wget \
18+
- uses: actions/checkout@v4
19+
- name: Generate Dockerfile
20+
run: |
21+
mkdir /tmp/osp-builder-docker
22+
cat <<EOF >/tmp/osp-builder-docker/Dockerfile
23+
FROM debian:bookworm
24+
RUN apt-get update && apt-get install -y --no-install-recommends \
25+
cmake \
26+
build-essential \
27+
doxygen \
28+
wget \
29+
libboost-all-dev \
30+
libmsgsl-dev \
31+
libyaml-cpp-dev \
32+
libxerces-c-dev \
33+
libzip-dev zipcmp zipmerge ziptool
34+
RUN wget \
35+
--no-check-certificate \
4036
"https://github.com/viproma/debian-fmilib/releases/download/debian%2F2.0.3-1/libfmilib2_2.0.3-1_amd64.deb" \
4137
"https://github.com/viproma/debian-fmilib/releases/download/debian%2F2.0.3-1/libfmilib2-dev_2.0.3-1_amd64.deb"
42-
sudo dpkg -i libfmilib2_2.0.3-1_amd64.deb libfmilib2-dev_2.0.3-1_amd64.deb
43-
- name: CMake - configure
44-
run: |
45-
cmake \
46-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
47-
-DCMAKE_PREFIX_PATH=fmilibrary \
48-
-DCMAKE_INSTALL_PREFIX=install \
49-
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} \
50-
-B build
51-
- name: CMake - build
52-
run: cmake --build build
53-
- name: CMake - build doc
54-
run: cmake --build build --target doc
55-
- name: CMake - test
56-
run: |
38+
RUN dpkg -i libfmilib2_2.0.3-1_amd64.deb libfmilib2-dev_2.0.3-1_amd64.deb
39+
COPY entrypoint.sh /
40+
ENTRYPOINT /entrypoint.sh
41+
EOF
42+
- name: Generate entrypoint.sh
43+
run: |
44+
cat <<'EOF' >/tmp/osp-builder-docker/entrypoint.sh
45+
#!/bin/bash
46+
mkdir build
5747
cd build
58-
ctest
59-
- name: CMake - install
60-
run: |
61-
cmake --build build --target install
62-
cmake --build build --target install-doc
63-
- name: Upload artifact
64-
uses: actions/upload-artifact@v3
65-
with:
66-
name: libcosim-${{ runner.os }}-${{ matrix.build_type }}-gcc${{ matrix.compiler_version }}
67-
path: install
68-
69-
70-
cmake-on-windows:
71-
name: CMake
72-
runs-on: ${{ matrix.os }}
73-
strategy:
74-
fail-fast: false
75-
matrix:
76-
os: [windows-2019]
77-
build_type: [Debug, Release]
78-
shared: ["True", "False"]
79-
timeout-minutes: 35
80-
81-
steps:
82-
- uses: actions/checkout@v3
83-
- name: Install prerequisites
84-
run: |
85-
pip3 install --upgrade setuptools pip
86-
pip3 install conan==1.59
87-
choco install doxygen.install
88-
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
89-
conan install . -s build_type=${{ matrix.build_type }} -o shared=${{ matrix.shared }} -g deploy
90-
- name: CMake - configure
91-
shell: bash
92-
run: |
93-
cmake . \
94-
-A x64 \
95-
-DCMAKE_PREFIX_PATH="ms-gsl;boost;fmilibrary;libzip;xerces-c;yaml-cpp;bzip2;zlib;xz_utils" \
96-
-DCMAKE_INSTALL_PREFIX=install \
97-
-DBUILD_SHARED_LIBS=${{ matrix.shared }} \
98-
-B build
99-
- name: CMake - build
100-
run: cmake --build build --config ${{ matrix.build_type }}
101-
- name: CMake - build doc
102-
run: cmake --build build --config ${{ matrix.build_type }} --target doc
103-
- name: CMake - test
104-
run: |
105-
.\activate_run.ps1
106-
cd build
107-
ctest -C ${{ matrix.build_type }}
108-
- name: CMake - install
109-
run: |
110-
cmake --build build --config ${{ matrix.build_type }} --target install
111-
cmake --build build --config ${{ matrix.build_type }} --target install-doc
112-
- name: Upload artifact
113-
uses: actions/upload-artifact@v3
114-
with:
115-
name: libcosim-${{ runner.os }}-${{ matrix.build_type }}
116-
path: install
48+
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_${{ matrix.shared_libs }} /mnt/source
49+
cmake --build .
50+
ctest --output-on-failure
51+
EOF
52+
chmod 0755 /tmp/osp-builder-docker/entrypoint.sh
53+
- name: Build Docker image
54+
run: docker build -t osp-builder /tmp/osp-builder-docker/
55+
- name: Build cosim
56+
run: docker run --rm -v $(pwd):/mnt/source:ro osp-builder

.github/workflows/ci-conan.yml

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
name: libcosim CI Conan
1+
name: CI with Conan
22

33
# This workflow is triggered on pushes to the repository.
44
on: [push, workflow_dispatch]
55

66
jobs:
7-
conan-on-linux:
8-
name: Conan
7+
linux:
8+
name: Linux
99
runs-on: ubuntu-latest
1010
strategy:
1111
fail-fast: false
1212
matrix:
1313
build_type: [Debug, Release]
1414
compiler_version: [9]
15-
compiler_libcxx: [libstdc++11]
1615
option_proxyfmu: ['proxyfmu=True', 'proxyfmu=False']
1716
option_shared: ['shared=True', 'shared=False']
1817
timeout-minutes: 35
1918

2019
steps:
21-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2221
- name: Generate Dockerfile
2322
run: |
2423
mkdir /tmp/osp-builder-docker
2524
cat <<'EOF' >/tmp/osp-builder-docker/Dockerfile
26-
FROM conanio/gcc${{ matrix.compiler_version }}
25+
FROM conanio/gcc${{ matrix.compiler_version }}-ubuntu16.04
2726
ENV CONAN_LOGIN_USERNAME_OSP=${{ secrets.osp_artifactory_usr }}
2827
ENV CONAN_PASSWORD_OSP=${{ secrets.osp_artifactory_pwd }}
29-
ENV CONAN_REVISIONS_ENABLED=1
30-
ENV CONAN_NON_INTERACTIVE=1
31-
ENV CONAN_USE_ALWAYS_SHORT_PATHS=1
3228
ENV LIBCOSIM_RUN_TESTS_ON_CONAN_BUILD=1
3329
COPY entrypoint.sh /
3430
ENTRYPOINT /entrypoint.sh
@@ -48,28 +44,30 @@ jobs:
4844
SHORT_REFNAME="${REFNAME:0:40}"
4945
CHANNEL="testing-${SHORT_REFNAME//\//_}"
5046
fi
51-
conan create -s build_type=${{ matrix.build_type }} -s compiler.version=${{ matrix.compiler_version }} -s compiler.libcxx=${{ matrix.compiler_libcxx }} -o ${{ matrix.option_proxyfmu }} -o ${{ matrix.option_shared }} -b missing . osp/${CHANNEL}
52-
conan upload --all -c -r osp '*'
47+
conan create \
48+
--settings="build_type=${{ matrix.build_type }}" \
49+
--options="${{ matrix.option_proxyfmu }}" \
50+
--options="${{ matrix.option_shared }}" \
51+
--build=missing \
52+
--user=osp \
53+
--channel="${CHANNEL}" \
54+
.
55+
conan upload --confirm --remote=osp '*'
5356
EOF
5457
chmod 0755 /tmp/osp-builder-docker/entrypoint.sh
5558
- name: Build Docker image
56-
run: |
57-
docker build -t osp-builder /tmp/osp-builder-docker/
59+
run: docker build -t osp-builder /tmp/osp-builder-docker/
5860
- name: Build cosim
5961
run: |
6062
docker run --rm --env GITHUB_REF="$GITHUB_REF" -v $(pwd):/mnt/source:ro osp-builder
6163
6264
63-
conan-on-windows:
64-
name: Conan
65+
windows:
66+
name: Windows
6567
runs-on: ${{ matrix.os }}
6668
env:
6769
CONAN_LOGIN_USERNAME_OSP: ${{ secrets.osp_artifactory_usr }}
6870
CONAN_PASSWORD_OSP: ${{ secrets.osp_artifactory_pwd }}
69-
CONAN_REVISIONS_ENABLED: 1
70-
CONAN_NON_INTERACTIVE: 1
71-
CONAN_USE_ALWAYS_SHORT_PATHS: 1
72-
CONAN_USER_HOME_SHORT: C:\c
7371
LIBCOSIM_RUN_TESTS_ON_CONAN_BUILD: 1
7472
strategy:
7573
fail-fast: false
@@ -78,16 +76,18 @@ jobs:
7876
build_type: [Debug, Release]
7977
option_proxyfmu: ['proxyfmu=True', 'proxyfmu=False']
8078
option_shared: ['shared=True', 'shared=False']
81-
timeout-minutes: 35
79+
timeout-minutes: 120
8280

8381
steps:
84-
- uses: actions/checkout@v3
82+
- uses: actions/checkout@v4
8583
- name: Install prerequisites
8684
run: |
8785
pip3 install --upgrade setuptools pip
88-
pip3 install conan==1.59
86+
pip3 install conan
8987
- name: Configure Conan
90-
run: conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
88+
run: |
89+
conan profile detect
90+
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
9191
- name: Conan create
9292
shell: bash
9393
run: |
@@ -99,6 +99,13 @@ jobs:
9999
SHORT_REFNAME="${REFNAME:0:40}"
100100
CHANNEL="testing-${SHORT_REFNAME//\//_}"
101101
fi
102-
conan create -s build_type=${{ matrix.build_type }} -o ${{ matrix.option_proxyfmu }} -o ${{ matrix.option_shared }} -b missing . osp/${CHANNEL}
102+
conan create \
103+
--settings="build_type=${{ matrix.build_type }}" \
104+
--options="${{ matrix.option_proxyfmu }}" \
105+
--options="${{ matrix.option_shared }}" \
106+
--build=missing \
107+
--user=osp \
108+
--channel="${CHANNEL}" \
109+
.
103110
- name: Conan upload
104-
run: conan upload --all -c -r osp '*'
111+
run: conan upload --confirm --remote=osp '*'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ cmake-build-*/
99

1010
# Visual Studio Code
1111
.vscode/
12+
13+
CMakeUserPresets.json

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ All notable changes to libcosim will be documented in this file. This includes n
33

44
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
55

6+
### [v0.10.4] - 2024-12-12
7+
##### Fixed
8+
* Real time factor calculation for small time steps has been improved by computing a rolling average rather than a fixed amount of 5 timesteps.
9+
* Variables are now correctly transferred at the points in the FMU initialization sequence where they are permitted to change.
10+
* FMU start values will now be correctly initialized before entering initialization mode.
11+
* Various bug fixes and improvements.
12+
##### Changed
13+
* The fixed precision of the file observer can now be specified.
14+
* File observer is now printing the correct FMU author.
15+
16+
### [v0.10.3] - 2024-02-19
17+
##### Fixed
18+
* parseURI null check and error handling implemented.
19+
##### Changed
20+
* Upgraded Conan to v2
21+
622
### [v0.10.2] - 2023-02-08
723
##### Fixed
824
* Update to proxyfmu 0.3.1 due to a disconnection issue related to Thrift.
@@ -217,3 +233,5 @@ First OSP JIP partner release
217233
[v0.10.0]: https://github.com/open-simulation-platform/cse-core/compare/v0.9.0...v0.10.0
218234
[v0.10.1]: https://github.com/open-simulation-platform/cse-core/compare/v0.10.0...v0.10.1
219235
[v0.10.2]: https://github.com/open-simulation-platform/cse-core/compare/v0.10.1...v0.10.2
236+
[v0.10.3]: https://github.com/open-simulation-platform/cse-core/compare/v0.10.2...v0.10.3
237+
[v0.10.4]: https://github.com/open-simulation-platform/cse-core/compare/v0.10.3...v0.10.4

0 commit comments

Comments
 (0)