From 3bb798c8dceea9cfdf79bfabdf23a0045d589778 Mon Sep 17 00:00:00 2001 From: Nahuel Espinosa Date: Sun, 22 Jan 2023 10:45:07 -0300 Subject: [PATCH] Speed up CI using compiler cache --- .github/workflows/ci_pipeline.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index af05e668d..a50b6369d 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -16,7 +16,8 @@ jobs: strategy: fail-fast: false steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 - name: Install debian packages run: | @@ -26,12 +27,25 @@ jobs: - name: Install python packages run: pip install pre-commit==2.20.0 + - name: Cache + uses: hendrikmuhs/ccache-action@v1.2.8 + with: + key: ${{ github.job }} + verbose: 2 + - name: Build and test uses: ros-tooling/action-ros-ci@0.2.7 with: package-name: beluga beluga_amcl - target-ros2-distro: ${{ env.ROS_DISTRO }} + target-ros2-distro: ${{ env.ROS_DISTRO }} import-token: ${{ secrets.GITHUB_TOKEN }} + colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/c75e4b34a3959524564afb584e2aa33c7eec323c/index.yaml + colcon-defaults: | + { + "build": { + "mixin": ["ccache"] + } + } - name: Lint shell: bash @@ -46,11 +60,13 @@ jobs: REPOSITORY_CHECKOUT_PATH: ${{ github.workspace }}/repository DOXYGEN_HTML_OUTPUT: ${{ github.workspace }}/docs steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 with: path: ${{ env.REPOSITORY_CHECKOUT_PATH }} - - uses: actions/checkout@v3 + - name: Checkout documentation branch + uses: actions/checkout@v3 with: path: ${{ env.DOXYGEN_HTML_OUTPUT }} ref: gh-pages