Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ concurrency:

jobs:
mac-ci:
if: ${{ (
!contains(github.event.pull_request.labels.*.name, 'skip-ci') &&
!contains(github.event.pull_request.labels.*.name, 'conflicts')
) }}
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
uses: ./.github/workflows/reusable-mac-ci.yml
with:
label: ${{ inputs.label || 'mac-ci' }}
Expand All @@ -60,4 +57,11 @@ jobs:
ctest-args: ${{ inputs.ctest-args }}
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.14.x' }}
use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }}
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }}
run-build: ${{ !(github.event_name == 'pull_request') ||
!contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
run-tests: ${{ (inputs.run-tests == true) ||
(
(github.event_name == 'pull_request') &&
(!contains(github.event.pull_request.labels.*.name, 'no-test')) &&
(!contains(github.event.pull_request.labels.*.name, 'skip-ci'))
) }}
22 changes: 19 additions & 3 deletions .github/workflows/reusable-mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
required: false
type: boolean
default: false
run-build:
description: 'Build Fast DDS (CI skipped otherwise)'
required: false
type: boolean
default: true
run-tests:
description: 'Run test suite of Fast DDS'
required: false
Expand All @@ -56,41 +61,47 @@ jobs:
- 'RelWithDebInfo'
steps:
- name: Sync eProsima/Fast-DDS repository
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/fastrtps
submodules: true
ref: ${{ inputs.fastdds-branch }}

- name: Install Fix Python version
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: '3.22.6'

- name: Install brew dependencies
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/macos/install_brew_packages@v0
with:
packages: llvm tinyxml2 openssl@3.0
update: false
upgrade: false

- name: Install colcon
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/macos/install_colcon@v0

- name: Install Python dependencies
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/macos/install_python_packages@v0
with:
packages: vcstool xmlschema
upgrade: false

- name: Setup CCache
if: ${{ inputs.run-build == true && inputs.use-ccache == true }}
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
if: ${{ inputs.use-ccache == true }}
with:
api_token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -99,26 +110,30 @@ jobs:

- name: Get Fast CDR branch
id: get_fastcdr_branch
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
with:
remote_repository: eProsima/Fast-CDR
fallback_branch: ${{ inputs.fastcdr_branch }}

- name: Download Fast CDR
uses: eProsima/eProsima-CI/external/checkout@v0
if: ${{ inputs.run-build == true }}
with:
repository: eProsima/Fast-CDR
path: ${{ github.workspace }}/src/fastcdr
ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}

- name: Fetch Fast DDS dependencies
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos
destination_workspace: src
skip_existing: 'true'

- name: Fetch Fast DDS CI dependencies
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.repos
Expand All @@ -131,6 +146,7 @@ jobs:
# - Not working solution: https://github.com/macports/macports-ports/pull/21839/files
- name: Colcon build
continue-on-error: false
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/ubuntu/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta
Expand All @@ -141,7 +157,7 @@ jobs:
workspace: ${{ github.workspace }}

- name: Upload build artifacts
if: ${{ inputs.run-tests == true }}
if: ${{ inputs.run-build == true && inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/upload-artifact@v0
with:
name: fastdds_build_${{ inputs.label }}
Expand Down Expand Up @@ -215,8 +231,8 @@ jobs:
sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts

- name: Colcon test
if: ${{ inputs.run-tests == true }}
id: test
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/ubuntu/colcon_test@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta
Expand Down
Loading