Skip to content

Fix ROS 2 RHEL build #7909

Fix ROS 2 RHEL build

Fix ROS 2 RHEL build #7909

Workflow file for this run

# This workflow builds & runs test cases in iceoryx
name: Build & Test
# Triggers the workflow on push or pull request events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master, release*, iox-* ]
jobs:
pre-flight-check:
# prevent stuck jobs consuming runners for 6 hours
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install iceoryx dependencies and clang-tidy
uses: ./.github/actions/install-iceoryx-deps-and-clang
- run: ./tools/scripts/clang_format.sh check
- run: ./tools/scripts/check_test_ids.sh
- run: ./tools/scripts/check_invalid_characters.sh
- run: ./tools/ci/cmake-linter.sh
check-status-of-nightly-action:
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y jq
- name: Check nightly action status
run: |
COLOR_OFF='\033[0m'
COLOR_RED='\033[1;31m'
COLOR_GREEN='\033[1;32m'
COLOR_YELLOW='\033[1;33m'
LAST_RUN_STATUS=$(curl -s "https://api.github.com/repos/eclipse-iceoryx/iceoryx/actions/workflows/nightly.yml/runs" | jq -r '.workflow_runs[0].conclusion')
if [[ "${LAST_RUN_STATUS}" == "success" ]]; then
echo -e "Last nightly run status: ${COLOR_GREEN}${LAST_RUN_STATUS}${COLOR_OFF}"
else
echo -e "Last nightly run status: ${COLOR_RED}${LAST_RUN_STATUS}${COLOR_OFF}"
echo -e "${COLOR_RED}Error! The nightly workflow failed on the last run. Please check and fix the nightly workflow before merging this PR.${COLOR_OFF}"
echo -e "${COLOR_YELLOW}You can trigger the nightly workflow manually from 'https://github.com/eclipse-iceoryx/iceoryx/actions/workflows/nightly.yml'.${COLOR_OFF}"
echo -e "${COLOR_YELLOW}Just look for the 'Run workflow' button. The branch where the workflow shall run can also be selected.${COLOR_OFF}"
exit 1
fi
build-test-ubuntu:
# prevent stuck jobs consuming runners for 6 hours
timeout-minutes: 60
runs-on: ubuntu-20.04
needs: pre-flight-check
steps:
- uses: actions/checkout@v3
- uses: egor-tensin/setup-gcc@v1.3
with:
# gcc 8.3 is compiler used in QNX 7.1
version: 8
platform: x64
- uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.16.3' # version used in Ubuntu 20.04 LTS
- run: ./tools/ci/build-test-ubuntu.sh
build-test-windows:
# prevent stuck jobs consuming runners for 6 hours
timeout-minutes: 60
runs-on: windows-latest
needs: pre-flight-check
steps:
- uses: actions/checkout@v3
- run: ./tools/ci/build-test-windows.ps1
shell: powershell
run-integration-test:
# prevent stuck jobs consuming runners for 6 hours
timeout-minutes: 60
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- name: Setup ROS
uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: humble
- uses: actions/checkout@v3
- run: ./tools/ci/run-integration-test.sh
build-test-ubuntu-with-address-sanitizer-gcc-latest:
# prevent stuck jobs consuming runners for 1 hour
timeout-minutes: 60
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- uses: egor-tensin/setup-gcc@v1.3
with:
version: 12
platform: x64
- uses: actions/checkout@v3
- name: Run Address Sanitizer
run: ./tools/ci/build-test-ubuntu-with-sanitizers.sh gcc asan
build-test-ubuntu-with-address-sanitizer-clang-latest:
# prevent stuck jobs consuming runners for 1 hour
timeout-minutes: 60
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install iceoryx dependencies and clang-tidy
uses: ./.github/actions/install-iceoryx-deps-and-clang
- name: Run Address Sanitizer
run: ./tools/ci/build-test-ubuntu-with-sanitizers.sh clang asan
build-test-macos-with-address-sanitizer:
# prevent stuck jobs consuming runners for 1 hour
timeout-minutes: 60
runs-on: macos-latest
needs: pre-flight-check
steps:
- uses: actions/checkout@v3
- name: Run Address Sanitizer
run: ./tools/ci/build-test-macos-with-sanitizers.sh asan
build-test-ubuntu-with-thread-sanitizer-clang-latest:
# prevent stuck jobs consuming runners for 3 hours
timeout-minutes: 180
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install iceoryx dependencies and clang-tidy
uses: ./.github/actions/install-iceoryx-deps-and-clang
- name: Run Thread Sanitizer
run: ./tools/ci/build-test-ubuntu-with-sanitizers.sh clang tsan
# Bazel sanity check
build-test-ubuntu-bazel:
# prevent stuck jobs consuming runners for 6 hours
timeout-minutes: 60
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install iceoryx dependencies and clang-tidy
uses: ./.github/actions/install-iceoryx-deps-and-clang
- run: ./tools/ci/build-test-ubuntu-bazel.sh
coverage-and-docs:
# prevent stuck jobs consuming runners for 6 hours
timeout-minutes: 60
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- uses: actions/checkout@v3
- run: ./tools/ci/coverage-and-docs.sh
- name: Archive generated doxygen
uses: actions/upload-artifact@v3
with:
name: iceoryx-pdf
path: |
./build/doc/*.pdf
retention-days: 30
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./lcov_results/unittest/lcov/iceoryx_lcov_result_unit.info
name: iceoryx
flags: unittests
fail_ci_if_error: false
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./lcov_results/unittest_timing/lcov/iceoryx_lcov_result_unit-timing.info
name: iceoryx
flags: unittests_timing
fail_ci_if_error: false