Skip to content

Commit bdfa280

Browse files
authored
Release v3.0.1
Merge develop into master.
2 parents 5160fb0 + 4ad8618 commit bdfa280

File tree

8 files changed

+451
-9
lines changed

8 files changed

+451
-9
lines changed

.github/workflows/ci_linux.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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: '25 18 * * 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 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-${CMAKE_VER}.tgz
40+
sudo tar -C /opt -xzf cmake-${CMAKE_VER}.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/microxrcedds_client-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' 'build/'
74+
'--exclude' 'ci/'
75+
'--exclude' 'test/'
76+
'--exclude' 'examples/'
77+
'--exclude' 'thirdparty/'
78+
'--exclude' 'src/c/core/log'
79+
'--exclude' 'src/c/core/serialization/xrce_types.c'
80+
'--exclude' 'src/c/profile/transport/ip'
81+
'--exclude' 'src/c/profile/discovery'
82+
'--exclude' 'src/c/util/ping.c'
83+
)
84+
gcovr -x -r . "${EXCLUDES[@]}" -o build/coverage.xml
85+
gcovr --html-details -r . "${EXCLUDES[@]}" -o build/coverage.html
86+
gcovr -r . "${EXCLUDES[@]}" # human-readable summary
87+
88+
- name: Upload artifacts (CTest & Coverage)
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: test-and-coverage
92+
path: |
93+
build/CTestResults.xml
94+
build/coverage.xml
95+
build/coverage.html
96+
if-no-files-found: warn
97+
98+
- name: Publish unit test results (JUnit)
99+
uses: EnricoMi/publish-unit-test-result-action@v2
100+
if: (!cancelled())
101+
with:
102+
files: build/CTestResults.xml
103+
check_run: false
104+
comment_mode: failures
105+
comment_title: "Linux Tests Results"
106+
107+
uncrustify:
108+
name: Uncrustify check
109+
runs-on: ubuntu-22.04
110+
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
111+
steps:
112+
- name: Run Uncrustify Linter
113+
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: '50 18 * * 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: v142
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\microxrcedds_client-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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ 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:
2121
- cron: '24 2 * * *'
2222

@@ -39,7 +39,7 @@ jobs:
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

0 commit comments

Comments
 (0)