|
| 1 | +name: build-and-test-differential |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + |
| 6 | +jobs: |
| 7 | + build-and-test-differential: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + container: ghcr.io/autowarefoundation/autoware-universe:latest |
| 10 | + steps: |
| 11 | + - name: Cancel previous runs |
| 12 | + |
| 13 | + |
| 14 | + - name: Check out repository |
| 15 | + uses: actions/checkout@v3 |
| 16 | + with: |
| 17 | + fetch-depth: 0 |
| 18 | + |
| 19 | + - name: Remove exec_depend |
| 20 | + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 |
| 21 | + |
| 22 | + - name: Get modified packages |
| 23 | + id: get-modified-packages |
| 24 | + uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 |
| 25 | + |
| 26 | + - name: Build |
| 27 | + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} |
| 28 | + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 |
| 29 | + with: |
| 30 | + rosdistro: galactic |
| 31 | + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} |
| 32 | + build-depends-repos: build_depends.repos |
| 33 | + |
| 34 | + - name: Test |
| 35 | + id: test |
| 36 | + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} |
| 37 | + uses: autowarefoundation/autoware-github-actions/colcon-test@v1 |
| 38 | + with: |
| 39 | + rosdistro: galactic |
| 40 | + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} |
| 41 | + build-depends-repos: build_depends.repos |
| 42 | + |
| 43 | + - name: Upload coverage to CodeCov |
| 44 | + if: ${{ steps.test.outputs.coverage-report-files != '' }} |
| 45 | + uses: codecov/codecov-action@v2 |
| 46 | + with: |
| 47 | + files: ${{ steps.test.outputs.coverage-report-files }} |
| 48 | + fail_ci_if_error: false |
| 49 | + verbose: true |
| 50 | + |
| 51 | + clang-tidy-differential: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + container: ros:galactic |
| 54 | + needs: build-and-test-differential |
| 55 | + steps: |
| 56 | + - name: Check out repository |
| 57 | + uses: actions/checkout@v3 |
| 58 | + with: |
| 59 | + fetch-depth: 0 |
| 60 | + |
| 61 | + - name: Remove exec_depend |
| 62 | + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 |
| 63 | + |
| 64 | + - name: Get modified packages |
| 65 | + id: get-modified-packages |
| 66 | + uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 |
| 67 | + |
| 68 | + - name: Run clang-tidy |
| 69 | + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} |
| 70 | + uses: autowarefoundation/autoware-github-actions/clang-tidy@v1 |
| 71 | + with: |
| 72 | + rosdistro: galactic |
| 73 | + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} |
| 74 | + clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy |
| 75 | + build-depends-repos: build_depends.repos |
0 commit comments