Skip to content

Commit

Permalink
Refs #21222. Making Ccache optional
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware committed Jun 26, 2024
1 parent d6f303f commit bcb92e7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/reusable-ubuntu-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ on:
description: 'Fast DDS Gen branch to be used'
required: true
type: string
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false
env:
ccache-mixin: ${{ inputs.use-ccache == true && 'ccache' || '' }}

defaults:
run:
Expand All @@ -37,6 +44,12 @@ jobs:
with:
cmakeVersion: 3.22.6

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

- name: Install apt packages
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
Expand Down Expand Up @@ -117,7 +130,7 @@ jobs:
- name: Build workspace
run: |
cmake --version
colcon build --event-handlers=console_direct+ --mixin rel-with-deb-info --metas src/fastddsgen/.github/fastddsgen.meta
colcon build --event-handlers=console_direct+ --mixin rel-with-deb-info ${{ env.ccache-mixin }} --metas src/fastddsgen/.github/fastddsgen.meta
- name: Test fastddsgen
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ubuntu-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
description: 'Fast-DDS-Gen branch to be used'
required: true
type: string
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false

pull_request:

Expand All @@ -30,3 +35,4 @@ jobs:
os_image: ${{ matrix.os_image }}
java_version: ${{ matrix.java_version }}
fastddsgen_branch: ${{ inputs.fastddsgen_branch || github.ref || 'master' }}
use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }}

0 comments on commit bcb92e7

Please sign in to comment.