Skip to content

Commit 5f21cb3

Browse files
committed
Make skip-ci label report required statuses as pass (#6442) (#6443)
* Make `skip-ci` label report required statuses as pass (#6442) * Refs #25442. Update Windows workflows Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25442. Update Mac workflows Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25442. Update Sanitizer workflows Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25442. Update Ubuntu workflows Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25442. Improve readability. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25442. Fix condition for add-label. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 2ff2b60) # Conflicts: # .github/workflows/reusable-ubuntu-ci.yml # .github/workflows/sanitizers-ci.yml # .github/workflows/windows-ci.yml * Refs #25442. Fix conflicts. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25442. Add conditionals to fastdds_discovery_server_test steps. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 7894ec4) # Conflicts: # .github/workflows/reusable-ubuntu-ci.yml # .github/workflows/reusable-windows-ci.yml # .github/workflows/windows-ci.yml
1 parent 54a733d commit 5f21cb3

7 files changed

Lines changed: 338 additions & 38 deletions

File tree

.github/workflows/mac-ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ concurrency:
4848

4949
jobs:
5050
mac-ci:
51-
if: ${{ (
52-
!contains(github.event.pull_request.labels.*.name, 'skip-ci') &&
53-
!contains(github.event.pull_request.labels.*.name, 'conflicts')
54-
) }}
51+
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
5552
uses: ./.github/workflows/reusable-mac-ci.yml
5653
with:
5754
label: ${{ inputs.label || 'mac-ci' }}
@@ -60,4 +57,11 @@ jobs:
6057
ctest-args: ${{ inputs.ctest-args }}
6158
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.14.x' }}
6259
use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }}
63-
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }}
60+
run-build: ${{ !(github.event_name == 'pull_request') ||
61+
!contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
62+
run-tests: ${{ (inputs.run-tests == true) ||
63+
(
64+
(github.event_name == 'pull_request') &&
65+
(!contains(github.event.pull_request.labels.*.name, 'no-test')) &&
66+
(!contains(github.event.pull_request.labels.*.name, 'skip-ci'))
67+
) }}

.github/workflows/reusable-mac-ci.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ on:
3333
required: false
3434
type: boolean
3535
default: false
36+
run-build:
37+
description: 'Build Fast DDS (CI skipped otherwise)'
38+
required: false
39+
type: boolean
40+
default: true
3641
run-tests:
3742
description: 'Run test suite of Fast DDS'
3843
required: false
@@ -56,41 +61,47 @@ jobs:
5661
- 'RelWithDebInfo'
5762
steps:
5863
- name: Sync eProsima/Fast-DDS repository
64+
if: ${{ inputs.run-build == true }}
5965
uses: eProsima/eProsima-CI/external/checkout@v0
6066
with:
6167
path: src/fastrtps
6268
submodules: true
6369
ref: ${{ inputs.fastdds-branch }}
6470

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

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

7583
- name: Install brew dependencies
84+
if: ${{ inputs.run-build == true }}
7685
uses: eProsima/eProsima-CI/macos/install_brew_packages@v0
7786
with:
7887
packages: llvm tinyxml2 openssl@3.0
7988
update: false
8089
upgrade: false
8190

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

8595
- name: Install Python dependencies
96+
if: ${{ inputs.run-build == true }}
8697
uses: eProsima/eProsima-CI/macos/install_python_packages@v0
8798
with:
8899
packages: vcstool xmlschema
89100
upgrade: false
90101

91102
- name: Setup CCache
103+
if: ${{ inputs.run-build == true && inputs.use-ccache == true }}
92104
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
93-
if: ${{ inputs.use-ccache == true }}
94105
with:
95106
api_token: ${{ secrets.GITHUB_TOKEN }}
96107

@@ -99,26 +110,30 @@ jobs:
99110

100111
- name: Get Fast CDR branch
101112
id: get_fastcdr_branch
113+
if: ${{ inputs.run-build == true }}
102114
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
103115
with:
104116
remote_repository: eProsima/Fast-CDR
105117
fallback_branch: ${{ inputs.fastcdr_branch }}
106118

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

114127
- name: Fetch Fast DDS dependencies
128+
if: ${{ inputs.run-build == true }}
115129
uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0
116130
with:
117131
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos
118132
destination_workspace: src
119133
skip_existing: 'true'
120134

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

143159
- name: Upload build artifacts
144-
if: ${{ inputs.run-tests == true }}
160+
if: ${{ inputs.run-build == true && inputs.run-tests == true }}
145161
uses: eProsima/eProsima-CI/external/upload-artifact@v0
146162
with:
147163
name: fastdds_build_${{ inputs.label }}
@@ -215,8 +231,8 @@ jobs:
215231
sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts
216232
217233
- name: Colcon test
218-
if: ${{ inputs.run-tests == true }}
219234
id: test
235+
if: ${{ inputs.run-tests == true }}
220236
uses: eProsima/eProsima-CI/ubuntu/colcon_test@v0
221237
with:
222238
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta

0 commit comments

Comments
 (0)