Skip to content

Commit cb57e21

Browse files
authored
CI Update (#20)
* Updated clang format job * Updated Ubuntu CI job to run on focal, jammy, and noble * Update to non-deprecated version of upload artifact action * Changed name of variable per clang-tidy
1 parent 96a1e8b commit cb57e21

File tree

5 files changed

+55
-96
lines changed

5 files changed

+55
-96
lines changed

.github/workflows/clang_format.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ on:
1010

1111
jobs:
1212
clang_format:
13-
name: Clang-Format
1413
runs-on: ubuntu-latest
1514
steps:
16-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v4
1716

1817
- name: Run clang format
1918
run: |
2019
sudo apt update
2120
sudo apt install -y git clang-format
21+
if [ $? -ge 1 ]; then return 1; fi
2222
./.run-clang-format
23+
if [ $? -ge 1 ]; then return 1; fi
2324
output=$(git diff)
2425
if [ -n "$output" ]; then exit 1; else exit 0; fi

.github/workflows/ubuntu.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Ubuntu [Focal, Jammy, Noble]
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
schedule:
9+
- cron: '0 5 * * *'
10+
workflow_dispatch:
11+
release:
12+
types:
13+
- released
14+
15+
jobs:
16+
ci:
17+
name: ${{ matrix.distro }}
18+
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
distro: [focal, jammy, noble]
23+
container:
24+
image: ubuntu:${{ matrix.distro }}
25+
env:
26+
CCACHE_DIR: ${{ github.workspace }}/${{ matrix.distro }}/.ccache
27+
DEBIAN_FRONTEND: noninteractive
28+
TZ: Etc/UTC
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
path: target_ws/src
34+
35+
- name: Build and Tests
36+
uses: tesseract-robotics/colcon-action@v9
37+
with:
38+
before-script: 'apt install -y -qq clang-tidy lcov'
39+
ccache-prefix: ${{ matrix.distro }}
40+
add-ros-ppa: true
41+
vcs-file: dependencies.repos
42+
target-path: target_ws/src
43+
target-args: --cmake-args -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DENABLE_CLANG_TIDY=ON -DENABLE_CODE_COVERAGE=ON

.github/workflows/ubuntu_focal.yml

Lines changed: 0 additions & 85 deletions
This file was deleted.

.github/workflows/windows_2019.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ jobs:
8787
cp ./*.nupkg ${{ github.workspace }}/artifacts
8888
cp ./*.tar.xz ${{ github.workspace }}/artifacts
8989
90-
- uses: actions/upload-artifact@v2
90+
- uses: actions/upload-artifact@v4
9191
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
9292
with:
9393
name: nuget_package
9494
path: ${{ github.workspace }}/artifacts/*.nupkg
9595

96-
- uses: actions/upload-artifact@v2
96+
- uses: actions/upload-artifact@v4
9797
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
9898
with:
9999
name: archive_package

src/utils.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ std::vector<std::string> getAllAvailableSections(const std::string& library_name
110110

111111
std::string decorate(const std::string& library_name, const std::string& library_directory)
112112
{
113-
boost::filesystem::path sl;
113+
boost::filesystem::path lib_path;
114114
if (library_directory.empty())
115-
sl = boost::filesystem::path(library_name);
115+
lib_path = boost::filesystem::path(library_name);
116116
else
117-
sl = boost::filesystem::path(library_directory) / library_name;
117+
lib_path = boost::filesystem::path(library_directory) / library_name;
118118

119119
boost::filesystem::path actual_path =
120-
(std::strncmp(sl.filename().string().c_str(), "lib", 3) != 0 ?
121-
boost::filesystem::path((sl.has_parent_path() ? sl.parent_path() / L"lib" : L"lib").native() +
122-
sl.filename().native()) :
123-
sl);
120+
(std::strncmp(lib_path.filename().string().c_str(), "lib", 3) != 0 ?
121+
boost::filesystem::path((lib_path.has_parent_path() ? lib_path.parent_path() / L"lib" : L"lib").native() +
122+
lib_path.filename().native()) :
123+
lib_path);
124124

125125
actual_path += boost::dll::shared_library::suffix();
126126
return actual_path.string();

0 commit comments

Comments
 (0)