|
1 |
| -name: "testing" |
2 |
| -on: pull_request |
| 1 | +on: # this determines when this workflow is run |
| 2 | + pull_request: |
| 3 | + workflow_dispatch: # allow manually starting this workflow |
| 4 | + |
3 | 5 | jobs:
|
4 |
| - testing: |
5 |
| - runs-on: ubuntu-22.04 |
| 6 | + industrial_ci: |
| 7 | + name: ROS ${{ matrix.ROS_DISTRO }} (${{ matrix.ROS_REPO }}) |
| 8 | + runs-on: ubuntu-latest |
| 9 | + strategy: |
| 10 | + # fail-fast: false # uncomment if failing jobs should not cancel the others immediately |
| 11 | + matrix: # matrix is the product of entries |
| 12 | + ROS_DISTRO: [humble] |
| 13 | + ROS_REPO: [main] |
| 14 | + env: |
| 15 | + CCACHE_DIR: "${{ github.workspace }}/.ccache" # directory for ccache (and how we enable ccache in industrial_ci) |
| 16 | + UPSTREAM_WORKSPACE: .repos |
6 | 17 | steps:
|
7 |
| - - uses: ros-tooling/[email protected] |
8 |
| - - uses: ros-tooling/[email protected] |
| 18 | + - uses: actions/checkout@v4 # clone target repository |
| 19 | + - uses: actions/cache@v2 # fetch/store the directory used by ccache before/after the ci run |
9 | 20 | with:
|
10 |
| - package-name: py_trees_parser |
11 |
| - target-ros2-distro: humble |
12 |
| - vcs-repo-file-url: https://raw.githubusercontent.com/sam-xl/py_trees_parser/refs/heads/ORTHO-277/create_bt_parser_repo/dependencies.repos |
| 21 | + path: ${{ env.CCACHE_DIR }} |
| 22 | + # This configuration will always create a new ccache cache starting off from the previous one (if any). |
| 23 | + # In this simple version it will be shared between all builds of the same ROS_REPO and ROS_REPO |
| 24 | + # and might need some fine-tuning to match the use case |
| 25 | + key: ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}-${{github.run_id}} |
| 26 | + restore-keys: | |
| 27 | + ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}- |
| 28 | + - uses: 'ros-industrial/industrial_ci@master' # run industrial_ci |
| 29 | + env: # either pass all entries explicitly |
| 30 | + ROS_DISTRO: ${{ matrix.ROS_DISTRO }} |
| 31 | + ROS_REPO: ${{ matrix.ROS_REPO }} |
| 32 | + # with: # or pass the full matrix as config |
| 33 | + # config: ${{toJSON(matrix)}} |
| 34 | + |
0 commit comments