Skip to content

Commit

Permalink
ci: update build and test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com>
  • Loading branch information
KeisukeShima committed Feb 8, 2022
1 parent 2268517 commit 98c6771
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 28 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build-and-test-arm-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,17 @@ jobs:
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@tier4/proposal

- name: Build and test
- name: Build
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build-and-test@tier4/proposal
uses: autowarefoundation/autoware-github-actions/colcon-build@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: build_depends.repos

- name: Test
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-test@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/build-and-test-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ jobs:
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@tier4/proposal

- name: Build and test
uses: autowarefoundation/autoware-github-actions/colcon-build-and-test@tier4/proposal
- name: Build
uses: autowarefoundation/autoware-github-actions/colcon-build@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: build_depends.repos

- name: Test
uses: autowarefoundation/autoware-github-actions/colcon-test@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/build-and-test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ jobs:
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@tier4/proposal

- name: Build and test
- name: Build
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build-and-test@tier4/proposal
uses: autowarefoundation/autoware-github-actions/colcon-build@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: build_depends.repos

- name: Check the existence of coverage files
id: check-file-existence
uses: autowarefoundation/autoware-github-actions/check-file-existence@tier4/proposal
- name: Test
id: test
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-test@tier4/proposal
with:
files: |
lcov/total_coverage.info
coveragepy/.coverage
condition: or
rosdistro: galactic
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: build_depends.repos

- name: Upload coverage to CodeCov
if: ${{ steps.check-file-existence.outputs.exists == 'true' }}
if: ${{ steps.test.outputs.coverage-report-files != '' }}
uses: codecov/codecov-action@v2
with:
files: lcov/total_coverage.info,coveragepy/.coverage
files: ${{ steps.test.outputs.coverage-report-files }}
fail_ci_if_error: true
verbose: true

Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,25 @@ jobs:
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@tier4/proposal

- name: Build and test
uses: autowarefoundation/autoware-github-actions/colcon-build-and-test@tier4/proposal
- name: Build
uses: autowarefoundation/autoware-github-actions/colcon-build@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: build_depends.repos

- name: Check the existence of coverage files
id: check-file-existence
uses: autowarefoundation/autoware-github-actions/check-file-existence@tier4/proposal
- name: Test
id: test
uses: autowarefoundation/autoware-github-actions/colcon-test@tier4/proposal
with:
files: |
lcov/total_coverage.info
coveragepy/.coverage
condition: or
rosdistro: galactic
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: build_depends.repos

- name: Upload coverage to CodeCov
if: ${{ steps.check-file-existence.outputs.exists == 'true' }}
if: ${{ steps.test.outputs.coverage-report-files != '' }}
uses: codecov/codecov-action@v2
with:
files: lcov/total_coverage.info,coveragepy/.coverage
files: ${{ steps.test.outputs.coverage-report-files }}
fail_ci_if_error: true
verbose: true
11 changes: 9 additions & 2 deletions .github/workflows/check-build-depends.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@ jobs:
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@tier4/proposal

- name: Build and test
uses: autowarefoundation/autoware-github-actions/colcon-build-and-test@tier4/proposal
- name: Build
uses: autowarefoundation/autoware-github-actions/colcon-build@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: build_depends.repos

- name: Test
uses: autowarefoundation/autoware-github-actions/colcon-test@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
Expand Down

0 comments on commit 98c6771

Please sign in to comment.