[#15] Fix build with GCC #45
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
env: | |
WORKSPACE_DIR: ${{ github.workspace }} | |
TEST_ARGS: "--cmake-args -DBUILD_TESTING=ON" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
types: [ opened, ready_for_review, reopened, synchronize ] | |
jobs: | |
changes: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
source-code: ${{ steps.filter.outputs.source-code }} | |
markdown: ${{ steps.filter.outputs.markdown }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Check for changed file types | |
uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
source-code: | |
- '!**/*.md' | |
markdown: | |
- '**/*.md' | |
preflight-check: | |
needs: changes | |
if: ${{ needs.changes.outputs.source-code == 'true' }} | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Check format of all commit messages | |
run: ./scripts/ci/check-commit-msg.sh | |
- name: Check license header | |
run: ./scripts/ci/check-spdx-license-header.sh | |
static-code-analysis: | |
needs: preflight-check | |
if: ${{ needs.changes.outputs.source-code == 'true' }} | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install clang toolchain | |
uses: ./.github/actions/install-clang | |
- name: Display clang-format and clang-tidy versions | |
run: | | |
clang-format --version | |
clang-tidy --version | |
- name: Run clang-format | |
run: git ls-files | grep -E "\.(c|cc|cpp|cxx|inl|h|hh|hpp|hxx)$" | xargs clang-format -i -style=file --Werror --dry-run | |
# - name: Run clang-tidy | |
# run: | | |
# git fetch origin main | |
# ./scripts/check-clang-tidy.sh warning-as-error diff-to-main | |
build-test-clang: | |
needs: [preflight-check, static-code-analysis] | |
runs-on: ubuntu-latest | |
container: | |
image: ros:rolling | |
steps: | |
- uses: ./.github/actions/colcon-build-test | |
with: | |
compiler: clang | |
workspace-dir: ${{ env.WORKSPACE_DIR }} | |
build-test-gcc: | |
needs: [preflight-check, static-code-analysis] | |
runs-on: ubuntu-latest | |
container: | |
image: ros:rolling | |
steps: | |
- uses: ./.github/actions/colcon-build-test | |
with: | |
compiler: gcc | |
workspace-dir: ${{ env.WORKSPACE_DIR }} |