diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ccbc03..b03952e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,8 @@ name: gcc on: push: + branches: + - main pull_request: branches: - main @@ -11,6 +13,11 @@ env: PACKAGE_NAME: maliput_dragway ROS_DISTRO: foxy +# Cancel previously running PR jobs +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + jobs: compile_and_test: name: Compile and test diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml index 2710cf7..c980254 100644 --- a/.github/workflows/sanitizers.yml +++ b/.github/workflows/sanitizers.yml @@ -11,9 +11,14 @@ env: ROS_WS: maliput_ws UBSAN_OPTIONS: halt_on_error=1 +# Cancel previously running PR jobs +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + jobs: compile_and_test: - if: contains(github.event.pull_request.labels.*.name, 'do-clang-test') + if: ${{ contains(github.event.pull_request.labels.*.name, 'do-clang-test') || github.event_name == 'workflow_dispatch'}} name: Compile and test with sanitizer runs-on: ubuntu-latest container: @@ -57,7 +62,7 @@ jobs: shell: bash working-directory: ${{ env.ROS_WS }} run: | - rosdep update; + rosdep update --include-eol-distros; rosdep install -i -y --rosdistro ${ROS_DISTRO} --from-paths src - name: colcon build shell: bash diff --git a/.github/workflows/scan_build.yml b/.github/workflows/scan_build.yml index 0b6bf8f..9ed3cbd 100644 --- a/.github/workflows/scan_build.yml +++ b/.github/workflows/scan_build.yml @@ -12,7 +12,7 @@ env: jobs: static_analysis: - if: contains(github.event.pull_request.labels.*.name, 'do-static-analyzer-test') + if: ${{ contains(github.event.pull_request.labels.*.name, 'do-static-analyzer-test') || github.event_name == 'workflow_dispatch'}} name: Static analysis runs-on: ubuntu-latest container: @@ -46,7 +46,7 @@ jobs: shell: bash working-directory: ${{ env.ROS_WS }} run: | - rosdep update; + rosdep update --include-eol-distros; rosdep install -i -y --rosdistro ${ROS_DISTRO} --from-paths src - name: colcon build up-to shell: bash diff --git a/cmake/DefaultCFlags.cmake b/cmake/DefaultCFlags.cmake index cca3261..ed18bae 100644 --- a/cmake/DefaultCFlags.cmake +++ b/cmake/DefaultCFlags.cmake @@ -13,7 +13,7 @@ if ("${CMAKE_CXX_COMPILER_ID} " MATCHES "GNU ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -fdiagnostics-color=always -ffunction-sections -fopenmp -fPIC -fstack-protector -fno-omit-frame-pointer -no-canonical-prefixes -O2 -std=c++17 -Wall -Wno-builtin-macro-redefined -Wno-missing-field-initializers -Wregister -Wstrict-overflow -Wno-unused-const-variable") endif () elseif ("${CMAKE_CXX_COMPILER_ID} " MATCHES "Clang ") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -fdiagnostics-color=always -ffunction-sections -fPIC -fstack-protector -fno-omit-frame-pointer -no-canonical-prefixes -O2 -std=c++17 -Wall -Wno-builtin-macro-redefined -Wno-deprecated-dynamic-exception-spec -Wno-enum-compare-switch -Wno-gnu-designator -Wno-missing-field-initializers -Wno-register -Wno-strict-overflow -Wno-unknown-warning-option -Wno-unneeded-internal-declaration -Wno-unused-const-variable -Wno-missing-braces") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsized-deallocation -fdata-sections -fdiagnostics-color=always -ffunction-sections -fPIC -fstack-protector -fno-omit-frame-pointer -no-canonical-prefixes -O2 -std=c++17 -Wall -Wno-builtin-macro-redefined -Wno-deprecated-dynamic-exception-spec -Wno-enum-compare-switch -Wno-gnu-designator -Wno-missing-field-initializers -Wno-register -Wno-strict-overflow -Wno-unknown-warning-option -Wno-unneeded-internal-declaration -Wno-unused-const-variable -Wno-missing-braces") else () message(FATAL_ERROR "Your C++ compiler does not support C++17.") endif ()