diff --git a/.github/workflows/address-sanitizers.yaml b/.github/workflows/address-sanitizers.yaml index 2760ce027ab..b8ea7d5dac0 100644 --- a/.github/workflows/address-sanitizers.yaml +++ b/.github/workflows/address-sanitizers.yaml @@ -19,6 +19,12 @@ on: - '**.md' - '**.txt' - '!**/CMakeLists.txt' +<<<<<<< HEAD +======= + + schedule: + - cron: '0 1 * * *' +>>>>>>> 0c439a09a ([20542] Pin CMake version and vm.mmap_rnd_bits in sanitizer workflows (#4558)) concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -37,11 +43,20 @@ jobs: FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || '2.10.x' }} steps: + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + - name: Install apt packages uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 @@ -72,10 +87,12 @@ jobs: cd ./src/fastrtps git checkout ${{ env.FASTDDS_BRANCH }} - - name: Install GTest - uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0 + - name: Fetch Fast DDS ASan dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: - version: v1.12.1 + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.repos + destination_workspace: src + skip_existing: 'true' - name: Build workspace run: | @@ -123,11 +140,23 @@ jobs: DEFAULT_DISCOVERY_SERVER_BRANCH: ${{ github.event.inputs.discovery_server_branch || 'v1.2.1' }} steps: + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + - name: Install apt packages uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + - name: Install colcon uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 diff --git a/.github/workflows/config/asan.repos b/.github/workflows/config/asan.repos new file mode 100644 index 00000000000..78eb1aa1ac4 --- /dev/null +++ b/.github/workflows/config/asan.repos @@ -0,0 +1,5 @@ +repositories: + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.12.1 diff --git a/.github/workflows/config/asan_colcon.meta b/.github/workflows/config/asan_colcon.meta index f3861032c74..a3806a59646 100644 --- a/.github/workflows/config/asan_colcon.meta +++ b/.github/workflows/config/asan_colcon.meta @@ -17,3 +17,12 @@ names: cmake-args: - "-DCMAKE_BUILD_TYPE=Debug" - "-DSANITIZER=Address" +<<<<<<< HEAD +======= + googletest-distribution: + cmake-args: + - "-Dgtest_force_shared_crt=ON" + - "-DBUILD_SHARED_LIBS=ON" + - "-DBUILD_GMOCK=ON" + +>>>>>>> 0c439a09a ([20542] Pin CMake version and vm.mmap_rnd_bits in sanitizer workflows (#4558)) diff --git a/.github/workflows/config/tsan_colcon.meta b/.github/workflows/config/tsan_colcon.meta index bfecf695cbe..fe81d592e79 100644 --- a/.github/workflows/config/tsan_colcon.meta +++ b/.github/workflows/config/tsan_colcon.meta @@ -17,3 +17,8 @@ names: - "-DFASTDDS_STATISTICS=ON" - "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'" - "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'" + googletest-distribution: + cmake-args: + - "-Dgtest_force_shared_crt=ON" + - "-DBUILD_SHARED_LIBS=ON" + - "-DBUILD_GMOCK=ON" diff --git a/.github/workflows/reusable-mac-ci.yml b/.github/workflows/reusable-mac-ci.yml index 0ba82850cee..50d3bb1dd4a 100644 --- a/.github/workflows/reusable-mac-ci.yml +++ b/.github/workflows/reusable-mac-ci.yml @@ -55,7 +55,7 @@ jobs: python-version: '3.11' - name: Get minimum supported version of CMake - uses: lukka/get-cmake@latest + uses: eProsima/eProsima-CI/external/get-cmake@v0 with: cmakeVersion: '3.16.3' diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 0387d140d78..6414e02194f 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -49,7 +49,7 @@ jobs: ref: ${{ inputs.fastdds-branch }} - name: Get minimum supported version of CMake - uses: lukka/get-cmake@latest + uses: eProsima/eProsima-CI/external/get-cmake@v0 with: cmakeVersion: '3.22.6' diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 8f607a95cf7..28feb91b9e4 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -49,7 +49,7 @@ jobs: ref: ${{ inputs.fastdds_branch }} - name: Get minimum supported version of CMake - uses: lukka/get-cmake@latest + uses: eProsima/eProsima-CI/external/get-cmake@v0 with: cmakeVersion: '3.16.3' diff --git a/.github/workflows/thread-sanitizer.yaml b/.github/workflows/thread-sanitizer.yaml index a0611f68189..72479fb17a0 100644 --- a/.github/workflows/thread-sanitizer.yaml +++ b/.github/workflows/thread-sanitizer.yaml @@ -23,6 +23,12 @@ on: - '**.txt' - '!**/CMakeLists.txt' +<<<<<<< HEAD +======= + schedule: + - cron: '0 1 * * *' + +>>>>>>> 0c439a09a ([20542] Pin CMake version and vm.mmap_rnd_bits in sanitizer workflows (#4558)) concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true @@ -47,11 +53,20 @@ jobs: CXX: g++-12 steps: + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + - name: Install apt packages uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 @@ -82,10 +97,12 @@ jobs: cd ./src/fastrtps git checkout ${{ env.FASTDDS_BRANCH }} - - name: Install GTest - uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0 + - name: Fetch Fast DDS CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: - version: release-1.11.0 + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos + destination_workspace: src + skip_existing: 'true' - name: Build workspace run: |