Update CI #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple set of rules for GitHub actions integration with a ROS project | |
# | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CORTEX_PATH: ${{ github.workspace }}/cortex | |
jobs: | |
install-cortex: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Cache CORTEX | |
id: cache-cortex | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CORTEX_PATH }} | |
key: cortex-${{ runner.os }}-ubuntu-22.04 | |
- name: Install Cortex | |
if: steps.cache-cortex.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p $CORTEX_PATH && cd $CORTEX_PATH | |
curl -o installation.sh https://raw.githubusercontent.com/grupo-avispa/cortex/development/installation.sh | |
chmod +x installation.sh | |
./installation.sh | |
build-dsr-ros: | |
runs-on: ubuntu-22.04 | |
needs: install-cortex | |
steps: | |
- name: Cache APT Packages | |
uses: awalsh128/cache-apt-pkgs-action@v1.4.2 | |
with: | |
packages: qtbase5-dev | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.6 | |
- name: Setup ROS 2 | |
uses: ros-tooling/setup-ros@0.7.5 | |
- name: Restore CORTEX cache | |
id: restore-cache-cortex | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CORTEX_PATH }} | |
key: cortex-${{ runner.os }}-ubuntu-22.04 | |
- name: Restore CORTEX headers | |
if: steps.restore-cache-cortex.outputs.cache-hit == 'true' | |
run: | | |
cd $CORTEX_PATH/cortex/build && make install | |
- name: Build packages | |
uses: ros-tooling/action-ros-ci@0.3.13 | |
with: | |
package-name: | |
dsr_ros | |
dsr_agents | |
dsr_bridge | |
dsr_msgs | |
dsr_rqt_plugin | |
dsr_util | |
target-ros2-distro: humble | |
colcon-defaults: | | |
{ | |
"build": { | |
"mixin": ["coverage-gcc", "coverage-pytest"] | |
}, | |
"test": { | |
"mixin": ["coverage-pytest"] | |
} | |
} | |
skip-tests: false | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.4.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ros_ws/lcov/total_coverage.info,ros_ws/coveragepy/.coverage | |
flags: unittests | |
name: codecov-umbrella | |
slug: grupo-avispa/dsr_ros |