From d90c2c6f079ab1d5a7c69884e01cc1abba586e8f Mon Sep 17 00:00:00 2001 From: EduPonz Date: Thu, 28 Sep 2023 10:36:24 +0200 Subject: [PATCH 1/5] Refs #19490: Fix nightly windows CI Signed-off-by: EduPonz --- .../{default_ci.repos => default_ci_2.10.x.repos} | 0 .../{nightly.repos => default_ci_2.11.x.repos} | 0 .github/workflows/config/default_ci_2.6.x.repos | 13 +++++++++++++ .github/workflows/config/default_ci_master.repos | 13 +++++++++++++ .github/workflows/config/nightly_2.10.x.repos | 13 +++++++++++++ .github/workflows/config/nightly_2.11.x.repos | 13 +++++++++++++ .github/workflows/config/nightly_2.6.x.repos | 13 +++++++++++++ .github/workflows/config/nightly_master.repos | 13 +++++++++++++ .github/workflows/nightly-windows-ci.yml | 2 ++ .github/workflows/reusable-windows-ci.yml | 8 ++++++-- .github/workflows/windows-ci.yml | 5 +++++ 11 files changed, 91 insertions(+), 2 deletions(-) rename .github/workflows/config/{default_ci.repos => default_ci_2.10.x.repos} (100%) rename .github/workflows/config/{nightly.repos => default_ci_2.11.x.repos} (100%) create mode 100644 .github/workflows/config/default_ci_2.6.x.repos create mode 100644 .github/workflows/config/default_ci_master.repos create mode 100644 .github/workflows/config/nightly_2.10.x.repos create mode 100644 .github/workflows/config/nightly_2.11.x.repos create mode 100644 .github/workflows/config/nightly_2.6.x.repos create mode 100644 .github/workflows/config/nightly_master.repos diff --git a/.github/workflows/config/default_ci.repos b/.github/workflows/config/default_ci_2.10.x.repos similarity index 100% rename from .github/workflows/config/default_ci.repos rename to .github/workflows/config/default_ci_2.10.x.repos diff --git a/.github/workflows/config/nightly.repos b/.github/workflows/config/default_ci_2.11.x.repos similarity index 100% rename from .github/workflows/config/nightly.repos rename to .github/workflows/config/default_ci_2.11.x.repos diff --git a/.github/workflows/config/default_ci_2.6.x.repos b/.github/workflows/config/default_ci_2.6.x.repos new file mode 100644 index 00000000000..edebca8dd96 --- /dev/null +++ b/.github/workflows/config/default_ci_2.6.x.repos @@ -0,0 +1,13 @@ +repositories: + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: 1.1.x + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: master + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/config/default_ci_master.repos b/.github/workflows/config/default_ci_master.repos new file mode 100644 index 00000000000..5d3651ca82c --- /dev/null +++ b/.github/workflows/config/default_ci_master.repos @@ -0,0 +1,13 @@ +repositories: + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: master + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: master + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/config/nightly_2.10.x.repos b/.github/workflows/config/nightly_2.10.x.repos new file mode 100644 index 00000000000..edebca8dd96 --- /dev/null +++ b/.github/workflows/config/nightly_2.10.x.repos @@ -0,0 +1,13 @@ +repositories: + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: 1.1.x + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: master + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/config/nightly_2.11.x.repos b/.github/workflows/config/nightly_2.11.x.repos new file mode 100644 index 00000000000..edebca8dd96 --- /dev/null +++ b/.github/workflows/config/nightly_2.11.x.repos @@ -0,0 +1,13 @@ +repositories: + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: 1.1.x + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: master + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/config/nightly_2.6.x.repos b/.github/workflows/config/nightly_2.6.x.repos new file mode 100644 index 00000000000..edebca8dd96 --- /dev/null +++ b/.github/workflows/config/nightly_2.6.x.repos @@ -0,0 +1,13 @@ +repositories: + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: 1.1.x + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: master + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/config/nightly_master.repos b/.github/workflows/config/nightly_master.repos new file mode 100644 index 00000000000..5d3651ca82c --- /dev/null +++ b/.github/workflows/config/nightly_master.repos @@ -0,0 +1,13 @@ +repositories: + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: master + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: master + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/nightly-windows-ci.yml b/.github/workflows/nightly-windows-ci.yml index 3d1555cc816..6f17afa6bd8 100644 --- a/.github/workflows/nightly-windows-ci.yml +++ b/.github/workflows/nightly-windows-ci.yml @@ -12,6 +12,7 @@ jobs: label: 'nightly-sec-windows-ci' cmake-args: "-DSECURITY=ON" ctest-args: "-LE xfail" + fastdds_branch: 'master' nightly-nosec-windows-ci: uses: ./.github/workflows/reusable-windows-ci.yml @@ -19,3 +20,4 @@ jobs: label: 'nightly-nosec-windows-ci' cmake-args: "-DSECURITY=OFF" ctest-args: "-LE xfail" + fastdds_branch: 'master' diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 13755d7ed8e..4bd1022b5cd 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -19,6 +19,10 @@ on: description: 'Extra arguments for ctest cli' required: false type: string + fastdds_branch: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + required: true + type: string defaults: run: @@ -348,13 +352,13 @@ jobs: # Nightly job if ("${{ inputs.label }}".Contains("nightly")) { - $depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly.repos" + $depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_${{ inputs.fastdds_branch }}.repos" $meta_path = ".\src\fastrtps\.github\workflows\config\nightly.meta" } # Either PR or manual else { - $depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci.repos" + $depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_${{ inputs.fastdds_branch }}.repos" $meta_path = ".\src\fastrtps\.github\workflows\config\default_ci.meta" } Write-Output "Selected repos files: $depends_repos_path" diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index eb2fa7a4b21..8c006491568 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -19,6 +19,10 @@ on: description: 'Extra arguments for ctest cli' required: false type: string + fastdds_branch: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + type: string + required: true push: branches: @@ -49,3 +53,4 @@ jobs: colcon-args: ${{ inputs.colcon-args }} cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args }} + fastdds_branch: ${{ inputs.fastdds_branch || github.ref || 'master' }} From cc4ba58c9e2f7591d9c5a865b2b815b4b95354ed Mon Sep 17 00:00:00 2001 From: EduPonz Date: Thu, 28 Sep 2023 11:04:59 +0200 Subject: [PATCH 2/5] Refs #19490: Look for OpenSSL directory in several places Signed-off-by: EduPonz --- .github/workflows/reusable-windows-ci.yml | 32 +++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 4bd1022b5cd..67b2f8c2de6 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -139,6 +139,30 @@ jobs: # WER service is manual by default Start-Service WerSvc + - name: Install OpenSSL + uses: eProsima/eprosima-CI/windows/install_openssl@v0 + + - name: Update OpenSSL environment variables + run: | + # Update the environment + if (Test-Path -Path $Env:ProgramW6432\OpenSSL) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + elseif (Test-Path -Path $Env:ProgramW6432\OpenSSL-Win) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + elseif (Test-Path -Path $Env:ProgramW6432\OpenSSL-Win64) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win64" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + else + { + Write-Error -Message "Cannot find OpenSSL installation." + exit 1 + } + - name: Install colcon and other python packages run: | pip3 install -U colcon-common-extensions vcstool colcon-mixin xmlschema @@ -204,14 +228,6 @@ jobs: # clean up 'build', 'googletest', 'gtest.log' | del -Recurse -Force - - name: Install OpenSSL - uses: eProsima/eprosima-CI/windows/install_openssl@v0 - - - name: Update OpenSSL environment variables - run: | - # Update the environment - "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win64" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM - - name: Update known hosts file for DNS resolver testing if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }} run: | From 94b2c22ba1e48e566c084b42edb76ad72b503bda Mon Sep 17 00:00:00 2001 From: EduPonz Date: Thu, 28 Sep 2023 11:32:05 +0200 Subject: [PATCH 3/5] Refs #19490: Fix Fast DDS branch selection Signed-off-by: EduPonz --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 8c006491568..caec35d6e87 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -53,4 +53,4 @@ jobs: colcon-args: ${{ inputs.colcon-args }} cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args }} - fastdds_branch: ${{ inputs.fastdds_branch || github.ref || 'master' }} + fastdds_branch: ${{ inputs.fastdds_branch || github.head_ref || github.base_ref || github.ref || 'master' }} From ccc5133bb3cd4131cead719ffdc4d25a5078dbb0 Mon Sep 17 00:00:00 2001 From: EduPonz Date: Thu, 28 Sep 2023 11:58:00 +0200 Subject: [PATCH 4/5] Refs #19490: Defer to master if cannot find repos Signed-off-by: EduPonz --- .github/workflows/reusable-windows-ci.yml | 8 ++++++++ .github/workflows/windows-ci.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 67b2f8c2de6..dadae5ac701 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -369,12 +369,20 @@ jobs: if ("${{ inputs.label }}".Contains("nightly")) { $depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_${{ inputs.fastdds_branch }}.repos" + if (!(Test-Path -Path $depends_repos_path)) + { + $depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_master.repos" + } $meta_path = ".\src\fastrtps\.github\workflows\config\nightly.meta" } # Either PR or manual else { $depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_${{ inputs.fastdds_branch }}.repos" + if (!(Test-Path -Path $depends_repos_path)) + { + $depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_master.repos" + } $meta_path = ".\src\fastrtps\.github\workflows\config\default_ci.meta" } Write-Output "Selected repos files: $depends_repos_path" diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index caec35d6e87..6b1a2c58c4e 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -53,4 +53,4 @@ jobs: colcon-args: ${{ inputs.colcon-args }} cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args }} - fastdds_branch: ${{ inputs.fastdds_branch || github.head_ref || github.base_ref || github.ref || 'master' }} + fastdds_branch: ${{ inputs.fastdds_branch || github.base_ref || github.ref || 'master' }} From 2839b2dd688cba00be81fc7d3518ec677ba14ba6 Mon Sep 17 00:00:00 2001 From: EduPonz Date: Fri, 29 Sep 2023 07:05:30 +0200 Subject: [PATCH 5/5] Refs #19490: Apply Miguel's suggestions Signed-off-by: EduPonz --- .github/workflows/config/default_ci_2.10.x.repos | 4 ++-- .github/workflows/config/default_ci_2.11.x.repos | 2 +- .github/workflows/config/default_ci_2.6.x.repos | 4 ++-- .github/workflows/config/nightly_2.10.x.repos | 4 ++-- .github/workflows/config/nightly_2.11.x.repos | 2 +- .github/workflows/config/nightly_2.6.x.repos | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/config/default_ci_2.10.x.repos b/.github/workflows/config/default_ci_2.10.x.repos index edebca8dd96..e5a8ab31ec8 100644 --- a/.github/workflows/config/default_ci_2.10.x.repos +++ b/.github/workflows/config/default_ci_2.10.x.repos @@ -2,11 +2,11 @@ repositories: fastcdr: type: git url: https://github.com/eProsima/Fast-CDR.git - version: 1.1.x + version: 1.0.x foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git - version: master + version: v1.3.0 googletest-distribution: type: git url: https://github.com/google/googletest.git diff --git a/.github/workflows/config/default_ci_2.11.x.repos b/.github/workflows/config/default_ci_2.11.x.repos index edebca8dd96..abef4e4e7b5 100644 --- a/.github/workflows/config/default_ci_2.11.x.repos +++ b/.github/workflows/config/default_ci_2.11.x.repos @@ -6,7 +6,7 @@ repositories: foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git - version: master + version: v1.3.1 googletest-distribution: type: git url: https://github.com/google/googletest.git diff --git a/.github/workflows/config/default_ci_2.6.x.repos b/.github/workflows/config/default_ci_2.6.x.repos index edebca8dd96..dafcf2fd3f7 100644 --- a/.github/workflows/config/default_ci_2.6.x.repos +++ b/.github/workflows/config/default_ci_2.6.x.repos @@ -2,11 +2,11 @@ repositories: fastcdr: type: git url: https://github.com/eProsima/Fast-CDR.git - version: 1.1.x + version: 1.0.x foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git - version: master + version: v1.2.1 googletest-distribution: type: git url: https://github.com/google/googletest.git diff --git a/.github/workflows/config/nightly_2.10.x.repos b/.github/workflows/config/nightly_2.10.x.repos index edebca8dd96..e5a8ab31ec8 100644 --- a/.github/workflows/config/nightly_2.10.x.repos +++ b/.github/workflows/config/nightly_2.10.x.repos @@ -2,11 +2,11 @@ repositories: fastcdr: type: git url: https://github.com/eProsima/Fast-CDR.git - version: 1.1.x + version: 1.0.x foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git - version: master + version: v1.3.0 googletest-distribution: type: git url: https://github.com/google/googletest.git diff --git a/.github/workflows/config/nightly_2.11.x.repos b/.github/workflows/config/nightly_2.11.x.repos index edebca8dd96..abef4e4e7b5 100644 --- a/.github/workflows/config/nightly_2.11.x.repos +++ b/.github/workflows/config/nightly_2.11.x.repos @@ -6,7 +6,7 @@ repositories: foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git - version: master + version: v1.3.1 googletest-distribution: type: git url: https://github.com/google/googletest.git diff --git a/.github/workflows/config/nightly_2.6.x.repos b/.github/workflows/config/nightly_2.6.x.repos index edebca8dd96..dafcf2fd3f7 100644 --- a/.github/workflows/config/nightly_2.6.x.repos +++ b/.github/workflows/config/nightly_2.6.x.repos @@ -2,11 +2,11 @@ repositories: fastcdr: type: git url: https://github.com/eProsima/Fast-CDR.git - version: 1.1.x + version: 1.0.x foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git - version: master + version: v1.2.1 googletest-distribution: type: git url: https://github.com/google/googletest.git