[DO NOT MERGE] experimental: try toc.integrate
          
            #4330
        
      Workflow file for this run
  
    
      This file contains hidden or 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
    
  
  
    
  | name: build-and-test-differential | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - labeled | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CC: /usr/lib/ccache/gcc | |
| CXX: /usr/lib/ccache/g++ | |
| jobs: | |
| require-label: | |
| uses: autowarefoundation/autoware-github-actions/.github/workflows/require-label.yaml@v1 | |
| with: | |
| label: run:build-and-test-differential | |
| build-and-test-differential: | |
| needs: require-label | |
| if: ${{ needs.require-label.outputs.result == 'true' }} | |
| runs-on: ubuntu-24.04 | |
| container: ${{ matrix.container }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rosdistro: | |
| - humble | |
| include: | |
| - rosdistro: humble | |
| container: ghcr.io/autowarefoundation/autoware:core-common-devel | |
| steps: | |
| - name: Set PR fetch depth | |
| run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" | |
| shell: bash | |
| - name: Checkout PR branch and all PR commits | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: ${{ env.PR_FETCH_DEPTH }} | |
| - name: Run build-and-test-differential action | |
| uses: ./.github/actions/build-and-test-differential | |
| with: | |
| rosdistro: ${{ matrix.rosdistro }} | |
| codecov-token: ${{ secrets.CODECOV_TOKEN }} | |
| clang-tidy-differential: | |
| needs: build-and-test-differential | |
| runs-on: ubuntu-24.04 | |
| container: ghcr.io/autowarefoundation/autoware:core-common-devel | |
| steps: | |
| - name: Set PR fetch depth | |
| run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" | |
| - name: Checkout PR branch and all PR commits | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: ${{ env.PR_FETCH_DEPTH }} | |
| - name: Show disk space before the tasks | |
| run: df -h | |
| - name: Remove exec_depend | |
| uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 | |
| - name: Get modified packages | |
| id: get-modified-packages | |
| uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 | |
| - name: Get changed files (existing files only) | |
| id: get-changed-files | |
| run: | | |
| echo "changed-files=$(git diff --name-only "origin/${{ github.base_ref }}"...HEAD | grep -E '\.(cpp|hpp)$' | while read -r file; do [ -e "$file" ] && echo -n "$file "; done)" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Run clang-tidy | |
| if: ${{ steps.get-changed-files.outputs.changed-files != '' }} | |
| uses: autowarefoundation/autoware-github-actions/clang-tidy@v1 | |
| with: | |
| rosdistro: humble | |
| target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} | |
| target-files: ${{ steps.get-changed-files.outputs.changed-files }} | |
| clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy-ci | |
| underlay-workspace: /opt/autoware | |
| - name: Show disk space after the tasks | |
| run: df -h | |
| build-and-test-packages-above-differential: | |
| needs: require-label | |
| if: ${{ needs.require-label.outputs.result == 'true' }} | |
| runs-on: ubuntu-24.04 | |
| container: ghcr.io/autowarefoundation/autoware:core-common-devel | |
| steps: | |
| - name: Set PR fetch depth | |
| run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" | |
| - name: Checkout PR branch and all PR commits | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: ${{ env.PR_FETCH_DEPTH }} | |
| - name: Clone above dependency packages | |
| run: | | |
| mkdir -p dependency_ws | |
| vcs import dependency_ws < packages_above.repos | |
| shell: bash | |
| - name: Remove exec_depend | |
| uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 | |
| - name: Run build-and-test-differential action | |
| uses: ./.github/actions/build-and-test-differential | |
| with: | |
| rosdistro: humble | |
| codecov-token: ${{ secrets.CODECOV_TOKEN }} |