From 2bf50546afb4becafa933c28389e7a15d5640844 Mon Sep 17 00:00:00 2001 From: Eduardo Ponz Segrelles Date: Thu, 30 Nov 2023 15:41:44 +0100 Subject: [PATCH] Fix colcon on github CI (#4075) * Refs #20055: Fix colcon on github CI Signed-off-by: EduPonz * Refs #20055: Install colcon and python deps for documentation using eProsima-CI Signed-off-by: EduPonz * Refs #20055: Windows CI: Fail on build failure Signed-off-by: EduPonz --------- Signed-off-by: EduPonz (cherry picked from commit 2359f499827d3950139066ee7428e4034cf9fc7a) --- .../install-python-packages/action.yml | 18 ---------- .../workflows/config/default_ci_2.12.x.repos | 13 +++++++ .github/workflows/config/nightly_2.12.x.repos | 13 +++++++ .github/workflows/documentation-tests.yaml | 9 +++-- .github/workflows/nightly-windows-ci.yml | 2 +- .github/workflows/reusable-windows-ci.yml | 13 +++++-- .github/workflows/sanitizer-tests.yaml | 34 +++++++++++-------- .github/workflows/thread-sanitizer.yaml | 17 ++++++---- .github/workflows/windows-ci.yml | 1 + 9 files changed, 75 insertions(+), 45 deletions(-) delete mode 100644 .github/actions/install-python-packages/action.yml create mode 100644 .github/workflows/config/default_ci_2.12.x.repos create mode 100644 .github/workflows/config/nightly_2.12.x.repos diff --git a/.github/actions/install-python-packages/action.yml b/.github/actions/install-python-packages/action.yml deleted file mode 100644 index 837107a8f67..00000000000 --- a/.github/actions/install-python-packages/action.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: 'install-python-packages' -description: 'Install necessary python packages' -runs: - using: "composite" - steps: - - id: install-python-packages - run: | - sudo pip3 install -U \ - colcon-common-extensions \ - colcon-mixin \ - vcstool \ - setuptools \ - gcovr \ - tomark \ - xmltodict \ - jsondiff \ - pandas - shell: bash diff --git a/.github/workflows/config/default_ci_2.12.x.repos b/.github/workflows/config/default_ci_2.12.x.repos new file mode 100644 index 00000000000..f1c0628cf69 --- /dev/null +++ b/.github/workflows/config/default_ci_2.12.x.repos @@ -0,0 +1,13 @@ +repositories: + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: v2.1.0 + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: v1.3.1 + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/config/nightly_2.12.x.repos b/.github/workflows/config/nightly_2.12.x.repos new file mode 100644 index 00000000000..f1c0628cf69 --- /dev/null +++ b/.github/workflows/config/nightly_2.12.x.repos @@ -0,0 +1,13 @@ +repositories: + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: v2.1.0 + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: v1.3.1 + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/documentation-tests.yaml b/.github/workflows/documentation-tests.yaml index 18a48cd3e60..29ccc898777 100644 --- a/.github/workflows/documentation-tests.yaml +++ b/.github/workflows/documentation-tests.yaml @@ -93,9 +93,14 @@ jobs: path: src/fastdds-docs ref: ${{ env.ACTION_BRANCH_NAME }} + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + - name: Install required python packages - run: | - pip3 install -r src/fastdds-docs/docs/requirements.txt + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + upgrade: false + requirements_file_name: src/fastdds-docs/docs/requirements.txt - name: Build documentation run: | diff --git a/.github/workflows/nightly-windows-ci.yml b/.github/workflows/nightly-windows-ci.yml index 6f17afa6bd8..50d96558717 100644 --- a/.github/workflows/nightly-windows-ci.yml +++ b/.github/workflows/nightly-windows-ci.yml @@ -1,4 +1,4 @@ -name: Fast-DDS Windows CI +name: Fast-DDS Windows CI (nightly) on: workflow_dispatch: diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index dadae5ac701..fec0ee42ef8 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -163,10 +163,16 @@ jobs: exit 1 } - - name: Install colcon and other python packages - run: | - pip3 install -U colcon-common-extensions vcstool colcon-mixin xmlschema + - name: Install colcon + uses: eProsima/eProsima-CI/windows/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/windows/install_python_packages@v0 + with: + packages: vcstool xmlschema + - name: Patch colcon for issue with VS2022 + run: | # patch colcon issue with visual studio 2022 $patch = gci -Include build.py -Recurse ` -Path ((gcm colcon).source | Split-Path | Join-Path -ChildPath "..\Lib\site-packages\colcon_cmake\*") @@ -434,6 +440,7 @@ jobs: - name: Build id: build + continue-on-error: false run: | # build type mixin names doesn't match cmake ones $translate = @{ diff --git a/.github/workflows/sanitizer-tests.yaml b/.github/workflows/sanitizer-tests.yaml index dd2f35d8dc3..22fb6e31b70 100644 --- a/.github/workflows/sanitizer-tests.yaml +++ b/.github/workflows/sanitizer-tests.yaml @@ -31,15 +31,21 @@ jobs: FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }} steps: - - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + - name: Install wget + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: packages: wget - - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 with: - packages: vcstool + packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 + - name: Get fastrtps.repos file + uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 with: source_repository: eProsima/Fast-DDS source_repository_branch: ${{ env.FASTDDS_BRANCH }} @@ -60,9 +66,6 @@ jobs: - name: Install apt packages uses: ./src/fastrtps/.github/actions/install-apt-packages - - name: Install Python packages - uses: ./src/fastrtps/.github/actions/install-python-packages - - name: Install GTest uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0 with: @@ -113,15 +116,21 @@ jobs: DEFAULT_DISCOVERY_SERVER_BRANCH: ${{ github.event.inputs.discovery_server_branch || 'master' }} steps: - - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + - name: Install wget + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: packages: wget - - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 with: - packages: vcstool + packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 + - name: Get fastrtps.repos file + uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 with: source_repository: eProsima/Fast-DDS source_repository_branch: ${{ env.FASTDDS_BRANCH }} @@ -149,9 +158,6 @@ jobs: - name: Install apt packages uses: ./src/fastrtps/.github/actions/install-apt-packages - - name: Install Python packages - uses: ./src/fastrtps/.github/actions/install-python-packages - - name: Install GTest uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0 with: diff --git a/.github/workflows/thread-sanitizer.yaml b/.github/workflows/thread-sanitizer.yaml index 712e001d4dc..10db4044a5d 100644 --- a/.github/workflows/thread-sanitizer.yaml +++ b/.github/workflows/thread-sanitizer.yaml @@ -54,15 +54,21 @@ jobs: CXX: g++-12 steps: - - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + - name: Install wget + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: packages: wget - - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 with: - packages: vcstool + packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 + - name: Get fastrtps.repos file + uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 with: source_repository: eProsima/Fast-DDS source_repository_branch: ${{ env.FASTDDS_BRANCH }} @@ -83,9 +89,6 @@ jobs: - name: Install apt packages uses: ./src/fastrtps/.github/actions/install-apt-packages - - name: Install Python packages - uses: ./src/fastrtps/.github/actions/install-python-packages - - name: Install GTest uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0 with: diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 6b1a2c58c4e..61e059f42be 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -27,6 +27,7 @@ on: push: branches: - 'master' + - '2.12.x' - '2.11.x' - '2.10.x' - '2.6.x'