Skip to content

Commit e8ac97c

Browse files
committed
ci(docker): switch CI to core-devel-humble images
- Point build-and-test, build-and-test-daily, and build-test-tidy-pr (plus the reusable workflow default) at the core-devel-humble image from the consolidated docker pipeline (autowarefoundation/autoware#7040), replacing the tag-less core-devel / universe-devel images. - Drop the stringly-typed container-suffix input on both reusable workflows. CUDA state is now derived once at workflow-env scope via contains(inputs.container, '-cuda'), removing two identical "Export CUDA state" shell steps. - Pin CCACHE_DIR=/root/.ccache in the workflows that dereference ${CCACHE_DIR} so it agrees with the /root/.ccache path used by actions/cache (the image-baked /home/aw/.ccache was diverging). - Add .github/actions/tune-dds-network composite action and apply it in both build/test jobs (container uses --cap-add=NET_ADMIN). GitHub Actions overrides the image entrypoint with tail -f /dev/null, so the entrypoint's loopback multicast + DDS tweaks never run. Mirrors the pattern from autowarefoundation/autoware_universe#12494. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
1 parent 584fd1b commit e8ac97c

6 files changed

Lines changed: 59 additions & 39 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tune DDS network settings
2+
description: |
3+
Apply the DDS tweaks that docker-entrypoint.sh would have done, since
4+
GitHub Actions overrides the image entrypoint with `tail -f /dev/null`.
5+
The calling job's container must include `--cap-add=NET_ADMIN`.
6+
7+
runs:
8+
using: composite
9+
steps:
10+
- name: 📡 Enable multicast on loopback
11+
run: |
12+
if ip link set lo multicast on; then
13+
echo "✅ multicast enabled on lo"
14+
else
15+
echo "::warning title=DDS tuning::could not enable multicast on lo (NET_ADMIN missing?)"
16+
fi
17+
shell: bash
18+
19+
- name: 🩹 Relax CycloneDDS receive buffer requirement
20+
# Bridge until autowarefoundation/autoware ships min="default" in cyclonedds.xml.
21+
run: |
22+
if [ -f /home/aw/cyclonedds.xml ]; then
23+
sed -i 's|min="10MB"|min="default"|' /home/aw/cyclonedds.xml
24+
echo "✅ patched: SocketReceiveBufferSize min=\"default\""
25+
else
26+
echo "::notice title=DDS tuning::/home/aw/cyclonedds.xml not present, skipping patch"
27+
fi
28+
shell: bash
29+
30+
- name: 🔍 Show effective DDS-relevant settings
31+
run: |
32+
printf ' %-22s = %s\n' "net.core.rmem_max" "$(cat /proc/sys/net/core/rmem_max 2>/dev/null || echo unknown)"
33+
printf ' %-22s = %s\n' "net.ipv4.ipfrag_time" "$(cat /proc/sys/net/ipv4/ipfrag_time 2>/dev/null || echo unknown)"
34+
printf ' %-22s = %s\n' "net.ipv4.ipfrag_high" "$(cat /proc/sys/net/ipv4/ipfrag_high_thresh 2>/dev/null || echo unknown)"
35+
printf ' %-22s : %s\n' "lo flags" "$(ip -o link show lo 2>/dev/null | head -1 || echo unknown)"
36+
shell: bash

.github/workflows/build-and-test-daily.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ jobs:
99
build-and-test-daily:
1010
uses: ./.github/workflows/build-and-test-reusable.yaml
1111
with:
12-
container: ghcr.io/autowarefoundation/autoware:core-devel
13-
container-suffix: ""
12+
container: ghcr.io/autowarefoundation/autoware:core-devel-humble
1413
pull-ccache: true
1514
concurrency-group: build-and-test-daily-${{ github.ref }}-${{ github.run_id }}
1615
codecov-flag: daily

.github/workflows/build-and-test-differential.yaml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ on:
1818
default: true
1919
required: false
2020
type: boolean
21-
container-suffix:
22-
required: false
23-
default: ""
24-
type: string
2521
build-pre-command:
2622
required: false
2723
default: ""
@@ -33,12 +29,16 @@ on:
3329
env:
3430
CC: /usr/lib/ccache/gcc
3531
CXX: /usr/lib/ccache/g++
32+
CCACHE_DIR: /root/.ccache
33+
BUILD_TYPE_CUDA_STATE: ${{ contains(inputs.container, '-cuda') && 'cuda' || 'nocuda' }}
3634

3735
jobs:
3836
build-and-test-differential:
3937
if: ${{ inputs.run-condition }}
4038
runs-on: ${{ inputs.runner }}
41-
container: ${{ inputs.container }}${{ inputs.container-suffix }}
39+
container:
40+
image: ${{ inputs.container }}
41+
options: --cap-add=NET_ADMIN
4242
steps:
4343
- name: Set PR fetch depth
4444
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
@@ -50,6 +50,9 @@ jobs:
5050
ref: ${{ github.event.pull_request.head.sha }}
5151
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
5252

53+
- name: Tune DDS network settings
54+
uses: ./.github/actions/tune-dds-network
55+
5356
- name: Show disk space before the tasks
5457
run: df -h
5558
shell: bash
@@ -86,16 +89,6 @@ jobs:
8689
ccache --zero-stats
8790
shell: bash
8891

89-
- name: Export CUDA state as a variable for adding to cache key
90-
run: |
91-
build_type_cuda_state=nocuda
92-
if [[ "${{ inputs.container-suffix }}" == "-cuda" ]]; then
93-
build_type_cuda_state=cuda
94-
fi
95-
echo "BUILD_TYPE_CUDA_STATE=$build_type_cuda_state" >> "${GITHUB_ENV}"
96-
echo "::notice::BUILD_TYPE_CUDA_STATE=$build_type_cuda_state"
97-
shell: bash
98-
9992
- name: Build
10093
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
10194
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
@@ -125,7 +118,7 @@ jobs:
125118
files: ${{ steps.test.outputs.coverage-report-files }}
126119
fail_ci_if_error: false
127120
verbose: true
128-
flags: differential${{ inputs.container-suffix }}
121+
flags: differential${{ contains(inputs.container, '-cuda') && '-cuda' || '' }}
129122
token: ${{ secrets.codecov-token }}
130123

131124
- name: Show disk space after the tasks

.github/workflows/build-and-test-reusable.yaml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ on:
1111
required: false
1212
container:
1313
type: string
14-
default: ghcr.io/autowarefoundation/autoware:universe-devel
15-
required: false
16-
container-suffix:
17-
type: string
18-
default: ""
14+
default: ghcr.io/autowarefoundation/autoware:core-devel-humble
1915
required: false
2016
rosdistro:
2117
type: string
@@ -56,17 +52,24 @@ concurrency:
5652
env:
5753
CC: /usr/lib/ccache/gcc
5854
CXX: /usr/lib/ccache/g++
55+
CCACHE_DIR: /root/.ccache
56+
BUILD_TYPE_CUDA_STATE: ${{ contains(inputs.container, '-cuda') && 'cuda' || 'nocuda' }}
5957

6058
jobs:
6159
build-and-test:
6260
runs-on: ${{ fromJson(inputs.runner) }}
63-
container: ${{ inputs.container }}${{ inputs.container-suffix }}
61+
container:
62+
image: ${{ inputs.container }}
63+
options: --cap-add=NET_ADMIN
6464
steps:
6565
- name: Check out repository
6666
uses: actions/checkout@v4
6767
with:
6868
fetch-depth: 1
6969

70+
- name: Tune DDS network settings
71+
uses: ./.github/actions/tune-dds-network
72+
7073
- name: Show disk space before the tasks
7174
run: df -h
7275

@@ -111,16 +114,6 @@ jobs:
111114
ccache --zero-stats
112115
shell: bash
113116

114-
- name: Export CUDA state as a variable for adding to cache key
115-
run: |
116-
build_type_cuda_state=nocuda
117-
if [[ "${{ inputs.container-suffix }}" == "-cuda" ]]; then
118-
build_type_cuda_state=cuda
119-
fi
120-
echo "BUILD_TYPE_CUDA_STATE=$build_type_cuda_state" >> "${GITHUB_ENV}"
121-
echo "::notice::BUILD_TYPE_CUDA_STATE=$build_type_cuda_state"
122-
shell: bash
123-
124117
- name: Build
125118
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
126119
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
@@ -136,8 +129,7 @@ jobs:
136129
run: du -sh ${CCACHE_DIR} && ccache -s
137130
shell: bash
138131

139-
# Only keep save the -cuda version because cuda packages covers non-cuda packages too
140-
- name: Push the ccache cache (if inputs.container-suffix == '-cuda' AND inputs.push-ccache)
132+
- name: Push the ccache cache
141133
if: ${{ inputs.push-ccache }}
142134
uses: actions/cache/save@v4
143135
with:

.github/workflows/build-and-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
uses: ./.github/workflows/build-and-test-reusable.yaml
1111
with:
1212
runner: "['self-hosted', 'Linux', 'X64']"
13-
container: ghcr.io/autowarefoundation/autoware:universe-devel
13+
container: ghcr.io/autowarefoundation/autoware:core-devel-humble
1414
concurrency-group: ${{ github.workflow }}-${{ github.ref }}
1515
cancel-in-progress: false
1616
pull-ccache: true

.github/workflows/build-test-tidy-pr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- require-label
2525
uses: ./.github/workflows/build-and-test-differential.yaml
2626
with:
27-
container: ghcr.io/autowarefoundation/autoware:core-devel
27+
container: ghcr.io/autowarefoundation/autoware:core-devel-humble
2828
run-condition: ${{ needs.require-label.outputs.result == 'true' }}
2929
secrets:
3030
codecov-token: ${{ secrets.CODECOV_TOKEN }}
@@ -35,5 +35,5 @@ jobs:
3535
- build-and-test-differential
3636
uses: ./.github/workflows/clang-tidy-differential.yaml
3737
with:
38-
container: ghcr.io/autowarefoundation/autoware:core-devel
38+
container: ghcr.io/autowarefoundation/autoware:core-devel-humble
3939
run-condition: true

0 commit comments

Comments
 (0)