|
| 1 | +# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). |
| 2 | +# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) |
| 3 | + |
| 4 | +name: Build galactic |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - ros2-master |
| 10 | + schedule: |
| 11 | + # Run every day to detect flakiness and broken dependencies |
| 12 | + - cron: '28 6 * * *' |
| 13 | + |
| 14 | +jobs: |
| 15 | + binary: |
| 16 | + name: binary build |
| 17 | + runs-on: ubuntu-latest |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + env: |
| 21 | + - {ROS_DISTRO: galactic, ROS_REPO: main} |
| 22 | + - {ROS_DISTRO: galactic, ROS_REPO: testing} |
| 23 | + env: |
| 24 | + CCACHE_DIR: ${{ github.workspace }}/.ccache |
| 25 | + BASEDIR: ${{ github.workspace }}/.work |
| 26 | + CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v1 |
| 29 | + # The target directory cache doesn't include the source directory because |
| 30 | + # that comes from the checkout. See "prepare target_ws for cache" task below |
| 31 | + - name: cache target_ws |
| 32 | + if: ${{ ! matrix.env.CCOV }} |
| 33 | + |
| 34 | + with: |
| 35 | + path: ${{ env.BASEDIR }}/target_ws |
| 36 | + key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} |
| 37 | + restore-keys: | |
| 38 | + target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} |
| 39 | + - name: cache ccache |
| 40 | + |
| 41 | + with: |
| 42 | + path: ${{ env.CCACHE_DIR }} |
| 43 | + key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} |
| 44 | + restore-keys: | |
| 45 | + ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} |
| 46 | + ccache-${{ env.CACHE_PREFIX }} |
| 47 | + - uses: 'ros-industrial/industrial_ci@master' |
| 48 | + env: ${{matrix.env}} |
| 49 | + - name: prepare target_ws for cache |
| 50 | + if: ${{ always() && ! matrix.env.CCOV }} |
| 51 | + run: | |
| 52 | + du -sh ${{ env.BASEDIR }}/target_ws |
| 53 | + sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete |
| 54 | + sudo rm -rf ${{ env.BASEDIR }}/target_ws/src |
| 55 | + du -sh ${{ env.BASEDIR }}/target_ws |
0 commit comments