Skip to content

Commit

Permalink
Refs #20542: Run ASan inside a container
Browse files Browse the repository at this point in the history
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed Mar 15, 2024
1 parent 447b1bb commit 32e6306
Showing 1 changed file with 28 additions and 32 deletions.
60 changes: 28 additions & 32 deletions .github/workflows/address-sanitizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,20 @@ concurrency:

jobs:
asan-test:

if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci') ||
contains(github.event.pull_request.labels.*.name, 'conflicts')) }}

runs-on: ubuntu-22.04

env:
FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }}
container:
image: ubuntu:22.04
env:
FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }}

steps:
- 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'
run: |
apt update
apt install -y curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget git libssl-dev build-essential cmake
- name: Install colcon
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0
Expand All @@ -62,7 +56,7 @@ jobs:
uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0
with:
source_repository: eProsima/Fast-DDS
source_repository_branch: ${{ env.FASTDDS_BRANCH }}
source_repository_branch: ${FASTDDS_BRANCH}
file_name: fastrtps.repos
file_result: fastrtps.repos

Expand All @@ -74,13 +68,13 @@ jobs:

- name: Checkout Fast DDS branch
run: |
cd ./src/fastrtps
git checkout ${{ env.FASTDDS_BRANCH }}
cd src/fastrtps
git checkout ${FASTDDS_BRANCH}
- name: Fetch Fast DDS ASan dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.repos
vcs_repos_file: src/fastrtps/.github/workflows/config/asan.repos
destination_workspace: src
skip_existing: 'true'

Expand Down Expand Up @@ -118,22 +112,22 @@ jobs:
asan-discovery-server-test:

if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci') ||
contains(github.event.pull_request.labels.*.name, 'conflicts')) }}

runs-on: ubuntu-22.04

env:
FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }}
DEFAULT_DISCOVERY_SERVER_BRANCH: ${{ github.event.inputs.discovery_server_branch || 'master' }}
container:
image: ubuntu:22.04
env:
FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }}
DEFAULT_DISCOVERY_SERVER_BRANCH: ${{ github.event.inputs.discovery_server_branch || 'master' }}

steps:
- 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
run: |
apt update
apt install -y curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget git libssl-dev build-essential cmake
- name: Install colcon
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0
Expand All @@ -147,7 +141,7 @@ jobs:
uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0
with:
source_repository: eProsima/Fast-DDS
source_repository_branch: ${{ env.FASTDDS_BRANCH }}
source_repository_branch: ${FASTDDS_BRANCH}
file_name: fastrtps.repos
file_result: fastrtps.repos

Expand All @@ -159,20 +153,22 @@ jobs:

- name: Checkout Fast DDS branch
run: |
cd ./src/fastrtps
git checkout ${{ env.FASTDDS_BRANCH }}
cd src/fastrtps
git checkout ${FASTDDS_BRANCH}
- name: Sync eProsima/Discovery-Server repository
uses: actions/checkout@v4
with:
path: src/discovery_server
repository: eProsima/Discovery-Server
ref: ${{ env.DEFAULT_DISCOVERY_SERVER_BRANCH }}
ref: ${DEFAULT_DISCOVERY_SERVER_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: src/fastrtps/.github/workflows/config/asan.repos
destination_workspace: src
skip_existing: 'true'

- name: Build workspace
run: |
Expand Down

0 comments on commit 32e6306

Please sign in to comment.