Skip to content

Commit

Permalink
Use eProsima-CI action to install Qt (#173)
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
(cherry picked from commit 1125496)

# Conflicts:
#	.github/workflows/reusable-windows-ci.yml
  • Loading branch information
JesusPoderoso authored and mergify[bot] committed Sep 6, 2024
1 parent 995b068 commit 7966b54
Show file tree
Hide file tree
Showing 2 changed files with 163 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
# Do not setup python as it will internally modify the pythonLocation env variable
# and we want to use a fix version
- name: Install Qt
uses: jurplel/[email protected]
uses: eProsima/eProsima-CI/external/install_qt@v0
with:
version: '5.15.2'
dir: '${{ github.workspace }}/qt_installation/'
Expand Down
162 changes: 162 additions & 0 deletions .github/workflows/reusable-windows-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
name: Shapes Demo Windows CI reusable workflow

on:
workflow_call:
inputs:
os-version:
description: 'The OS image for the workflow'
required: false
default: 'windows-2019'
type: string
vs-toolset:
description: 'The VS toolset to use for the build'
required: false
default: 'v142'
type: string
label:
description: 'ID associated to the workflow'
required: true
type: string
colcon-args:
description: 'Extra arguments for colcon cli'
required: false
type: string
cmake-args:
description: 'Extra arguments for cmake cli'
required: false
type: string
ctest-args:
description: 'Extra arguments for ctest cli'
required: false
type: string
shapes-demo-branch:
description: 'Branch or tag of Shapes Demo repository'
required: true
type: string
fastdds-branch:
description: 'Branch or tag of Fast DDS repository'
required: true
type: string
run-build:
description: 'Build Shapes Demo (CI skipped otherwise)'
required: false
type: boolean
default: true
env:
colcon-build-default-cmake-args: '-DTHIRDPARTY_Asio=FORCE -DTHIRDPARTY_TinyXML2=FORCE -DTHIRDPARTY_fastcdr=OFF -DTHIRDPARTY_UPDATE=ON -DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS="/MP /WX"'
defaults:
run:
shell: pwsh

jobs:
shapes_demo_build:
runs-on: ${{ inputs.os-version }}
if: ${{ inputs.run-build == true }}
strategy:
fail-fast: false
matrix:
cmake-build-type:
- 'RelWithDebInfo'

steps:
- name: Add ci-pending label if PR
if: ${{ github.event_name == 'pull_request' }}
uses: eProsima/eProsima-CI/external/add_labels@v0
with:
labels: ci-pending
number: ${{ github.event.number }}
repo: eProsima/ShapesDemo

- name: Sync eProsima/ShapesDemo repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/ShapesDemo
ref: ${{ inputs.shapes-demo-branch }}

- name: Install Fix Python version
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: '3.22.6'

- name: Install OpenSSL
uses: eProsima/eprosima-CI/windows/install_openssl@v0
with:
version: '3.1.1'

- 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
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 pywin32

# Do not setup python as it will internally modify the pythonLocation env variable
# and we want to use a fix version
- name: Install Qt
uses: eProsima/eProsima-CI/external/install_qt@v0
with:
version: '5.15.2'
dir: '${{ github.workspace }}/qt_installation/'
arch: 'win64_msvc2019_64'
modules: 'qtcharts'
setup-python: 'false'

- name: Get Fast DDS branch
id: get_fastdds_branch
uses: eProsima/eProsima-CI/multiplatform/get_related_branch_from_repo@v0
with:
remote_repository: eProsima/Fast-DDS
fallback_branch: ${{ inputs.fastdds-branch }}

- name: Download Fast DDS repo
uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-DDS
path: src/fastdds
ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }}

- name: Fetch Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastdds/fastdds.repos
destination_workspace: src
skip_existing: 'true'

- name: Colcon build
continue-on-error: false
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/ShapesDemo/.github/workflows/config/build.meta
colcon_build_args: ${{ inputs.colcon-args }}
colcon_build_args_default: --event-handlers console_direct+
cmake_args: ${{ inputs.cmake-args }}
cmake_args_default: '-T ${{ inputs.vs-toolset }} ${{ env.colcon-build-default-cmake-args }}'
cmake_build_type: ${{ matrix.cmake-build-type }}
workspace: ${{ github.workspace }}

0 comments on commit 7966b54

Please sign in to comment.