Skip to content

Commit 9967249

Browse files
authored
Release v2.0.2
Release v2.0.2 Merge develop into master.
2 parents 5a198fc + 82018ae commit 9967249

6 files changed

Lines changed: 213 additions & 8 deletions

File tree

.github/workflows/ci_linux.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: CI Linux
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
workflow_dispatch:
8+
inputs:
9+
name:
10+
description: "Manual trigger"
11+
schedule:
12+
- cron: '35 17 * * 6'
13+
14+
permissions:
15+
pull-requests: write
16+
17+
jobs:
18+
build-test-style-cover:
19+
name: Build, Tests, and Coverage
20+
runs-on: ubuntu-22.04
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v5
25+
with:
26+
fetch-depth: 0
27+
ref: ${{ github.ref }}
28+
29+
- name: Install CMake and prerequisites
30+
shell: bash
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y build-essential curl python3-pip git uncrustify valgrind
34+
python3 -m pip install --upgrade pip
35+
python3 -m pip install gcovr
36+
37+
# CMake 3.31.8
38+
CMAKE_VER=3.31.8
39+
curl -L "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-linux-x86_64.tar.gz" -o cmake-old.tgz
40+
sudo tar -C /opt -xzf cmake-old.tgz
41+
echo "/opt/cmake-${CMAKE_VER}-linux-x86_64/bin" >> "$GITHUB_PATH"
42+
43+
- name: Show cmake version
44+
run: |
45+
cmake --version
46+
ctest --version
47+
48+
- name: Configure
49+
run: |
50+
mkdir -p build
51+
cd build
52+
cmake ../ci/linux -DCMAKE_BUILD_TYPE=Release
53+
54+
- name: Build
55+
run: |
56+
cd build
57+
make -j"$(nproc)"
58+
59+
# --- Run tests with newer CTest to produce JUnit ---
60+
- name: Run tests and export JUnit
61+
shell: bash
62+
run: |
63+
ctest --test-dir build/microcdr-build \
64+
--output-on-failure \
65+
--no-tests=error \
66+
--output-junit "$GITHUB_WORKSPACE/build/CTestResults.xml"
67+
68+
- name: Generate coverage (gcovr Cobertura XML + HTML)
69+
shell: bash
70+
run: |
71+
EXCLUDES=(
72+
'--exclude-unreachable-branches'
73+
'--exclude' 'ci/'
74+
'--exclude' 'test/'
75+
'--exclude' 'build/'
76+
)
77+
gcovr -x -r . "${EXCLUDES[@]}" -o build/coverage.xml
78+
gcovr --html-details -r . "${EXCLUDES[@]}" -o build/coverage.html
79+
80+
- name: Upload artifacts (CTest & Coverage)
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: test-and-coverage
84+
path: |
85+
build/CTestResults.xml
86+
build/coverage.xml
87+
build/coverage.html
88+
if-no-files-found: warn
89+
90+
- name: Publish unit test results (JUnit)
91+
uses: EnricoMi/publish-unit-test-result-action@v2
92+
if: (!cancelled())
93+
with:
94+
files: build/CTestResults.xml
95+
check_run: false
96+
comment_mode: failures
97+
comment_title: "Linux Tests Results"
98+
99+
- name: Coverage (human-readable summary)
100+
if: success()
101+
shell: bash
102+
run: |
103+
gcovr -r . \
104+
--exclude-unreachable-branches \
105+
--exclude ci/ \
106+
--exclude test/ \
107+
--exclude build/
108+
109+
uncrustify:
110+
name: Uncrustify check
111+
runs-on: ubuntu-22.04
112+
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
113+
steps:
114+
- name: Run Uncrustify Linter
115+
uses: eProsima/eProsima-CI/ubuntu/uncrustify@v0

