From e1681c9e16f2c3939918b9b0bb75478a8ac36beb Mon Sep 17 00:00:00 2001 From: Alberto Tudela Date: Mon, 14 Oct 2024 14:04:57 +0200 Subject: [PATCH] Fix docker workflow Signed-off-by: Alberto Tudela --- .github/workflows/build.yml | 12 +++++++++++- .github/workflows/docker_image.yml | 4 ++-- README.md | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d74078..ae8c3c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,13 +17,23 @@ env: jobs: build: runs-on: ubuntu-22.04 + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache steps: - name: Cache APT Packages uses: awalsh128/cache-apt-pkgs-action@v1.4.2 with: packages: g++ cmake subversion doxygen libxml2-dev libssl-dev libsqlite3-dev libboost-all-dev libogre-1.9-dev libsvn-dev libopencv-dev binutils-dev libiberty-dev libcurl4-gnutls-dev libprocps-dev libqwt-qt5-dev libqt5webkit5-dev libqwtmathml-qt5-dev libqt5opengl5-dev libqt5svg5-dev qt*5-dev qttools5-dev-tools git - name: Checkout Repository - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4 + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-${{ runner.os }}-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.sha }} + ccache-${{ runner.os }} - name: Install MIRA run: | curl -o mira-installer-binary.sh https://www.mira-project.org/downloads/mira-installer-binary.sh diff --git a/.github/workflows/docker_image.yml b/.github/workflows/docker_image.yml index b5ccad6..ff7687e 100644 --- a/.github/workflows/docker_image.yml +++ b/.github/workflows/docker_image.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: true jobs: - dsr-image: + docker-image: runs-on: ubuntu-latest steps: - name: Extract branch name @@ -54,7 +54,7 @@ jobs: uses: docker/build-push-action@v5.3.0 with: builder: ${{ steps.scitos2-builder.outputs.name }} - context: docker + context: . push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index 7df971f..99e4756 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ![ROS2](https://img.shields.io/badge/ros2-humble-blue?logo=ros&logoColor=white) ![License](https://img.shields.io/github/license/grupo-avispa/scitos2) [![Build](https://github.com/grupo-avispa/scitos2/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/grupo-avispa/scitos2/actions/workflows/build.yml) +[![Docker image](https://github.com/grupo-avispa/scitos2/actions/workflows/docker_image.yml/badge.svg?branch=main)](https://github.com/grupo-avispa/scitos2/actions/workflows/docker_image.yml) [![codecov](https://codecov.io/gh/grupo-avispa/scitos2/graph/badge.svg?token=794XFYV0FK)](https://codecov.io/gh/grupo-avispa/scitos2) ## Overview