Skip to content

Commit

Permalink
Refs #20822: Use CCache based on an input parameter
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
  • Loading branch information
JesusPoderoso committed Jun 17, 2024
1 parent e935e66 commit ff7d537
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/nightly-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
fastdds-branch: 'master'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true

nightly-ubuntu-ci-2_14_x:
strategy:
Expand All @@ -41,6 +42,7 @@ jobs:
fastdds-branch: '2.14.x'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true

nightly-ubuntu-ci-2_13_x:
strategy:
Expand All @@ -59,6 +61,7 @@ jobs:
fastdds-branch: '2.13.x'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true

nightly-ubuntu-ci-2_10_x:
strategy:
Expand All @@ -77,6 +80,7 @@ jobs:
fastdds-branch: '2.10.x'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true

nightly-ubuntu-ci-2_6_x:
strategy:
Expand All @@ -95,3 +99,4 @@ jobs:
fastdds-branch: '2.6.x'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true
13 changes: 13 additions & 0 deletions .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ on:
required: false
type: boolean
default: true
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false

env:
security-cmake-flag: ${{ inputs.security == true && '-DSECURITY=ON' || '-DSECURITY=OFF' }}
Expand Down Expand Up @@ -96,6 +101,7 @@ jobs:

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

Expand Down Expand Up @@ -167,6 +173,7 @@ jobs:

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

Expand Down Expand Up @@ -266,6 +273,7 @@ jobs:

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

Expand Down Expand Up @@ -348,6 +356,7 @@ jobs:

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

Expand Down Expand Up @@ -426,6 +435,7 @@ jobs:

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

Expand Down Expand Up @@ -531,6 +541,7 @@ jobs:

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

Expand Down Expand Up @@ -611,6 +622,7 @@ jobs:

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

Expand Down Expand Up @@ -712,6 +724,7 @@ jobs:

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

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
required: false
type: boolean
default: true
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false

pull_request:
types:
Expand Down Expand Up @@ -65,3 +70,4 @@ jobs:
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || 'master' }}
security: ${{ ((inputs.security == true) && true) || github.event_name == 'pull_request' }}
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }}
use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }}

0 comments on commit ff7d537

Please sign in to comment.