.github/workflows/ci_windows.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI Windows
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
workflow_dispatch:
8+
inputs:
9+
name:
10+
description: "Manual trigger"
11+
schedule:
12+
- cron: '45 17 * * 6'
13+
14+
permissions:
15+
pull-requests: write
16+
17+
jobs:
18+
build-and-tests:
19+
name: Build and Tests
20+
runs-on: windows-2022
21+
22+
env:
23+
TOOLSET: v143
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v5
28+
with:
29+
fetch-depth: 0
30+
ref: ${{ github.ref }}
31+
32+
- name: Install CMake
33+
uses: ssrobins/install-cmake@v1
34+
with:
35+
version: '3.31.8'
36+
37+
- name: Show tool versions
38+
shell: pwsh
39+
run: |
40+
cmake --version
41+
ctest --version
42+
43+
- name: Configure
44+
shell: pwsh
45+
run: |
46+
mkdir build
47+
cd build
48+
cmake ..\ci\windows `
49+
-G "Visual Studio 17 2022" `
50+
-A x64 `
51+
-T $env:TOOLSET `
52+
-DCMAKE_BUILD_TYPE=Release
53+
54+
- name: Build
55+
shell: pwsh
56+
run: |
57+
cd build
58+
cmake --build . --config Release
59+
60+
- name: Run tests and export JUnit
61+
shell: pwsh
62+
run: |
63+
ctest --test-dir build\microcdr-build `
64+
-C Release `
65+
--output-on-failure `
66+
--no-tests=error `
67+
--output-junit "$env:GITHUB_WORKSPACE\build\CTestResults.xml"
68+
Get-Item "$env:GITHUB_WORKSPACE\build\CTestResults.xml" | Format-List -Property *
69+
70+
- name: Upload artifacts
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: test-artifact
74+
path: |
75+
build/CTestResults.xml
76+
if-no-files-found: error
77+
78+
- name: Publish unit test results (JUnit)
79+
uses: EnricoMi/publish-unit-test-result-action/windows@v2
80+
if: (!cancelled())
81+
with:
82+
files: build/CTestResults.xml
83+
check_run: false
84+
comment_mode: failures
85+
comment_title: "Windows Tests Results"

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ on:
1616
branches: [ master, develop ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [ master, develop ]
2020
schedule:
21-
- cron: '24 2 * * *'
21+
- cron: '24 2 * * 6'
2222

2323
jobs:
2424
analyze:
@@ -35,11 +35,11 @@ jobs:
3535

3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v2
38+
uses: actions/checkout@v5
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
42+
uses: github/codeql-action/init@v3
4343
# with:
4444
# languages: ${{ matrix.language }}
4545
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -50,7 +50,7 @@ jobs:
5050
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5151
# If this step fails, then you should remove it and run the build manually (see below)
5252
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
53+
uses: github/codeql-action/autobuild@v3
5454

5555
# ℹ️ Command-line programs to run using the OS shell.
5656
# 📚 https://git.io/JvXDl
@@ -64,4 +64,4 @@ jobs:
6464
# make release
6565

6666
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
67+
uses: github/codeql-action/analyze@v3

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ endif()
4848
###############################################################################
4949
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
5050
if(NOT UCDR_SUPERBUILD)
51-
project(microcdr VERSION "2.0.1" LANGUAGES C)
51+
project(microcdr VERSION "2.0.2" LANGUAGES C)
5252
else()
5353
project(ucdr_superbuild NONE)
5454
include(${PROJECT_SOURCE_DIR}/cmake/SuperBuild.cmake)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Forks](https://img.shields.io/github/forks/eProsima/Micro-CDR.svg)](https://github.com/eProsima/Micro-CDR/network/members)
77
[![Stars](https://img.shields.io/github/stars/eProsima/Micro-CDR.svg)](https://github.com/eProsima/Micro-CDR/stargazers)
88

9-
<a href="http://www.eprosima.com"><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSd0PDlVz1U_7MgdTe0FRIWD0Jc9_YH-gGi0ZpLkr-qgCI6ZEoJZ5GBqQ" align="left" hspace="8" vspace="2" width="100" height="100" ></a>
9+
<a href="http://www.eprosima.com"><img src="docs/eprosima-logo.svg" align="left" hspace="8" vspace="2" width="100" height="100" ></a>
1010

1111
*eProsima Micro CDR* is a *C* library implementing the *CDR* standard serialization methods.
1212
This library is focused on embedded and resource-limited systems.

docs/eprosima-logo.svg

Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)