-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(build-and-test): extract the action and simplify
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
- Loading branch information
M. Fatih Cırıt
committed
Jun 6, 2024
1 parent
ce1a86a
commit c4adf9a
Showing
6 changed files
with
148 additions
and
122 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: "Build and Test Action" | ||
description: "Reusable action for building and testing the repository" | ||
inputs: | ||
container: | ||
description: "Container to use for the build" | ||
required: true | ||
container-suffix: | ||
description: "Suffix for the container" | ||
required: true | ||
build-depends-repos: | ||
description: "Repositories for build dependencies" | ||
required: true | ||
rosdistro: | ||
description: "ROS distribution" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- 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 self packages | ||
id: get-self-packages | ||
uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 | ||
|
||
- name: Build | ||
if: ${{ steps.get-self-packages.outputs.self-packages != '' }} | ||
uses: autowarefoundation/autoware-github-actions/colcon-build@v1 | ||
with: | ||
rosdistro: ${{ inputs.rosdistro }} | ||
target-packages: ${{ steps.get-self-packages.outputs.self-packages }} | ||
build-depends-repos: ${{ inputs.build-depends-repos }} | ||
|
||
- name: Test | ||
if: ${{ steps.get-self-packages.outputs.self-packages != '' }} | ||
id: test | ||
uses: autowarefoundation/autoware-github-actions/colcon-test@v1 | ||
with: | ||
rosdistro: ${{ inputs.rosdistro }} | ||
target-packages: ${{ steps.get-self-packages.outputs.self-packages }} | ||
build-depends-repos: ${{ inputs.build-depends-repos }} | ||
|
||
- name: Upload coverage to CodeCov | ||
if: ${{ steps.test.outputs.coverage-report-files != '' }} | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ${{ steps.test.outputs.coverage-report-files }} | ||
fail_ci_if_error: false | ||
verbose: true | ||
flags: total | ||
|
||
- name: Show disk space after the tasks | ||
run: df -h |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: build-and-test-cuda | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build-and-test-cuda: | ||
if: ${{ github.ref_name == github.event.repository.default_branch }} | ||
runs-on: [ self-hosted, linux, ARM64 ] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rosdistro: | ||
- humble | ||
container-suffix: | ||
- -cuda | ||
include: | ||
- rosdistro: humble | ||
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt | ||
build-depends-repos: build_depends.repos | ||
steps: | ||
- name: Build and Test | ||
uses: ./.github/actions/build-and-test-action | ||
with: | ||
container: ${{ matrix.container }} | ||
container-suffix: ${{ matrix.container-suffix }} | ||
build-depends-repos: ${{ matrix.build-depends-repos }} | ||
rosdistro: ${{ matrix.rosdistro }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: build-and-test-daily-arm64 | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test-daily-arm64: | ||
runs-on: [ self-hosted, linux, ARM64 ] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rosdistro: | ||
- humble | ||
container-suffix: | ||
- "" | ||
- -cuda | ||
include: | ||
- rosdistro: humble | ||
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt | ||
build-depends-repos: build_depends.repos | ||
steps: | ||
- name: Build and Test | ||
uses: ./.github/actions/build-and-test-action | ||
with: | ||
container: ${{ matrix.container }} | ||
container-suffix: ${{ matrix.container-suffix }} | ||
build-depends-repos: ${{ matrix.build-depends-repos }} | ||
rosdistro: ${{ matrix.rosdistro }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: build-and-test-daily | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test-daily: | ||
runs-on: [ self-hosted, linux, X64 ] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rosdistro: | ||
- humble | ||
container-suffix: | ||
- "" | ||
- -cuda | ||
include: | ||
- rosdistro: humble | ||
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt | ||
build-depends-repos: build_depends.repos | ||
steps: | ||
- name: Build and Test | ||
uses: ./.github/actions/build-and-test-action | ||
with: | ||
container: ${{ matrix.container }} | ||
container-suffix: ${{ matrix.container-suffix }} | ||
build-depends-repos: ${{ matrix.build-depends-repos }} | ||
rosdistro: ${{ matrix.rosdistro }} |
This file was deleted.
Oops, something went wrong.