Skip to content

Commit

Permalink
Merge pull request #2393 from mavlink/pr-add-newer-compilers
Browse files Browse the repository at this point in the history
CI: a few fixes and adding newer compilers
  • Loading branch information
julianoes authored Sep 7, 2024
2 parents 6106bf7 + c49dfa2 commit b4160bb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,27 @@ jobs:
runs-on: ${{ matrix.ubuntu_image }}
strategy:
matrix:
ubuntu_image: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
include:
- ubuntu_image: ubuntu-20.04
cc: gcc
cxx: g++
description: Ubuntu 20.04 (GCC)
- ubuntu_image: ubuntu-22.04
cc: gcc
cxx: g++
description: Ubuntu 22.04 (GCC)
- ubuntu_image: ubuntu-24.04
cc: gcc-13
cxx: g++-13
description: Ubuntu 24.04 (GCC 13)
- ubuntu_image: ubuntu-24.04
cc: gcc-14
cxx: g++-14
description: Ubuntu 24.04 (GCC 14)
- ubuntu_image: ubuntu-24.04
cc: clang-18
cxx: clang++-18
description: Ubuntu 24.04 (clang 18)
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -86,12 +106,15 @@ jobs:
id: cache
with:
path: ./build/release/third_party/install
key: ${{ github.job }}-${{ matrix.ubuntu_image }}-${{ hashFiles('./third_party/**') }}-1
key: ${{ github.job }}-${{ matrix.ubuntu_image }}-${{ matrix.cc }}-${{ hashFiles('./third_party/**') }}-1
- name: disable superbuild on cache hit
if: steps.cache.outputs.cache-hit == 'true'
run: echo "superbuild=-DSUPERBUILD=OFF" >> $GITHUB_ENV && echo "cmake_prefix_path=-DCMAKE_PREFIX_PATH=$(pwd)/build/release/third_party/install" >> $GITHUB_ENV
- name: configure
run: cmake $superbuild $cmake_prefix_path -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_MAVSDK_SERVER=ON -DWERROR=ON -DENABLE_CPPTRACE=On -DCMAKE_INSTALL_PREFIX=install -Bbuild/release -H.
run: |
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
cmake $superbuild $cmake_prefix_path -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_MAVSDK_SERVER=ON -DWERROR=ON -DENABLE_CPPTRACE=On -DCMAKE_INSTALL_PREFIX=install -Bbuild/release -H.
- name: cleanup to save space
run: |
rm -rf ./build/release/third_party/absl
Expand Down Expand Up @@ -120,7 +143,7 @@ jobs:
echo 'APT::Get::Always-Include-Phased-Updates "true";' | sudo tee -a /etc/apt/apt.conf.d/99-phased-updates
sudo apt-get update
- name: install examples dependencies
run: sudo apt-get install libsdl2-dev
run: sudo apt-get install libsdl2-dev ${{ matrix.cc }} ${{ matrix.cxx }}
- name: configure examples
run: cmake -DCMAKE_PREFIX_PATH="$(pwd)/install;$(pwd)/build/release/third_party/install" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWERROR=ON -Bexamples/build -Hexamples
- name: build examples
Expand Down Expand Up @@ -157,7 +180,7 @@ jobs:
#- name: system tests
# run: ./build/src/system_tests/system_tests_runner

ubuntu22-style-and-proto-check:
ubuntu24-style-and-proto-check:
name: ubuntu-24.04 (style and proto check)
runs-on: ubuntu-24.04
steps:
Expand Down Expand Up @@ -188,7 +211,7 @@ jobs:
runs-on: ${{ matrix.container_name }}
strategy:
matrix:
container_name: [ubuntu-20.04, ubuntu-22.04]
container_name: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
steps:
- uses: actions/checkout@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion examples/logfile_download/logfile_download.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <thread>

using namespace mavsdk;
Expand Down Expand Up @@ -42,7 +43,7 @@ int main(int argc, char** argv)
bool remove_log_files = false;

for (int i = 2; i < argc; ++i) {
if (argv[i] == "--rm") {
if (std::string(argv[i]) == "--rm") {
remove_log_files = true;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/mavsdk/core/mavlink_message_handler.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <algorithm>
#include <mutex>
#include "mavlink_message_handler.h"
#include "log.h"
Expand Down

0 comments on commit b4160bb

Please sign in to comment.