Skip to content

Commit

Permalink
Fix Github windows CI (#3887)
Browse files Browse the repository at this point in the history
* Refs #19490: Fix nightly windows CI

Signed-off-by: EduPonz <[email protected]>

* Refs #19490: Look for OpenSSL directory in several places

Signed-off-by: EduPonz <[email protected]>

* Refs #19490: Fix Fast DDS branch selection

Signed-off-by: EduPonz <[email protected]>

* Refs #19490: Defer to master if cannot find repos

Signed-off-by: EduPonz <[email protected]>

* Refs #19490: Apply Miguel's suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
(cherry picked from commit 7057142)

# Conflicts:
#	.github/workflows/reusable-windows-ci.yml
  • Loading branch information
EduPonz authored and mergify[bot] committed Oct 6, 2023
1 parent 462f5d7 commit 932df68
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/config/default_ci_2.10.x.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
fastcdr:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: 1.0.x
foonathan_memory_vendor:
type: git
url: https://github.com/eProsima/foonathan_memory_vendor.git
version: v1.3.0
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
13 changes: 13 additions & 0 deletions .github/workflows/config/default_ci_2.11.x.repos
Original file line number Diff line number Diff line change
@@ -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: v1.3.1
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
13 changes: 13 additions & 0 deletions .github/workflows/config/default_ci_2.6.x.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
fastcdr:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: 1.0.x
foonathan_memory_vendor:
type: git
url: https://github.com/eProsima/foonathan_memory_vendor.git
version: v1.2.1
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
File renamed without changes.
13 changes: 13 additions & 0 deletions .github/workflows/config/nightly_2.10.x.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
fastcdr:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: 1.0.x
foonathan_memory_vendor:
type: git
url: https://github.com/eProsima/foonathan_memory_vendor.git
version: v1.3.0
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
13 changes: 13 additions & 0 deletions .github/workflows/config/nightly_2.11.x.repos
Original file line number Diff line number Diff line change
@@ -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: v1.3.1
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
13 changes: 13 additions & 0 deletions .github/workflows/config/nightly_2.6.x.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
fastcdr:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: 1.0.x
foonathan_memory_vendor:
type: git
url: https://github.com/eProsima/foonathan_memory_vendor.git
version: v1.2.1
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
File renamed without changes.
2 changes: 2 additions & 0 deletions .github/workflows/nightly-windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ 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
with:
label: 'nightly-nosec-windows-ci'
cmake-args: "-DSECURITY=OFF"
ctest-args: "-LE xfail"
fastdds_branch: 'master'
43 changes: 41 additions & 2 deletions .github/workflows/reusable-windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -135,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
Expand Down Expand Up @@ -200,6 +228,7 @@ jobs:
# clean up
'build', 'googletest', 'gtest.log' | del -Recurse -Force
<<<<<<< HEAD
- name: Install OpenSSL
uses: eProsima/eprosima-CI/windows/install_openssl@v0

Expand All @@ -208,6 +237,8 @@ jobs:
# Update the environment
"OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM
=======
>>>>>>> 7057142d6 (Fix Github windows CI (#3887))
- name: Update known hosts file for DNS resolver testing
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }}
run: |
Expand Down Expand Up @@ -348,13 +379,21 @@ 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"
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.repos"
$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"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -50,3 +54,4 @@ jobs:
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
ctest-args: ${{ inputs.ctest-args }}
fastdds_branch: ${{ inputs.fastdds_branch || github.base_ref || github.ref || 'master' }}

0 comments on commit 932df68

Please sign in to comment.