diff --git a/.github/actions/build-and-test-differential/action.yaml b/.github/actions/build-and-test-differential/action.yaml index 89893e9f..175e71c4 100644 --- a/.github/actions/build-and-test-differential/action.yaml +++ b/.github/actions/build-and-test-differential/action.yaml @@ -5,12 +5,6 @@ inputs: rosdistro: description: "" required: true - container: - description: "" - required: true - container-suffix: - description: "" - required: true runner: description: "" required: true @@ -63,16 +57,6 @@ 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 @@ -80,7 +64,6 @@ runs: 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 diff --git a/.github/workflows/build-and-test-daily.yaml b/.github/workflows/build-and-test-daily.yaml index 63822f8b..a79bbd62 100644 --- a/.github/workflows/build-and-test-daily.yaml +++ b/.github/workflows/build-and-test-daily.yaml @@ -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 @@ -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 != '' }} diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index e77aae16..e9375147 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -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}" @@ -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}" @@ -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 diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index a9274804..52bdc783 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -4,11 +4,11 @@ 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 @@ -16,19 +16,8 @@ env: 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 @@ -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: | @@ -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 != '' }}