Skip to content

Commit

Permalink
ci(build-and-test*): remove CUDA jobs (#130)
Browse files Browse the repository at this point in the history
Signed-off-by: Yutaka Kondo <[email protected]>
Co-authored-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
youtalk and xmfcx authored Dec 18, 2024
1 parent c1eb46a commit 1b775d4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 118 deletions.
17 changes: 0 additions & 17 deletions .github/actions/build-and-test-differential/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ inputs:
rosdistro:
description: ""
required: true
container:
description: ""
required: true
container-suffix:
description: ""
required: true
runner:
description: ""
required: true
Expand Down Expand Up @@ -63,24 +57,13 @@ runs:
ccache --zero-stats
shell: bash

- name: Export CUDA state as a variable for adding to cache key
run: |
build_type_cuda_state=nocuda
if [[ "${{ inputs.container-suffix }}" == "-cuda" ]]; then
build_type_cuda_state=cuda
fi
echo "BUILD_TYPE_CUDA_STATE=$build_type_cuda_state" >> "${GITHUB_ENV}"
echo "::notice::BUILD_TYPE_CUDA_STATE=$build_type_cuda_state"
shell: bash

- name: Build
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ inputs.rosdistro }}
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: ${{ inputs.build-depends-repos }}
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}
build-pre-command: ${{ inputs.build-pre-command }}

- name: Show ccache stats after build
Expand Down
35 changes: 6 additions & 29 deletions .github/workflows/build-and-test-daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,8 @@ on:

jobs:
build-and-test-daily:
runs-on: [self-hosted, linux, X64, gpu]
container: ${{ matrix.container }}${{ matrix.container-suffix }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
container-suffix:
- ""
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:universe-devel
build-depends-repos: build_depends.repos
runs-on: ubuntu-24.04
container: ghcr.io/autowarefoundation/autoware:core-devel
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -37,33 +25,22 @@ jobs:
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@v1

- name: Export CUDA state as a variable for adding to cache key
run: |
build_type_cuda_state=nocuda
if [[ "${{ matrix.container-suffix }}" == "-cuda" ]]; then
build_type_cuda_state=cuda
fi
echo "BUILD_TYPE_CUDA_STATE=$build_type_cuda_state" >> "${GITHUB_ENV}"
echo "::notice::BUILD_TYPE_CUDA_STATE=$build_type_cuda_state"
shell: bash

- name: Build
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ matrix.rosdistro }}
rosdistro: humble
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}
build-depends-repos: 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: ${{ matrix.rosdistro }}
rosdistro: humble
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}
build-depends-repos: build_depends.repos

- name: Upload coverage to CodeCov
if: ${{ steps.test.outputs.coverage-report-files != '' }}
Expand Down
43 changes: 7 additions & 36 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,11 @@ jobs:
with:
label: tag:run-build-and-test-differential

make-sure-require-cuda-label-is-present:
uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1
with:
label: tag:require-cuda-build-and-test

build-and-test-differential:
needs: [make-sure-label-is-present, make-sure-require-cuda-label-is-present]
needs: make-sure-label-is-present
if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }}
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}${{ matrix.container-suffix }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
container-suffix:
- ""
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:universe-devel
build-depends-repos: build_depends.repos
- container-suffix: -cuda
runner: codebuild-autoware-us-east-1-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-large
build-pre-command: taskset --cpu-list 0-6
- container-suffix: ""
runner: ubuntu-latest
build-pre-command: ""
runs-on: ubuntu-24.04
container: ghcr.io/autowarefoundation/autoware:core-devel
steps:
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
Expand All @@ -62,21 +39,16 @@ jobs:
fetch-depth: ${{ env.PR_FETCH_DEPTH }}

- name: Run build-and-test-differential action
if: ${{ !(matrix.container-suffix == '-cuda') || needs.make-sure-require-cuda-label-is-present.outputs.result == 'true' }}
uses: ./.github/actions/build-and-test-differential
with:
rosdistro: ${{ matrix.rosdistro }}
container: ${{ matrix.container }}
container-suffix: ${{ matrix.container-suffix }}
runner: ${{ matrix.runner }}
build-depends-repos: ${{ matrix.build-depends-repos }}
build-pre-command: ${{ matrix.build-pre-command }}
rosdistro: humble
build-depends-repos: build_depends.repos
codecov-token: ${{ secrets.CODECOV_TOKEN }}

clang-tidy-differential:
needs: build-and-test-differential
runs-on: ubuntu-22.04
container: ghcr.io/autowarefoundation/autoware:universe-devel-cuda
runs-on: ubuntu-24.04
container: ghcr.io/autowarefoundation/autoware:core-devel
steps:
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
Expand Down Expand Up @@ -112,7 +84,6 @@ jobs:
target-files: ${{ steps.get-changed-files.outputs.changed-files }}
clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy-ci
build-depends-repos: build_depends.repos
cache-key-element: cuda

- name: Show disk space after the tasks
run: df -h
48 changes: 12 additions & 36 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,20 @@ on:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
# Ensures sequential execution of this workflow
group: ${{ github.workflow }}
cancel-in-progress: false

env:
CC: /usr/lib/ccache/gcc
CXX: /usr/lib/ccache/g++

jobs:
build-and-test:
runs-on: codebuild-autoware-us-east-1-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-large
container: ${{ matrix.container }}${{ matrix.container-suffix }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
container-suffix:
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:universe-devel
build-depends-repos: build_depends.repos
runs-on: ubuntu-24.04
container: ghcr.io/autowarefoundation/autoware:core-devel
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,9 +48,9 @@ jobs:
with:
path: |
/root/.ccache
key: ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-${{ github.sha }}
key: ccache-main-${{ runner.arch }}-humble-${{ github.sha }}
restore-keys: |
ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-
ccache-main-${{ runner.arch }}-humble-
- name: Limit ccache size
run: |
Expand All @@ -75,47 +64,34 @@ jobs:
ccache --zero-stats
shell: bash

- name: Export CUDA state as a variable for adding to cache key
run: |
build_type_cuda_state=nocuda
if [[ "${{ matrix.container-suffix }}" == "-cuda" ]]; then
build_type_cuda_state=cuda
fi
echo "BUILD_TYPE_CUDA_STATE=$build_type_cuda_state" >> "${GITHUB_ENV}"
echo "::notice::BUILD_TYPE_CUDA_STATE=$build_type_cuda_state"
shell: bash

- name: Build
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ matrix.rosdistro }}
rosdistro: humble
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}
build-depends-repos: build_depends.repos
build-pre-command: taskset --cpu-list 0-6

- name: Show ccache stats after build
run: du -sh ${CCACHE_DIR} && ccache -s
shell: bash

# Only keep save the -cuda version because cuda packages covers non-cuda packages too
- name: Push the ccache cache
if: matrix.container-suffix == '-cuda'
uses: actions/cache/save@v4
with:
path: |
/root/.ccache
key: ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-${{ github.sha }}
key: ccache-main-${{ runner.arch }}-humble-${{ github.sha }}

- name: Test
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
id: test
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
with:
rosdistro: ${{ matrix.rosdistro }}
rosdistro: humble
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}
build-depends-repos: build_depends.repos

- name: Upload coverage to CodeCov
if: ${{ steps.test.outputs.coverage-report-files != '' }}
Expand Down

0 comments on commit 1b775d4

Please sign in to comment.