Skip to content

[pre-commit.ci] pre-commit autoupdate #3138

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #3138

Workflow file for this run

name: build test
on:
workflow_dispatch:
pull_request:
merge_group:
jobs:
job:
name: BuildAndRun
runs-on: >-
${{
(contains(github.event.pull_request.labels.*.name, 'SelfHostedRunner'))
&& fromJSON('[ "self-hosted"]')
|| fromJSON('[ "ubuntu-latest" ]')
}}
timeout-minutes: 30
container: ghcr.io/ibis-ssl/crane:base
env:
DEBIAN_FRONTEND: noninteractive
# # ccache configuration
# PATH: /usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# CC: /usr/lib/ccache/gcc
# CXX: /usr/lib/ccache/g++
# CCACHE_MAXSIZE: 10G
# USE_CCACHE: 1
strategy:
fail-fast: false
matrix:
rosdistro: [jazzy]
steps:
- name: suppress warnings
run: |
git config --global --add safe.directory '*'
- uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Problem Matchers for GCC
run: echo "::add-matcher::.github/matchers/gcc.json"
- name: Setup Problem Matchers for clang-format
run: echo "::add-matcher::.github/matchers/clang-format.json"
- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# - name: Cache dependency_ws
# id: cache-dependency-ws
# uses: actions/cache@v4
# with:
# path: dependency_ws
# key: dependency_ws-${{ matrix.rosdistro }}-${{ hashFiles(format('dependency_{0}.repos', matrix.rosdistro)) }}
# restore-keys: |
# dependency_ws-${{ matrix.rosdistro }}-
- name: Clone dependency packages
run: |
mkdir -p dependency_ws
vcs import dependency_ws < dependency_${{ matrix.rosdistro }}.repos
shell: bash
# - name: Cache rosdep
# id: cache-rosdep
# uses: actions/cache@v4
# with:
# path: |
# /var/lib/apt/lists
# /root/.ros/rosdep
# key: rosdep-${{ matrix.rosdistro }}-${{ runner.os }}-${{ hashFiles('rosdep_keys.txt') }}
# restore-keys: |
# rosdep-${{ matrix.rosdistro }}-${{ runner.os }}-
# rosdep-${{ matrix.rosdistro }}-
# - name: Cache build artifacts
# uses: actions/cache@v4
# with:
# path: |
# ./build
# ./install
# key: build-${{ matrix.rosdistro }}-${{ runner.os }}-${{ runner.arch }}-${{ github.ref_name }}-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake', '**/package.xml') }}
# restore-keys: |
# build-${{ matrix.rosdistro }}-${{ runner.os }}-${{ runner.arch }}-${{ github.ref_name }}-
# build-${{ matrix.rosdistro }}-${{ runner.os }}-${{ runner.arch }}-develop-
# build-${{ matrix.rosdistro }}-${{ runner.os }}-${{ runner.arch }}-
# - name: Setup ccache
# uses: hendrikmuhs/ccache-action@v1
# with:
# key: ${{ matrix.rosdistro }}-${{ runner.os }}-${{ github.head_ref || github.ref_name }}
# max-size: 10G
- name: Run rosdep install
run: |
sudo apt-get -yqq update
rosdep update
DEBIAN_FRONTEND=noninteractive rosdep install -yqq --from-paths . dependency_ws --ignore-src --rosdistro ${{ matrix.rosdistro }}
shell: bash
- name: Build
run: |
. /opt/ros/${{ matrix.rosdistro }}/setup.sh
colcon build --symlink-install --event-handlers console_cohesion+ \
--parallel-workers $(nproc) \
--cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
shell: bash
# Temporarily disabled due to closest_point_vendor include path issue
# - name: Test
# run: |
# . /opt/ros/${{ matrix.rosdistro }}/setup.sh
# colcon test --event-handlers console_cohesion+ \
# --parallel-workers $(nproc)
# shell: bash