Update CMake files to follow established standards #38
Workflow file for this run
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
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). | |
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) | |
name: Build and Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
industrial_ci: | |
strategy: | |
matrix: | |
env: | |
- {ROS_DISTRO: foxy, ROS_REPO: main} | |
- {ROS_DISTRO: foxy, ROS_REPO: testing} | |
- {ROS_DISTRO: humble, ROS_REPO: main} | |
- {ROS_DISTRO: humble, ROS_REPO: testing} | |
- {ROS_DISTRO: rolling, ROS_REPO: main} | |
- {ROS_DISTRO: rolling, ROS_REPO: testing} | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
BASEDIR: ${{ github.workspace }}/.work | |
CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} | |
BASE_CACHE_PREFIX: ${{ github.base_ref }}-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} | |
name: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: cache target_ws | |
uses: pat-s/[email protected] | |
with: | |
path: ${{ env.BASEDIR }}/target_ws | |
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} | |
restore-keys: | | |
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} | |
- name: cache ccache | |
uses: pat-s/[email protected] | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} | |
restore-keys: | | |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} | |
ccache-${{ env.CACHE_PREFIX }} | |
ccache-${{ env.BASE_CACHE_PREFIX }}-${{ github.sha }} | |
ccache-${{ env.BASE_CACHE_PREFIX }} | |
- name: industrial_ci | |
uses: 'ros-industrial/industrial_ci@master' | |
env: ${{ matrix.env }} | |
- name: prepare target_ws for cache | |
if: ${{ always() }} | |
run: | | |
du -sh ${{ env.BASEDIR }}/target_ws | |
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete | |
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src | |
du -sh ${{ env.BASEDIR }}/target_ws |